-
Notifications
You must be signed in to change notification settings - Fork 141
Part 4: SDL
You can see the modifications here.
Event handling is a piece of cake, I won't describe it. After linkage with SDL I have removed the dependency on stb_image.h. STB libraries are stunningly beautiful, but the compile time is abusive.The source code for the 19th step is the newest code in this repository.
Note how Gitpod is awesome, it allows to run SDL2 games directly in the browser! wasd are used to control the player.
A typical execution of the code looks something like this (click on the image for a youtube video):
As I write this text, the repository contains mere 486 lines of code:
haqreu@daffodil:~/tinyraycaster$ cat *.cpp *.h | wc -l
486
I intentionally did not polish the source code, throwing at you my dirty laundry. Yup, that's what my code looks like (and I'm not the only one). One Saturday morning I just sat down and wrote this :)
I didn't make a completed game, my goal is to give an initial impulse to your fantasy. Write your own code, it will be better than mine for sure. Share your code, share your ideas, send pull requests.