A retro style homage to 80s dungeon crawlers hand crafted in C++.
Find a file
2025-02-15 13:43:41 -05:00
amt The tracy directory now has an experiment in getting Tracy to work. It's _not_ as easy as it is touted to be. 2025-01-19 12:58:05 -05:00
assets New rat enemy. 2025-02-14 15:22:47 -05:00
magick Some quick hacks that do the seamless texture splits. 2025-01-22 11:14:57 -05:00
scratchpad Now the sprites are rendered in the 3d scene with just SFML sprites. 2025-01-23 11:24:06 -05:00
scripts Tweaking the build to turn on various debug options in GCC and enable -Wall -Werror on only our executable configs because turning them on globally causes most of the dependencies to fail. One thing to note is if you try to move the -D_GLIBCXX options from the project() to the executable() then you get segfaults inside the libc++ and other places. This is because the ABI changes when you enable these options, so you have to recompile _all_ dependencies with these options. 2025-01-19 04:02:42 -05:00
shaders The lighting now uses the original grid based lighting calculations rather than a global single source from the player. 2025-02-11 13:31:39 -05:00
tests LEL can now do hit detection on squares. 2025-02-15 13:43:41 -05:00
tracy The tracy directory now has an experiment in getting Tracy to work. It's _not_ as easy as it is touted to be. 2025-01-19 12:58:05 -05:00
wraps We now have a full map that's basically the same mapping system from Roguish. There's a bug right now where it needs you to move once to calc the light and it's not being centered, but it does work. 2025-02-07 19:32:00 -05:00
.gdbinit My gdb debug thing. 2025-01-13 13:39:12 -05:00
.gitignore First build that actually works. SDL_main errors before but didn't figure out the cause. 2025-01-02 11:47:02 -05:00
.vimrc_proj First build that actually works. SDL_main errors before but didn't figure out the cause. 2025-01-02 11:47:02 -05:00
animator.cpp Tiles now record their textures and this is loaded from the map then converted to an indexed integer on the fly. 2025-01-31 13:37:01 -05:00
animator.hpp Implement a little junk camera on its own that we can use later for movement and views. 2025-02-03 11:08:17 -05:00
ansi_parser.cpp Found my old LEL code and got the shell working, so tomorrow I'll try to make it layout some gui element. 2025-02-14 02:13:08 -05:00
ansi_parser.hpp We now have a full map that's basically the same mapping system from Roguish. There's a bug right now where it needs you to move once to calc the light and it's not being centered, but it does work. 2025-02-07 19:32:00 -05:00
ansi_parser.rl Found my old LEL code and got the shell working, so tomorrow I'll try to make it layout some gui element. 2025-02-14 02:13:08 -05:00
camera.cpp Converted all the variable names from Lode's tutorial style to the one I use in prep for some review and cleanup. 2025-02-10 11:32:50 -05:00
camera.hpp Converted all the variable names from Lode's tutorial style to the one I use in prep for some review and cleanup. 2025-02-10 11:32:50 -05:00
color.hpp Separate out the major UIs to get ready for their development, and enable debug button. 2025-02-13 10:55:45 -05:00
combat.cpp Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite. 2025-02-08 21:16:25 -05:00
combat_ui.cpp LEL can now do hit detection on squares. 2025-02-15 13:43:41 -05:00
combat_ui.hpp Can now use lel::center to center something inside a cell. 2025-02-15 13:22:36 -05:00
components.cpp You now have blood on your screen when below half health. 2025-02-13 13:15:20 -05:00
components.hpp You now have blood on your screen when below half health. 2025-02-13 13:15:20 -05:00
config.cpp Amit's code mostly converted to use the new texture.hpp but there's an error on line amt/pixel.hpp:472 2025-01-17 11:36:03 -05:00
config.hpp Finished the first pass of moving everything around and cleaning up as much as possible. 2025-01-17 03:45:05 -05:00
constants.hpp You now have blood on your screen when below half health. 2025-02-13 13:15:20 -05:00
dbc.cpp Fixed that crash and cleaned up more variables for some study next. I might also try out my debug macros. 2025-01-18 00:44:25 -05:00
dbc.hpp First cut at a replica of the python raycaster. Left side almost works the same but have to sort out math differences. 2025-01-04 12:20:41 -05:00
dbg.h Fixed that crash and cleaned up more variables for some study next. I might also try out my debug macros. 2025-01-18 00:44:25 -05:00
devices.cpp Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite. 2025-02-08 21:16:25 -05:00
dinky_components.hpp Fix up the colors and rendering so that tilemap just uses components::Tile all the time. Need to load all of the config data from json one time on system start instead of constantly, although constantly does make debugging live easier. 2025-02-09 15:54:17 -05:00
dinkyecs.hpp Initial cut of the lel parser mostly working but none of the basic alignment properties work. 2025-02-14 15:40:15 -05:00
events.hpp Start of V1 combat system where you get locked into combat when in range and have to work the turn system to get out. 2025-02-13 14:39:04 -05:00
fsm.hpp Trying out an FSM for controlling the main loop. 2025-02-04 00:52:54 -05:00
gui.cpp LEL is working at a basic grid level, able to render boxes where I want. 2025-02-15 01:31:57 -05:00
gui.hpp Start of V1 combat system where you get locked into combat when in range and have to work the turn system to get out. 2025-02-13 14:39:04 -05:00
inventory.cpp Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite. 2025-02-08 21:16:25 -05:00
inventory.hpp Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite. 2025-02-08 21:16:25 -05:00
lel.cpp LEL can now do hit detection on squares. 2025-02-15 13:43:41 -05:00
lel.hpp LEL can now do hit detection on squares. 2025-02-15 13:43:41 -05:00
lel_parser.cpp You can now prefix a size with % and it will do percentage for the size, even over 100. 2025-02-15 12:52:26 -05:00
lel_parser.rl You can now prefix a size with % and it will do percentage for the size, even over 100. 2025-02-15 12:52:26 -05:00
levelmanager.cpp Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite. 2025-02-08 21:16:25 -05:00
levelmanager.hpp Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite. 2025-02-08 21:16:25 -05:00
lights.cpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
lights.hpp Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite. 2025-02-08 21:16:25 -05:00
main.cpp Start of V1 combat system where you get locked into combat when in range and have to work the turn system to get out. 2025-02-13 14:39:04 -05:00
Makefile Initial cut of the lel parser mostly working but none of the basic alignment properties work. 2025-02-14 15:40:15 -05:00
map.cpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
map.hpp BROKEN: Big refactoring happening, so it compiles but game does not run and the tests fail. 2025-02-08 14:03:09 -05:00
map_view.cpp Fix map, it was moved over but scaled for the whole screen. 2025-02-11 20:46:31 -05:00
map_view.hpp Clean up the GUI some by moving the map_view out into its own file. 2025-02-11 11:37:01 -05:00
matrix.cpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
matrix.hpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
meson.build Found my old LEL code and got the shell working, so tomorrow I'll try to make it layout some gui element. 2025-02-14 02:13:08 -05:00
meson.options Add the tracy wrap and meson options. 2025-01-18 13:33:45 -05:00
panel.cpp We now have a full map that's basically the same mapping system from Roguish. There's a bug right now where it needs you to move once to calc the light and it's not being centered, but it does work. 2025-02-07 19:32:00 -05:00
panel.hpp We now have a full map that's basically the same mapping system from Roguish. There's a bug right now where it needs you to move once to calc the light and it's not being centered, but it does work. 2025-02-07 19:32:00 -05:00
pathing.cpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
pathing.hpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
point.hpp BROKEN: Big refactoring happening, so it compiles but game does not run and the tests fail. 2025-02-08 14:03:09 -05:00
rand.cpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
rand.hpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
raycaster.cpp Separate out the major UIs to get ready for their development, and enable debug button. 2025-02-13 10:55:45 -05:00
raycaster.hpp Raycaster mostly cleaned up. Only thing I can think of is bringing in CameraLOL as the coordinates directly. 2025-02-10 12:05:07 -05:00
README.md A quick warning in case people are funding the thing. 2025-01-28 02:45:02 -05:00
render.cpp We now have a full map that's basically the same mapping system from Roguish. There's a bug right now where it needs you to move once to calc the light and it's not being centered, but it does work. 2025-02-07 19:32:00 -05:00
render.hpp Have a sort of left gui going but not sure if I like it as a real texture yet. Will need to play with it more. 2025-02-12 14:02:34 -05:00
save.cpp BROKEN: Big refactoring happening, so it compiles but game does not run and the tests fail. 2025-02-08 14:03:09 -05:00
save.hpp BROKEN: Big refactoring happening, so it compiles but game does not run and the tests fail. 2025-02-08 14:03:09 -05:00
shiterator.hpp Brought over a bunch of code from the roguelike and now will use it to generate a random map. 2025-01-30 11:38:57 -05:00
spatialmap.cpp More cleanup of the raycaster, finally removed the window as a dependency but I went against making it an sf::Drawable since that had a lot of code quality problems. 2025-02-04 22:52:04 -05:00
spatialmap.hpp Raycaster now controls the sprite locations with SpatialMap rather than the old way. Quick hack job in main.cpp that shows how they can move too. 2025-02-01 14:39:08 -05:00
stats.cpp Bring in the gnu omni font for text, and rewrite my stats code to use c++ and then use that to calc FPS stats for an FPS display on the left. Debug build gets about 48, release gets about 500fps. Amit's code will probably do even better. 2025-01-18 02:42:41 -05:00
stats.hpp Bring in the gnu omni font for text, and rewrite my stats code to use c++ and then use that to calc FPS stats for an FPS display on the left. Debug build gets about 48, release gets about 500fps. Amit's code will probably do even better. 2025-01-18 02:42:41 -05:00
status_ui.cpp You now have blood on your screen when below half health. 2025-02-13 13:15:20 -05:00
status_ui.hpp You now have blood on your screen when below half health. 2025-02-13 13:15:20 -05:00
systems.cpp Basic combat system prototype works, but needs more GUI love to really work in the game. 2025-02-14 10:18:45 -05:00
systems.hpp Basic combat system prototype works, but needs more GUI love to really work in the game. 2025-02-14 10:18:45 -05:00
texture.cpp Raycaster now controls the sprite locations with SpatialMap rather than the old way. Quick hack job in main.cpp that shows how they can move too. 2025-02-01 14:39:08 -05:00
texture.hpp Sprite is no more, now using the position from the level's world. 2025-02-05 11:46:40 -05:00
tilemap.cpp Fix up the colors and rendering so that tilemap just uses components::Tile all the time. Need to load all of the config data from json one time on system start instead of constantly, although constantly does make debugging live easier. 2025-02-09 15:54:17 -05:00
tilemap.hpp Fix up the colors and rendering so that tilemap just uses components::Tile all the time. Need to load all of the config data from json one time on system start instead of constantly, although constantly does make debugging live easier. 2025-02-09 15:54:17 -05:00
worldbuilder.cpp Two main GUI elements are placed for the left side status and the bottom combat UIs. 2025-02-12 17:55:21 -05:00
worldbuilder.hpp Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite. 2025-02-08 21:16:25 -05:00

Simple Raycaster Study

This is a study project for me to learn the raycasting technique. It's an older technique that's not really used much but I'm learning game dev historically and it's definitely been used in the past (Doom).

Don't Study This Code

This code is mostly a tech study and demo, not an actual game. It could be a game but it will require a significant cleanup to improve the layout and design. It's also the culmination of studying about 6 different tutorials on raycasting so it has a weird mix-match code style as I brought ideas over from other tutorials.

Eventually this will be more understandable, but for now just browse it casually and ignore the inconsistent style and kind of stupid structure.