Be a Supporter!

Papervision3d Fps Wip

  • 364 Views
  • 10 Replies
New Topic Respond to this Topic
jrdnllrd
jrdnllrd
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Papervision3d Fps Wip Aug. 29th, 2009 @ 10:19 PM Reply

Hello, I am working on a FPS game with papervision(LINK), currently I am working on the format for the levels, and I was hoping you could help with some things. First of all use the wasd keys to move and the arrow keys to rotate the camera. It will be like DOOM so you won't be rotating the camera up and down in the final game(my solution for not being able to use the mouse most first person shooters do).

Now, it would be nice if you could post your average frames per second, frames per second when the whole map is in view and your system specs.

Also if you know of any papervision optimizations I should know about please post, along with any techniques to get rid of the texture distorting without bringing the segment count of the planes up.

Last thing I want to ask is if my level format is efficient. I have 3 2-dimensional arrays for each level. The first holds a single int for each tile, which currently only defines the texture to use but will later define other properties. The second is for the walls, which holds a single int for each again. I coded the level builder to check surrounding tiles and build walls where there is nothing on the other side. The last array will hold different items but currently holds the player's(actually the camera's) starting position. The following two arrays creates the level in the attached picture.

/Level One
		private var groundOne:Array = [
		[0, 0, 1, 1, 1, 0, 0, 0],
		[0, 0, 1, 1, 1, 0, 0, 0],
		[0, 0, 0, 2, 0, 1, 1, 1],
		[2, 2, 2, 2, 2, 1, 1, 1],
		[0, 2, 0, 0, 0, 1, 1, 1],
		[0, 2, 0, 0, 0, 1, 1, 1],
		[1, 1, 1, 2, 2, 0, 0, 0],
		[1, 1, 1, 0, 2, 0, 0, 0],
		[1, 1, 1, 0, 2, 0, 0, 0],
		[0, 0, 0, 0, 2, 0, 0, 0],
		[0, 0, 1, 1, 1, 1, 0, 0],
		[0, 0, 1, 1, 1, 1, 0, 0],
		[0, 0, 1, 1, 1, 1, 0, 0]
		]
		private var wallsOne:Array = [
		[0, 0, 1, 1, 1, 0, 0, 0],
		[0, 0, 1, 0, 1, 0, 0, 0],
		[0, 0, 0, 1, 0, 1, 1, 1],
		[2, 1, 1, 1, 1, 0, 0, 1],
		[0, 1, 0, 0, 0, 1, 0, 1],
		[0, 1, 0, 0, 0, 1, 1, 1],
		[1, 1, 1, 1, 1, 0, 0, 0],
		[1, 0, 1, 0, 1, 0, 0, 0],
		[1, 1, 1, 0, 1, 0, 0, 0],
		[0, 0, 0, 0, 1, 0, 0, 0],
		[0, 0, 1, 1, 1, 1, 0, 0],
		[0, 0, 1, 0, 0, 1, 0, 0],
		[0, 0, 1, 1, 1, 1, 0, 0]
		]

Also, I have read the bitmaps sizes 2^n(like 128x128, 256x256, 512x512) have better performance. Would it benefit me?
Thanks for any help you give me.

jrdnllrd
jrdnllrd
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 19
Game Developer
Response to Papervision3d Fps Wip Aug. 29th, 2009 @ 11:27 PM Reply

mid 50's

jrdnllrd
jrdnllrd
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Papervision3d Fps Wip Aug. 30th, 2009 @ 12:01 AM Reply

At 8/29/09 11:27 PM, ImpotentBoy2 wrote: mid 50's

Sorry, I didn't realize I linked you to Tennis for Two.

jeffamphetamines
jeffamphetamines
  • Member since: Nov. 9, 2008
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to Papervision3d Fps Wip Aug. 30th, 2009 @ 03:15 AM Reply

mid 30s sometimes 40s. i can also walk through floors :D

