Kmeb's FPS

http://www.youtube.com/watch?v=R4aGTqAw0u8

I’m taking the zombie survivial game I made and making it a first person shooter.

Buttons are, starting from top left and going counterclockwise-
Weapon switch
Zoom
Fire
Precise aim

Jumping will not be an option, I think, but is actually programmed in as an uncalled function.

wow…
you’re fast! :smiley:

but don’t trash the top down zombie game, that was already very nice!

@KMEB you are very quickly making some really cool projects. Though I agree with @Inviso — I’m still intrigued by your top-down shooter as well.

I’m not trashing it-I’m just giving it two possible interfaces. I’ll decide which one to use for the final version once I’m done.

Found a way to compress the 3d voxel calculations! Brought the zero-lag limit of voxels dorm from 9 to 79.

http://www.youtube.com/watch?v=kEEM44oZHUw

KMEB, this is impressive work!

http://www.youtube.com/watch?v=5QhU5EOt5Is

Crunched the shader and 3d renderer even more. It can draw 32X32x3 cubes (3000 approximately) at a frame rate of about 46 FPS.

I imagine it won’t lag at all once I implement the system so it only renders the faces pointed towards you! :smiley: right now it is rendering every face of every cube, even though a maximum of three faces per cube a visible at a time and the entire field is only displayed if you are standing in the corner…

And then I can cut it down even more by using LOD.

Amazing stuff, @KMEB. It looks like you are doing frustum culling, are you also culling internal volumes?

I believe @John wrote a system a while ago that just constructed a surface out of visible cubes, so the internal ones weren’t rendered until you destroyed the top layers.

Sup @KMEB,

First, wow, really nice project :smiley:

Right now, Codea renders all faces, but I believe @Simeon mentioned he might add glPolygonMode and glCullFace functions.
Calculating back faces in software will most likely have much more of a performance hit than just drawing them.

Also, I’m not sure how you’re building your mesh() (although I don’t think you’re using one mesh per cube, since you’re drawing 3000).

Are you doing any culling based on what is on the screen ?
If not, then all boxes are computed and pushed to be displayed, even if they’re not drawn. It can be pretty expensive, so you might want to implement a tree structure fitting your needs to test against the view frustum, so that only the visible meshes will be computed and pushed.

Cheers,

Xavier

Wow!!!

The system is almost comically simple. I’ve added e most basic selective face rendering and brought the max cube number with FPS over 40 up to about 10000.

Im not using the mesh function at all in this project- I’ve used the sprite() function exclusively.

I’m going to be implementing a system to only render objects that would show up on camera right now.

The real trick, I’ve found, is to precalculate everything.

After I finish that part, I’ll make a stage designer, and then probably release the code,

@KMEB I am so impressed with this. It looks amazing! I particularly like the chain gun spooling up :slight_smile:

It really does show a flair. The little touches that are in there already remind me of Serious Sam – the same spirit of fun.

http://www.youtube.com/watch?v=kbFSNoQhrAY

So, it turns out that my renderer is so efficient that it takes less CPU to render every cube than it does to calculate which ones are visible…

Was there ever a way to share projects figured out?

Very nice work!
Once upon a time there was a way to simply share project in the far far away kingdom of Codea 3.x. But a very bad queen (let’s call her Cruellapple) decided to kill it because she wanted to be sure to keep all the money for herself. So now the best way to share projects is:

  • create a github account (free and simple, i could do it).
  • longpress on you project in codea and choose ‘copy’.
  • create a public ‘GIST’ in github (not a ‘git repo’, this doesnt work from the ipad). Paste your code in it.
  • copy and paste the URL in the safari adress bar.
  • paste this URL in this forum.
  • then we can easily copy the raw code, and paste it in a new project in codea. Long press on the + project in codea will propose to restore all the tabs when creating the project if there is code in the clipboard.

Any update?