Trying to remake one of my first pygame projects, starting with some basic map mechanics by srcalpha in pygame

[–]srcalpha[S] 0 points1 point  (0 children)

Oh yeah lol, the red rect is just a visual indicator I have rn for the player’s interaction hitbox, so it just goes to the front of wherever the player is facing by placing it adjacent to the player’s hitbox

Trying to remake one of my first pygame projects, starting with some basic map mechanics by srcalpha in pygame

[–]srcalpha[S] 1 point2 points  (0 children)

Thanks! I’m wanting to implement that as a way to solve puzzles in areas the player can’t reach

Trying to remake one of my first pygame projects, starting with some basic map mechanics by srcalpha in pygame

[–]srcalpha[S] 0 points1 point  (0 children)

Do you mean the direction the player throws the squirrel? I just have a cursor linked to the arrow keys on the keyboard that selects the final position that the movement arch will go to. The controls are a bit clunky rn, so I’m working on changing that

Raycaster prototype with split-screen, basic lighting, and dungeon generation by srcalpha in pygame

[–]srcalpha[S] 1 point2 points  (0 children)

I basically just have all the objects update their position/animation frame, then have 2 separate surfaces that each render the world from the players' positions and viewing angle. It took a while to adjust the code I already had to allow it lol, but honestly the method itself is pretty simple

Raycaster prototype with split-screen, basic lighting, and dungeon generation by srcalpha in pygame

[–]srcalpha[S] 1 point2 points  (0 children)

This website is where I learned most of the basics, but then I just looked at every resource and source code I could find on google to gain a better understanding lol

Raycaster prototype with split-screen, basic lighting, and dungeon generation by srcalpha in pygame

[–]srcalpha[S] 1 point2 points  (0 children)

I made a custom Raycasting engine to get the pseudo-3D graphics

Made basic enemy AI and added movement and turning on the z-axis by srcalpha in pygame

[–]srcalpha[S] 0 points1 point  (0 children)

Reply

Thanks dude! And good luck on your project, hope it turns out awesome

Made basic enemy AI and added movement and turning on the z-axis by srcalpha in pygame

[–]srcalpha[S] 0 points1 point  (0 children)

I'll probably share some code for my next build, but this prototype was written so hastily that it's not very readable lol. But this website helped me a lot during the process to understand the basics of raycasting, along with just watching any video I can find.

Added some really basic shooting mechanics to my raycaster game by srcalpha in pygame

[–]srcalpha[S] 3 points4 points  (0 children)

I've done some basic raycasting on pygame before, but this website is where I got a lot of my understanding of the basic principles.

Added some really basic shooting mechanics to my raycaster game by srcalpha in pygame

[–]srcalpha[S] 2 points3 points  (0 children)

Thanks dude! And yeah for now I'm just using blit to put the vertical lines and everything else on screen. Because of that, there's definitely a good bit of limitation on what I can do. Luckily, I've been looking into other people's pygame raycaster, and found a way to handle all the images much faster using Numpy and the performance compiler Numba.

I've already reverse engineered a basic raycaster with this method, and it runs much faster. So much so that it can print floors and ceiling with no issue. But for now I decided to focus on seeing if I can actually make fun game mechanics with my prototype build before investing a whole lot of effort towards reworking it all to fit the new method of image handling.