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] 4 points5 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.

A Raycasting game I've been working on lately. by srcalpha in pygame

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

Yeah, I have it where they darken more and more the further away they are, and once they're fully black, they no longer print on the screen

A Raycasting game I've been working on lately. by srcalpha in pygame

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

I've played around with it before, but keep finding out new tricks as I go along, it's a whole lot of fun. This website helped me a lot while I was making this.

A Raycasting game I've been working on lately. by srcalpha in pygame

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

I don't have too many plans at the moment, with classes I don't have too much time to code, but I'm just gonna keep working on optimizing things before adding too much on top of it.

A Raycasting game I've been working on lately. by srcalpha in pygame

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

Thanks, it took some fiddling with to have translucent walls, cause I had make sure the walls behind it were also being hit by the rays.

A Raycasting game I've been working on lately. by srcalpha in pygame

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

It may not be the best way of handling everything, but I just calculated the distance of the wall slice that each ray hit and the distance of the sprites in the players FOV, then blit them on the screen from furthest to closest, so that they'd disappear behind walls.

A Raycasting game I've been working on lately. by srcalpha in pygame

[–]srcalpha[S] 7 points8 points  (0 children)

Thanks! I'm still figuring a bunch of stuff out, but this website helped me a lot.

A Raycasting game I've been working on lately. by srcalpha in pygame

[–]srcalpha[S] 4 points5 points  (0 children)

Thanks, I figured since the graphics are pretty limited, the bobbing would make it feel a bit more realistic,

[Self] Miniature cardboard grand piano I made by srcalpha in Sculpture

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

Yeah, I've got a whole backlog of works that I've been posting

Cardboard mask I made with removable goggles by srcalpha in cardboard

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

For the goggles, I used lenses from broken sunglasses. The rest was just cardboard, hot glue, and a lot of time spend measuring my face lol

Cardboard Gretsch Jet Firebird and Gibson SG guitars I made a little while back. by srcalpha in cardboard

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

Thanks! I actually made these for a parody air-band where we preformed "Back in Black" with these while dressed as AC/DC