a game with the application of raycasting.
The entire program is written without any external libraries, but the asset loading uses stb_image, because it's boring stuff and I don't feel like doing from scratch.
P.S.: because I don't want to initialize OpenGL through Win32 to get the v-sync, I cheated a little by using SDL. but that's just platform layer code; the actual renderer, physics engine, gameplay code is still written from scratch.
#videos
TTD early demo (11/26/2016): https://www.youtube.com/watch?v=rgWLmUx7Chw
TTD physics demo (11/28/2016): https://www.youtube.com/watch?v=ABcA5nmE6Eg&feature=youtu.be
TTD version 1.0 (1/5/2017): https://www.youtube.com/watch?v=lejmK2bgtDQ
#Features
things I implemented:
- texture mapping for wall rendering.
- floor & ceiling casting along with texture mapping.
- supports multiple wall textures (8/31/2016)
- sprite sorting & rendering (9/3/2016)
- graphics-based bullet detection & basic entity system (9/3/2016)
- perspective-oriented sprite generation (9/9/2016)
- collision checking against walls (simulate both body collision and shoulder collision), gliding made possible (9/11/2016)
- set up internal entity clock (9/20/2016)
- basic AI (9/21/2016)
- Faster platform layer with SDL (9/23/2016)
- Asnychronous sound playback with task-based system (10/8/2016)
- One variant memory block per entity, added enemies' firing state (10/28/2016)
- Real collision detection, player hitpoints visual representation (11/10/2016)
- Big code cleanup and replaced graphically-based collision detection with real collision detection (11/19/2016)
- Bitmap font rendering (11/20/2016)
- Basic ammo/reload system for pistol (11/23/2016)
- Added rifle and minigun into the game (11/24/2016)
- Extracted out a physics simulation layer to centralize all physics simulations (11/28/2016)
- Added force to bullets and tuned a force constant for a nice bullet recoil (11/28/2016)
- Added collectables (ammo, health pack, etc) (12/21/2016)
- Procedural world generation (12/30/2016)
- Added win state, death state, screen fader, and the world is resettable (1/4/2017)
- Game is somewhat playable! (1/5/2017)
Q: toggle debug HUD
W,A,S,D: move
1,2,3: toggle different wepaons
left_mouse/right_mouse: fire
reorganize memory layout for frame buffer
SIMD instructions
multi-threaded rendering
#screenshots