You are browsing as a guest. Sign up (or log in) to start making projects!

4h 59m 58s logged

Unnamed Platformer - Devlog 5

I pretty much spent the last weekend working entirely on button-related stuff. Turns out there were a lot of bugs and other physics-related issues I had to address. Anyway I think they’re all good now.

What I did: Day 1: I fixed a bug where nested loops using the same name (pos) caused only the first pushable block to register collisions. I also implemented a side-detection fix so the player doesn’t accidentally push blocks when standing on top of them + added a border/outline to pushable blocks for visual clarity. I also started work on button and door tile classes.

Day 2: I made it so you can push blocks vertically in zero-gravity. A really big fix was a global physics bug. I had been using a gravity called blockgravity for block physics, but since it was a global variable, one block’s position dictated all the other’s physics. E.g. one block in a zero-g tile meant everything else was now unable to fall. I moved blockgravity into the block class and now a block entering a zero-g zone floats without shutting off gravity for every other block on the map. I also decided on two new features: a button that can be stood upon/have a block placed on it, and a door that opens when its button is pushed. I added each one’s sprite and loaded them into my map. Also, I made another big change to my plans: having spend so much time on block physics, I’ve decided they’ll become a core feature of the game and not just a small gimmick of the triangle shape.

Challenges: The hardest problem (by miles) was the block push collision. the issue turned out to be one loop variable shadowing another, which meant only the first block in the list was ever processed. Another tricky bug was zerogactive being reset before the block push loop ran, meaning zero-g vertical pushing never triggered. Ironically I ended up removing the zero-g check because if you’re going to push a block vertically, you’re not going to be on solid ground anyway. Also I accidentally mismatched curly brackets so that made life a lot harder. Also, I faced a bunch of other bugs while trying to polish up collision.

Imma be honest, about an hour or so from this devlog was useless cuz it was me trying to implement a solution, confusing myself, and just discarding all my changes😭💔 Also, I spent like 20 minutes trying to get the button looking good (it’s supposed to be an octagon, but the sides are uneven).

AI used, if any: I used Claude for debugging my physics code, as well as helping me figure out why the upwards/downwards block push wasn’t working.

Plans for next time: I’m going to try and begin implementing the 5 player shapes and their power-ups. I’ll start with the circle probably, since it seems the simplest (just get faster over time). Also, I’m going to make it so that each button actually is linked to a door, since right now they’re just visuals.

K bye guys

0
3

Comments 0

No comments yet. Be the first!