Zed A. Shaw
|
51972b0c35
|
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 |
|
Zed A. Shaw
|
a4c13f7fc9
|
Maps are back and have color now. TileCell needs a rework.
|
2025-02-09 14:57:19 -05:00 |
|
Zed A. Shaw
|
3986e6978e
|
Sprites now have a distance lighting calculation that's the same as the raycaster using a shader.
|
2025-02-07 13:50:50 -05:00 |
|
Zed A. Shaw
|
a19bc47904
|
FINALLY fix that stupid bug. The cause was two-fold: I was giving every 'enemy' a sprite, but that automatically included the player in the list of enemies, which meant that I was rendering the player's sprite while moving. Then in the sprite casting loop I was rendering things at 0.
|
2025-02-07 11:05:15 -05:00 |
|
Zed A. Shaw
|
4b18b21861
|
Movement is more correct now since it uses the System::motion to do it for the player, which will always keep all the things updated. I also put placeholder barrels for all the non-combatant entities in the map. Finally, it still has the backup bug and now won't close when you close the window.
|
2025-02-05 20:26:09 -05:00 |
|
Zed A. Shaw
|
14128ab10f
|
Now have enemies chasing us around and implemented diagonal movement as a test but I kind of like it.
|
2025-02-05 14:16:31 -05:00 |
|
Zed A. Shaw
|
d5301acab5
|
Sprite is no more, now using the position from the level's world.
|
2025-02-05 11:46:40 -05:00 |
|
Zed A. Shaw
|
d0badedbd9
|
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 |
|
Zed A. Shaw
|
d6c09e111d
|
Raycaster now has wall collision so won't go through walls. Next step is to render all the sprites being places and then implement the Systems.
|
2025-02-04 14:13:00 -05:00 |
|
Zed A. Shaw
|
75ffb49a53
|
Clean up header includes.
|
2025-02-04 13:26:22 -05:00 |
|
Zed A. Shaw
|
1d3a76e5ee
|
Refactored out main.cpp to be a separate gui and using an FSM to keep the turn based nature straight.
|
2025-02-04 12:56:20 -05:00 |
|
Zed A. Shaw
|
976822ceb6
|
Mostly working junk camera that can do turnbased lerp smooth motion.
|
2025-02-03 10:17:59 -05:00 |
|
Zed A. Shaw
|
cbf0955786
|
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 |
|
Zed A. Shaw
|
a67d25ee10
|
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 |
|
Zed A. Shaw
|
56d67aba28
|
First hack to get a random gen map going.
|
2025-01-30 13:23:12 -05:00 |
|
Zed A. Shaw
|
071808a0f8
|
Playing around with shaders for effects on the scene.
|
2025-01-27 11:36:00 -05:00 |
|
Zed A. Shaw
|
3519c73079
|
Remove some more junk from the texture thing.
|
2025-01-27 10:25:49 -05:00 |
|
Zed A. Shaw
|
b87217ff90
|
Have a barely working animation thing that animates the evil eye when you click a button.
|
2025-01-27 05:40:04 -05:00 |
|
Zed A. Shaw
|
51c1e04f61
|
Made some progress on the refactoring but I need to start getting serious and not reworking this code to death.
|
2025-01-26 19:22:27 -05:00 |
|
Zed A. Shaw
|
6ed57cd4a8
|
Closer to what I want for sprite loading but still needs more work.
|
2025-01-25 12:19:14 -05:00 |
|
Zed A. Shaw
|
51858ea399
|
Made a terrible animation sprite and then did a quick animation test. Won't keep it for now but this shows how it could work.
|
2025-01-25 12:02:57 -05:00 |
|
Zed A. Shaw
|
0882851b3f
|
Switching back to 256px textures for most things, but the weapon works best as a 512px.
|
2025-01-25 08:29:01 -05:00 |
|
Zed A. Shaw
|
5e6f95513c
|
Tried out 512px tiles and sprites and they actually look like crap. They just look like bad textures not better painted. With 256 they look nicely pixelated.
|
2025-01-25 07:46:57 -05:00 |
|
Zed A. Shaw
|
ad38f575a3
|
Now the sprites are rendered in the 3d scene with just SFML sprites.
|
2025-01-23 11:24:06 -05:00 |
|
Zed A. Shaw
|
da7075864b
|
Now have a basic sprite system that uses SFML's sprites, but the algorithm for determining how much of a sprite to display is wrong. Need to use the alternate algorithm from LODE's tutorial that draws sprites after rendering.
|
2025-01-23 02:42:43 -05:00 |
|
Zed A. Shaw
|
5305aea077
|
Fixed up the floor and ceiling textures to not have seams.
|
2025-01-22 06:17:28 -05:00 |
|
Zed A. Shaw
|
c98aa936ad
|
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 |
|
Zed A. Shaw
|
ea3dd204a1
|
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 |
|
Zed A. Shaw
|
53a151511e
|
Make it so that DNEBUG is forced on release build, and that the UI stats counter will show that this is a debug build or not via NDEBUG.
|
2025-01-18 03:18:44 -05:00 |
|
Zed A. Shaw
|
cf9682ed70
|
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 |
|
Zed A. Shaw
|
7a74877849
|
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 |
|
Zed A. Shaw
|
105c974f1c
|
This converts it to SFML 3.0 but the build only runs on Windows at the moment.
|
2025-01-17 15:10:03 -05:00 |
|
Zed A. Shaw
|
f88eca9cd9
|
Implemented a dumb lighting system.
|
2025-01-17 12:03:49 -05:00 |
|
Zed A. Shaw
|
adfb6367d7
|
Finished the first pass of moving everything around and cleaning up as much as possible.
|
2025-01-17 03:45:05 -05:00 |
|
Zed A. Shaw
|
2dfe5417b1
|
More cleaning of the Raycaster class to have no #defines for variables. Now it can be arbitrarily sized and positioned.
|
2025-01-16 12:19:33 -05:00 |
|
Zed A. Shaw
|
c9d4b7ed1e
|
Sprite rendering cleanup started.
|
2025-01-16 11:21:49 -05:00 |
|
Zed A. Shaw
|
033d5cdfec
|
More cleanup, mostly removing variables and simplifying the math.
|
2025-01-16 10:32:28 -05:00 |
|
Zed A. Shaw
|
113df851af
|
Way better in the structure but still a lot of work to do. However, just by moving variables to better locations, taking things out of loops that don't need to be recalulated, etc. this is already 50% of the CPU/GPU usage as the previous version.
|
2025-01-15 15:32:54 -05:00 |
|
Zed A. Shaw
|
e379bcd5ec
|
Next step in the refactoring with everything in a different file and running. The bug from the previous commit was due to the pixel buffer making the Raycaster object too large for the stack. If you get __chkstk_ms then you used too much stack.
|
2025-01-15 13:39:38 -05:00 |
|
Zed A. Shaw
|
d230b152cf
|
BREAKING: This code does NOT work, but has a segv on startup on windows due to ...magic?
|
2025-01-15 12:25:09 -05:00 |
|
Zed A. Shaw
|
8eae4b9420
|
Reworked the files before the big cleanup of the code.
|
2025-01-15 10:26:44 -05:00 |
|
Zed A. Shaw
|
d5047c00e2
|
Did a version of the raycaster that uses a pixel buffer sent to a texture that goes to a sprite that goes on a frog that's on a log on the bottom of the ocean under a tortoise that's carrying a sack that has the...
|
2025-01-07 12:49:06 -05:00 |
|
Zed A. Shaw
|
e8a32ba9f3
|
Tinkered with strafing but I too dumb.
|
2025-01-06 12:19:38 -05:00 |
|
Zed A. Shaw
|
cf539296a5
|
Raycaster is smoother without changing much. Big debate is should left-right and forward-back at the same time cancel out motion or should they be exclusive since you can't do both.
|
2025-01-06 11:41:44 -05:00 |
|
Zed A. Shaw
|
bf77723f70
|
Fixed the map view on the left so it shows the correct visible squares.
|
2025-01-06 10:59:55 -05:00 |
|
Zed A. Shaw
|
ec332a3e2d
|
Small tweak to allow changing the map, and then added a hirdrac suggestion to vsync.
|
2025-01-05 12:18:19 -05:00 |
|
Zed A. Shaw
|
d5a372e751
|
Basic transliteration of the pycaster.py to work in SFML. The grid map on the left doesn't work right, but the rendering on the right does. Also the key detection is using discrete keypress instead of key up/down.
|
2025-01-05 12:10:28 -05:00 |
|
Zed A. Shaw
|
ca80736d7c
|
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 |
|