LeechmasterB
LeechmasterB
  • Member since: Apr. 1, 2005
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to Papervision3d Fps Wip Aug. 30th, 2009 @ 04:26 AM Reply

Dual Core+: 30 fps

Older Comp: 11 fps

Seriously if the fps goes from 30 to 50 it doesn't matter only the bottom fps counts as thats the highest framerate that will be smooth since everything higher can't be met constantly. So even if it goes higher its worthless, since there is nothing in this map! Its an empty level thats already slow like hell, how do you expect to stuff a whole game in there too? Cpu power wont get better that fast.

Could it be that you are rendering the whole map all the time??
Basically anyone who wrote a 3d engine did it so that at least only the FOV is rendered. With your 2d array level you can get the FOV even easier than in the usual 3d engine. A great data structure to speed up that calculation are Quad Trees.

Anyhow I ve never worked with P3D so maybe its already taking care of things like that, if so then you can give up right away because you can not get more fps out of it for sure. And remember there are no enemies and nothing else so far.

Last but not least, how it looks so far and all you 'd have been better off using a simple raytracer engine ala wolfenstein / doom and you d have the same result with more fps.

milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to Papervision3d Fps Wip Aug. 30th, 2009 @ 07:58 AM Reply

dual core pops up a 30 from time to time.
why don't you use a level class?
in order to get rid of the distortion you have to use more segments.

GustTheASGuy
GustTheASGuy
  • Member since: Nov. 2, 2005
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Papervision3d Fps Wip Aug. 30th, 2009 @ 11:24 AM Reply

You can use the v10 branch for using the new 3d rendering.

You could define the level data using a text file. Two characters per tile, wall/texture and item info.


BBS Signature
doctormario
doctormario
  • Member since: Jan. 30, 2009
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to Papervision3d Fps Wip Aug. 30th, 2009 @ 11:31 AM Reply

At 8/30/09 11:24 AM, GustTheASGuy wrote: You can use the v10 branch for using the new 3d rendering.

You could define the level data using a text file. Two characters per tile, wall/texture and item info.

currently on a MAC
fps: 47/50

Nice work. Can't wait to see where this is going.


BBS Signature
jrdnllrd
jrdnllrd
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Papervision3d Fps Wip Aug. 30th, 2009 @ 09:37 PM Reply

At 8/30/09 12:01 AM, jrdnllrd wrote:
At 8/29/09 11:27 PM, ImpotentBoy2 wrote: mid 50's
Sorry, I didn't realize I linked you to Tennis for Two.

Nevermind, for some reason I thought you were saying it was the quality of game made in the 1950's.

Anyway, it's good to see that you guys are getting a decent fps but it's bad that my computer sucks, a lot. It will drop to about 10 fps with the whole level in view and can drop to about 8-9 when using the debug flash player.

And no the whole map is not rendered at the same time, my computer can reach 60 fps when not looking at any part of the map. But I think objects that are hidden behind other objects are still rendered. I will see if I can do anything about it.

Also I am currently planning on using 2D sprites(again like doom) for the enemies. So most of what will be added would be more parts of the level.

Thanks!

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 19
Game Developer
Response to Papervision3d Fps Wip Aug. 30th, 2009 @ 10:25 PM Reply

At 8/30/09 09:37 PM, jrdnllrd wrote:
At 8/30/09 12:01 AM, jrdnllrd wrote:
At 8/29/09 11:27 PM, ImpotentBoy2 wrote: mid 50's
Sorry, I didn't realize I linked you to Tennis for Two.
Nevermind, for some reason I thought you were saying it was the quality of game made in the 1950's.

I was kinda confused... but actually when i said that i didn't know you wanted us to look at the whole level, i was just walking around. in full view its about 35

And no the whole map is not rendered at the same time, my computer can reach 60 fps when not looking at any part of the map. But I think objects that are hidden behind other objects are still rendered. I will see if I can do anything about it.

http://www.gamedev.net/reference/article s/article1088.asp