Page 1 of 2

Cruiser - a 3D shooter for the Gamebuino

PostPosted: Tue May 09, 2017 9:58 pm
by nhcham
Hey there, here's a small update of my work-in-progress 3D shooter:

Image

You can find the code on my GitHub site and it's still under heavy development: https://github.com/specht/cruiser.

I'm planning to add keys and enemies, but RAM is tight. The demo you're seeing in the GIF uses 1739 bytes of RAM already so there's only 16% left... ;-)

If you'd like to try it out for yourself, try this: https://nhcham.org/cruiser.hex. Feedback is much appreciated!

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Wed May 10, 2017 4:12 am
by erico
No words :O
Bring it on.

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Wed May 10, 2017 1:59 pm
by Sorunome
This is looking awesome! Did you re-use anything of myndales 3D demo?

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Wed May 10, 2017 2:05 pm
by nhcham
No, it's written from scratch and it's quite different, because it's not raycasting with texture mapping like in Myndale's demo, but it's a polygon-based portal engine, without texture mapping.

If you're interested in how it works, you can also find a lot of detailed notes about the program on the GitHub page: https://github.com/specht/cruiser

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Wed May 10, 2017 2:32 pm
by Zvoc47
Wow! Real 3D! I'm looking forward to see something from this :D

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Wed May 10, 2017 6:31 pm
by adekto
Zvoc47 wrote:Wow! Real 3D! I'm looking forward to see something from this :D

not exactly real 3D more 3D realms, joke aside its sorta a step up, its how doom is doing it
any plans for floor and ceiling height?

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Wed May 10, 2017 7:11 pm
by nhcham
Yeah, it looks like 2.5D but it's actually real 3D with arbitrary camera position and orientation, but it doesn't become apparent from the video much because the ship doesn't roll when it's turning left and right. I'll have that fixed. :-)

Actually floor and ceiling height is already working, there's currently just one room employing it, it's the big one and it's visible in the video! Gotta have a word with the level design department, I wonder what they think they're getting paid for...

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Wed May 10, 2017 9:58 pm
by Zvoc47
How come this takes up a lot of RAM? I'm a bit confused about that. If RAM is a problem, you could load the whole level into a serial 512kB RAM chip and then stream byte by byte into the internal RAM as you need it.

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Wed May 10, 2017 10:11 pm
by nhcham
The level doesn't use any RAM at all, it's all stored in flash memory and it doesn't even take up that much space (518 bytes as of now). What fills the RAM is the local and global variables like frustum planes (portal engines are rendered recursively), the shots, the camera, and the stack frames resulting from function calls. Also for clipping you usually have an input and an output polygon and polygons use a lot of RAM, so I implemented a version that works in place, requiring only one polygon structure instead of two.

I'd like this game to work with a vanilla Gamebuino / Makerbuino without any extra hardware required, and unless I'm missing something, we only have 2k of RAM and 32k of flash (plus 1k of EEPROM). I have never heard of the RAM chip, could you provide a link so I could learn about it?

In order to load new levels, I would read them from the SD card, so levels are not the problem, it's more the state that takes up space.

Re: Cruiser - a 3D shooter for the Gamebuino

PostPosted: Thu May 11, 2017 10:38 am
by Myndale
Very cool. How are you generating your portals? BSP trees? Manually? Or are they inherent in your level structure?