00:00
00:00
Newgrounds Background Image Theme

Chan99 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Papervision3d Fps Wip

613 Views | 10 Replies
New Topic Respond to this Topic

Papervision3d Fps Wip 2009-08-29 22:19:24


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.

Response to Papervision3d Fps Wip 2009-08-29 22:20:36


Forgot picture...

Papervision3d Fps Wip

Response to Papervision3d Fps Wip 2009-08-29 23:27:22


mid 50's

Response to Papervision3d Fps Wip 2009-08-30 00:01:17


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

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

Response to Papervision3d Fps Wip 2009-08-30 03:15:25


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

Response to Papervision3d Fps Wip 2009-08-30 04:26:29


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.

Response to Papervision3d Fps Wip 2009-08-30 07:58:35


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.

Response to Papervision3d Fps Wip 2009-08-30 11:24:08


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

Response to Papervision3d Fps Wip 2009-08-30 11:31:35


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

Response to Papervision3d Fps Wip 2009-08-30 21:37:06


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!

Response to Papervision3d Fps Wip 2009-08-30 22:25:56


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