Raycaster Sandbox
- 11 Devlogs
- 28 Total hours
A ray casted game similar to Wolfenstein 3D. Don’t know what it will be about though.
A ray casted game similar to Wolfenstein 3D. Don’t know what it will be about though.
I implemented entities in the game! They’re kinda jank though and there are a lot of bugs which I have to fix. I mainly relied on Lodev’s tutorial and formulas for implementing entities. I still don’t 100% understand it but I am being to grasp it somewhat. I hope to do mostly polish and fixing various bugs. Namely the bug where the entities for some reason disappear when the player rotates.
I changed the code so that each wall can have four individual wall textures and the image below demonstrates this! I decided to make some huts for it and I think it turned out great! In my last devlog I said that I was going to implement entities next. However, that turned out to be super hard and it drained all of my motivation so I decided to implement this in the meanwhile. I hope this explains why I have like 4 hours of coding in but nothing to show for it lol. I tried to use a bunch of resources for implementing entities but they’ve all been confusing and I really don’t wanna just copy code so if anyone has any advice on this it would be much appeciated. Anyways, I’m probably going to clean up the code and have another crack at making entities. I also kinda want thin walls as a option also soon.
Hello again! Its fall break for me so I can now lock in on this project!!! YAYAY! In my last devlog I thought that september was the deadline for stardance but I was kinda wrong lol. Anyways in the project I replaced my angle calculations with vector math which fixed the warping I was experiencing along the edges. This was possible with Lodev’s tutorial which is an amazing graphics guide. I also added a small shadow along the north and south side of the walls. I hope that I can release a working project by the end of the fall break. Next feature will hopefully be entities.
I can’t believe that the hack club is almost over! I kinda realized that I would not be able to ship this project within the end date of September 30th especially since I got a bunch of schoolwork. It has been an amazing experience being able to participate in this Hackathon! I had so much fun and it was very cool to actually use the Python skills I developed last year. I’ll still be intermittently working on these projects and updating them. Thank you guys so much for actually seeing my projects!!!! BYEEEEEE :3333
I was trying to figure out hot to draw floors and I was just testing drawing a bunch of 4x4 pixels on the lower half of the screen before grabbing the pixel texture with the converted 2d position. But apparently it turns out that drawing over 20,000 pixels over and over every frame is detrimental to performance (who knew!) I gotta figure out how DOOM does it before I implement it lol. Nothing new other than that though. (except for importing the all-important anti-gravity ofc)
I figured out collision! There is probably a better way to do it but it allows for wall sliding which the other system didn’t allow. Now you can stick your face into a wall and slide off of it! It works by checking adjacent tiles and comparing that to the player’s position in the tile. Technically in the system the player isn’t moved to exactly the wall’s plane but instead a little back but this was put in to avoid scaling errors with the wall textures. I gotta think about what I want this project to really become though. I want room over room and probably the walls to be thin slices rather than huge blocks. But I gotta figure out what I want first.
I fixed up the texture system a bit and added some new textures! The textures still look weird at a distance but I’ll deal with that later. I’m working on collision right now. Also! New Backroom texture drop!!!!
I added textures to the walls! They’re kind of broken however. This is because the code that grabs the texture position is kinda jank. The screenshot below shows the textures I’ve added. I also changed the sky and floor back to solid colors since it looks happy now :D
Hello! Its been awhile since I’ve posted. School just started up and it took a lot of time out of my schedule. Anyways, I’ve implemented the DDA algorithm into the raycaster. It was very hard and it took a bunch of resources/tutorials before I understood the underlying logic. But it was worth it because it makes the walls look 100 times better while also making the game way faster. I also got rid of collision for now because how it used to work was kind dumb since it didn’t allow the user to “slide” off the wall if going in a diagonal direction. So I’ll come back to that soon. Anyways, I hope to also soon add textures to the walls, floors, and celling. I also hope to add a infinite world and a save/load system. NPCs will also come too.
I added the ability to walk sideways and added some essential features like not being able to walk off the map. I also cleaned up the code. I wanted to put the image below just to show the repercussions of not using DDA in a raycaster. It looks all jagged because my rays are moving at fixed intervals instead of moving from grid space to grid space. This causes the ray to detect walls irregularly. To fix this, you would need your ray steps to be incredibly small (very laggy) or implement DDA. The next devlog should be me implementing it hopefully!
I’m making a raycaster and so far I’ve got the essentials down. I added a editable map, a raycaster, and basic collision. I have not implemented the DDA algorithm yet because I don’t totally understand it but once I do I will implement it. Will also add a bigger map; textured walls, ceilings, and floors; npcs; objects; and other cool things. Right now I decided to make it look like the Backrooms for fun. I’m thinking this game could take place in a city.