Telestein3D (based on 42's project 'Cub3d') is a demo of a horror game that can be explored in first-person similar to the game Wolfenstein 3D.
Click here to play Telestein3D in the browser
Features:
- A ray-casting engine from scratch using mathematics;
- Custom post-processing algorithms + custom shaders (for render distance, dithering, custom pallette, etc.);
- 1 demo level 'Dark Secret' featuring melee combat, interactive TV, jumpscares, bossfight, and more;
- Custom sprites, sound-effects and music;
- In-game menu, with map-selection;
Note
The evaluated version (score 125) can be found on the cub3d_eval branch
The Teletubbies have taken your children and your life turns into a literal nightmare. You're on a mission to take revenge and discover some truly dark secrets...
- Download/clone this repository
- Open up a terminal, CD into the root directory of Telestein3D and use the 'make' command
- Let it build...
- Run the game by booting the binary: './telestein3d'
Note
No additional arguments are required, however, you can supply custom maps by running it with a .cub map file. E.g. './telestein3d data/maps/confrontation.cub'
Currently not available, but working towards a solution...
Player movement:
- Walk: W,A,S,D
- Turn around: LEFT-ARROW / RIGHT-ARROW
- Sprint: SHIFT
Interaction/Combat/Inventory:
- Attack: SPACE
- Map: M
- Fists: 1
- Chainsaw: 2
- Interact TV: E
Big thanks to lodev for his wonderful ray-casting tutorial: https://lodev.org/cgtutor/raycasting.html
Parsing
- consider skipping non-valid lines while reading the .cub file, check for duplicate elements and decide on appropriate behaviour;
- check if the colors are in a valid format
- write a function where I pass an array of characters and check if they are present in a string;
- write a floodfill algorithm to validate the map, decide on a method to check which index has already been checked;
- initialize mlx_textures in the parsing phase;
- free and terminate the application in a clean way while parsing textures and colors
- avoid passing the main struct to every function and seperate variables instead;
- create seperate vector header?
Raycaster
- consider writing the raycaster in a dynamic structure so that it can be used for multiple purposes
- draw a 2d representation of the map
- cast vertical and horizontal ray and determine distance between player and wall
- implement circle-wall collision detection
- fix bug where circle-wall collision doesn't work for 45 degree angle at corner and refactor collision
- fix overlapping sprites
Gameplay (Dark_Secret)
- Add Foreshadowing jumpscare po
- Add jumpscare, tree or shrub
- Po dismemberment mechanic
- Gasoline / fuel for chainsaw
- chase soundtrack (danger)
- Jumpscare sounds
- Add finishing move on Po
- Add exit on Dome entrance
- Add end screen
- Add health indicator
- Add Po miniboss
- Item pickups / Items ( Fuel, Chainsaw)
- Death mechanic
- Health stuff
- Hit stuff
- Add destructible walls
Features
- Improve immersion by adding headbobbing on the Y-axis
- Improve immersion by adding headbobbing to the hands on the X and Y-axis
- Pressing M opens the map
- Add dust particles
- Add Po player-centered minimap
- Add ambient soundtrack
- Add menu soundtrack
- Add event triggered sound
- Add saw and smashing animations
- Add continuous animation for saw + sound.
- Implement textures
- Slither some dither in
- Add sprites
Music, sounddesign and art by Flip van Wijk Technical lead: Duco Ritsema
Chainsaw Sound: Sound Effect by u_zpj3vbdres from Pixabay
Pickup Sound: Sound Effect from Pixabay