Ray Casting Game
I've spent the last day and a half working on this game that uses ray casting. Ray casting is a method of rendering a 2D level as if it was 3D. It was originally used in Wolfenstein 3D. Also note that it is very slow. I was getting much higher fps running it on my desktop and have spent hours trying to optimize it. Also, sorry for the low render distance, it was the only way for it to run fast enough. I have gotten floors working but they are even to slow to run on my desktop while still looking like more than random pixels. You can also find the python file "PyVectors.py" and an overview/documentation of it on my git hub: github.com
space to toggle between textured and flat color
wasd to move
shift and wasd to sprint
left and right arrows to change view direction
up and down arrows to change resolution (lower res gives better performance)
shift space to toggle the map on and off
e to open/break doors (darker brown when using flat colors)
e to open yellow doors (flat yellow when using flat colors) and advance to the next level
There's a timer at the bottom of the texts ("TIME: ") so have fun speed running if you want to! Just comment a screenshot of your time.
Hope you enjoy!
@BananaJellyfish ya, its four directional. Also, i made a game for the ScoreSpace #12 game jam, the files for it are here: https://github.com/AndrewDMorgan/Switch-em-up/blob/main/README.md you might enjoy it if you can run python3 on your computer. The issu is replit cant play sounds.
@BananaJellyfish Well, the sound situation on replit has changed, i saw the new news letter thingy in my email and it said replit now supports sound and references pygame for sound implementation, thats what im using for sounds. but the issu of space will still be an issu. Also, replit runs pygame SUPER slowly.
@Luchadordragon My computer is a newer one and i guess it cools in a different way so theres no loud fans (no fans at all). Before it i had to listen to vrrrrrrrr for so long. I think my cpu wants to light on fire. I'm currently running a program and I'm using 100 threads. i think my cpu is crying right now.
something interesting: at the last level(the end level), there is no yellow door. if one was placed in the level and interacted with, the game will crash.
@MrDumbGuy Thanks! It's not a you thing, browser environments are slow, on my desktop i can run res 2 with textures and not dip bellow 20 but on repl i have to be on no textures res 6 to get ok performance. It also varys from 60fps to 5fps to 25fps. Basically when running it on a browser, it's slower and the fps isn't as stable.
there's one thing i have never understood about raycasting. how is it 2D? i know you can't look up or down, but apart from that it seems pretty 3D to me.