Dev Log: Platforming Frustrations!
Game development ain't all birthday cakes and flowers as some may have you believe. As I move forward with this platformer game I'm realizing how much I actually don't know about platforming! You might think I know a lot with so many platformers under my belt, but now my ideas are way outpacing my abilities as a programmer.
Right now I'm trying to code this system and I'm making little to no progress even though a lot of code is being written. For example I'm currently working on the structure of how objects will update. The simplest way at first is to have each object go through its platforming operations one at a time in their execution order, but this leads to weird issues down the road. An object higher up in the order will have priority over other objects, and this is not something I want!
My new approach is to have each object update in parallel with one another, one pixel at a time. Each object will calculate its speeds and then buffer them into their remainder. Then a PhysicsHandler object goes through and moves all of the objects one pixel at a time each in parallel. This might not make any sense at all, but it's a set up for objects being able to push one another. For example if two moving objects collide, I want them to collide in the right spot, and I think the only way to do this is to move them one pixel at a time in parallel.
So I'm also working on the ability for objects to push one another. I have a simple box that I want to be pushable, but also solid so that objects can stand on it, and also I want it to be carried by other objects as well... but so far that is presenting a lot of challenges for how I've already coded things. For example I have no idea when I should be registering collisions on the side of a moving object now that objects can be pushed.
My assumption was that when I went to move one pixel to the side I could simply check for a pushable object and push that object to the side... however with the current way I check for surrounding collisions the results are not quite what I want. If an object can both collide with, and push the same object, the push only happens for one or two pixels and then the pushing object believes it's in front of a wall so it no longer moves.
As you can see I've already rambled for a number of paragraphs and I feel I haven't even scratched the surface of what's going on! I've been looking at my old Game Maker games platforming code to see if I can learn anything from my past self, but unfortunately the code leaves a lot to be desired. In Verge I did have boxes working that could be pushed, carried, and stood on, but I didn't cover a lot of corner cases and designed levels around not having huge bugs appear. I'm totally sick of designing levels around bugs though and I want to do this right! Unfortunately that means I'm driving myself insane as I try to handle all the possibilities I can imagine with this platforming engine.
I'm not feeling super great and I feel like everything sucks right now, but I guess I'll keep working on stuff and hope I can figure out small bits of it at a time.
Right now I'm trying to code this system and I'm making little to no progress even though a lot of code is being written. For example I'm currently working on the structure of how objects will update. The simplest way at first is to have each object go through its platforming operations one at a time in their execution order, but this leads to weird issues down the road. An object higher up in the order will have priority over other objects, and this is not something I want!
My new approach is to have each object update in parallel with one another, one pixel at a time. Each object will calculate its speeds and then buffer them into their remainder. Then a PhysicsHandler object goes through and moves all of the objects one pixel at a time each in parallel. This might not make any sense at all, but it's a set up for objects being able to push one another. For example if two moving objects collide, I want them to collide in the right spot, and I think the only way to do this is to move them one pixel at a time in parallel.
So I'm also working on the ability for objects to push one another. I have a simple box that I want to be pushable, but also solid so that objects can stand on it, and also I want it to be carried by other objects as well... but so far that is presenting a lot of challenges for how I've already coded things. For example I have no idea when I should be registering collisions on the side of a moving object now that objects can be pushed.
My assumption was that when I went to move one pixel to the side I could simply check for a pushable object and push that object to the side... however with the current way I check for surrounding collisions the results are not quite what I want. If an object can both collide with, and push the same object, the push only happens for one or two pixels and then the pushing object believes it's in front of a wall so it no longer moves.
As you can see I've already rambled for a number of paragraphs and I feel I haven't even scratched the surface of what's going on! I've been looking at my old Game Maker games platforming code to see if I can learn anything from my past self, but unfortunately the code leaves a lot to be desired. In Verge I did have boxes working that could be pushed, carried, and stood on, but I didn't cover a lot of corner cases and designed levels around not having huge bugs appear. I'm totally sick of designing levels around bugs though and I want to do this right! Unfortunately that means I'm driving myself insane as I try to handle all the possibilities I can imagine with this platforming engine.
I'm not feeling super great and I feel like everything sucks right now, but I guess I'll keep working on stuff and hope I can figure out small bits of it at a time.
Post your comment!