Advice on general approaches or feasibility and discussions about game design
by nhcham » Tue May 09, 2017 9:58 pm
Hey there, here's a small update of my work-in-progress 3D shooter:
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!
Last edited by
nhcham on Wed May 10, 2017 9:02 am, edited 4 times in total.
-
nhcham
-
- Posts: 7
- Joined: Mon Dec 05, 2016 10:19 pm
- Location: Berlin, Germany
-
by erico » Wed May 10, 2017 4:12 am
No words :O
Bring it on.
-
erico
-
- Posts: 671
- Joined: Thu Mar 27, 2014 9:29 pm
- Location: Brazil
-
by Sorunome » Wed May 10, 2017 1:59 pm
This is looking awesome! Did you re-use anything of myndales 3D demo?
-
Sorunome
-
- Posts: 629
- Joined: Sun Mar 01, 2015 1:58 pm
-
by nhcham » Wed May 10, 2017 2:05 pm
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
-
nhcham
-
- Posts: 7
- Joined: Mon Dec 05, 2016 10:19 pm
- Location: Berlin, Germany
-
by Zvoc47 » Wed May 10, 2017 2:32 pm
Wow! Real 3D! I'm looking forward to see something from this
-
Zvoc47
-
- Posts: 56
- Joined: Mon Oct 05, 2015 10:03 pm
by adekto » Wed May 10, 2017 6:31 pm
Zvoc47 wrote:Wow! Real 3D! I'm looking forward to see something from this
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?
-
adekto
-
- Posts: 448
- Joined: Tue Feb 25, 2014 9:47 pm
- Location: belgium
by nhcham » Wed May 10, 2017 7:11 pm
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...
-
nhcham
-
- Posts: 7
- Joined: Mon Dec 05, 2016 10:19 pm
- Location: Berlin, Germany
-
by Zvoc47 » Wed May 10, 2017 9:58 pm
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.
-
Zvoc47
-
- Posts: 56
- Joined: Mon Oct 05, 2015 10:03 pm
by nhcham » Wed May 10, 2017 10:11 pm
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.
-
nhcham
-
- Posts: 7
- Joined: Mon Dec 05, 2016 10:19 pm
- Location: Berlin, Germany
-
by Myndale » Thu May 11, 2017 10:38 am
Very cool. How are you generating your portals? BSP trees? Manually? Or are they inherent in your level structure?
-
Myndale
-
- Posts: 507
- Joined: Sat Mar 01, 2014 1:25 am
Return to Project Guidance & Game development
Who is online
Users browsing this forum: No registered users and 9 guests