remember that "one post a month" thing i mentioned? haha me neither.
I spent quite a bit of time just brainstorming and coming up with level elements. I wasn't nearly as successful with it as I hoped I would be, and, to my standards, my ideas aren't incredible. but regardless! I made progress.
Here's a sheet with some random notes for possible level elements:
The most difficult part of any of this is just figuring out what I want these elements to visually look like. For the most part these things look alright, but i feel like they could be improved upon. and how they look in my head really changes how I think they should function in-game, and that's the biggest reason why I can't just program things first and worry about art later.
The whole design around the light detector and the tile it sits on is a little iffy. I think the puzzle uses for it are pretty good, but visually they don't convey that instruction too clearly. Or maybe it's actually just a bad puzzle element to begin with.
I'm probably being too hard on myself because It's taken me literally months to settle on this stuff, which is mostly inconsequential design stuff.
Anyway enough whining, here's the light block in-game:
I also added a light boulder. I don't remember why. I'll figure out a target system that relies on different shaped light sources at some point, kinda like how portal 2 has spheres and cubes, and sphere and cube buttons. honestly I can't think of any reason for those to be separated in that game either.. Spheres were a little harder to keep in one place but otherwise, I can't remember.
You may notice I stop for a moment after pushing the block down the slope. That's because if I don't I just walk on top of the block. Also, pushing blocks up slopes its much more annoying because the height of the player's hitbox is less than the width of the box, so it ends up going on your head instead of up on the platform. To remedy this I added a grabbing/carrying system:
(also I recolored the sprites to match the lighting)
The other solution to that problem would be to just have rotating boxes that move along the slope, but I've had this system in mind for a long while so for now I'm just putting this in.
How this system works is actually pretty interesting. First I detect if there's a grabbable object below the player, and if there is and you press the grab button (Z for now), you begin the grabbing event.
Originally, grabbing worked like this:
If you are holding onto a grabbable object, that object's position is constantly set to be below the player, and some values are passed to the player to make its movement different, like lower jump height and preventing movement when on the ground. This is all handled with box2d, and I'm actually pretty surprised that it worked as well as it did and didn't glitch the block through the ground. It would actually stop at the ground and keep the player standing on it, even though its position was being constantly set. It even worked on slopes for the most part. But there was one issue that forced me to use a totally different system: If I moved sideways into a wall with the block, it would clip inside of it.
So I made a new system:
Now when grabbing something, I take all of the collision bodies of that object and add it to the player's collisions, so you're basically now the size of the bird + the object, and I remove collisions for the object and move its sprite around. And when you release an object, the collision body is removed and collision is re-added to the object.
Visual example:
Besides this, I also added a level transition system and effect:
neat and cool
thanks