Unnamed Platformer - Devlog 6
Guess what? More block physics issues! I’m gonna lose my mind!
What I did: Implemented logic with the buttons and doors; now, being on a button opens a corresponding door. Also fixed EVEN MORE BUGS with block pushing logic. I also resolved block-block vertical clipping and horizontal stacking bugs. I replaced the ground collision function I had made with a manual check for blocks landing on other blocks; groundCollide (that function) was not accounting for if a block landed on top of the player. This fixes vertical clipping through players and blocks and unintentional behavior with horizontally stacked blocks.
Additionally, I added a system to make sure you can’t get crushed by a door too. When I first discovered that could happen, I implemented a half baked system, but it didn’t work since it pretty much made the block/player fall through the door even if the button hadn’t been pressed prior. I replaced the old block-crush prevention logic with a new system. Now the button class has another variable, presscheck, which acts like sticky keys (idk how else to put it) even after you’re not on the button. It checks for if a player or block is within the closed door’s hitbox and if so props the door open until they leave, but it can only register that after you push the button.
Challenges: Buttons not changing color; color change logic was in my constructor and not the draw function so it never updated. Other than that, general implementation was also tricky to plan out because I had to decide how they were gonna work (how buttons would be linked to doors; decided on an ID system) and then how to implement that (using dynamic casts just as my button class uses). And then the block clipping glitch was another nightmare, though it did take me less than an hour which is nice. Also, it took me a while to think of how I would figure out how to make doors not close on players/blocks, but I thought up a solution pretty quickly which is nice 👍
AI used, if any: Used Claude to help me figure out the part that stops the block from falling through the player (I was genuinely™ too exhausted with dealing with bugs to try to solve it myself 😭😭) + used Gemini and a bit of Claude for general debugging.
Plans for next time: I’ll polish up some visual stuff, but I think I’ll leave block-related bugs alone for now. As you can see there are some clipping issues still with the door, but idk if I want to tackle those right now. Either way my main focus for next time (and like all of the next week or two) will be getting the shape-switching system down. I’ll also try to create some map layouts that force the player to utilize block placement on buttons to navigate doors, because it would be a shame for me to have spent all my sanity on a feature only like 5 levels use.
K bye guys
P.S. Last time, when I said I spent all weekend working on button-related stuff, I meant the pushable blocks too (since those can activate the buttons)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.