Riding the hot wind of my successful POC2, I jumped straight into POC3: Feature Parity within Game Maker's Box2d Physics Engine. Using the physics engine solves a bunch of problems with POC2, like object collisions feeling unimpactful player craft handling feeling 'floaty' and player pawns getting stuck to walls. It also opens a lot of avenues for novel game play, where I can introduce props and objects with interacting physics effects, like gravity wells, chains, oil, etc. And let's not forget that it will also make it easier to implement player-built craft! So this is something I want. Baddly. I've been spending a few hours on this migration every day, and the biggest hurdle I'd faced so far was implementing Time Throttle (go figure). Game Maker's Box 2D physics engine is *very* particular about the way it allows you to interact with physics objects, and cutting the frame rate of the game does not work. At this moment, I am 90% of the way there. I am able to 'simulate' a global slow by iterating over all objects in the game, and applying an appropriate value to each object's 'time_modifier' variable. This variable is then used within each object to dictate it's motion and behavior. For example, when the 'time_modifier' variable changes by X%, a proportional force is applied to the moving object, slowing it's motion by X%. When the 'time_modifier' returns to normal, that change is tracked as well, and likewise a force is applied to the object to speed it back up. There's a little more going on, but that covers it pretty well. All in all, it's generating the effect that I want! Except... my cannon balls aren't inheriting the functions that change the 'time_modifier', and without that... there's no change to the motion. It's an issue with inheritance. I'll get it sorted soon, and then I'll post a new video. ... Actually, since I just wrote that down, I went to my cannon_ball object to check it's inheritance, and sure enough, it was NOT inheriting step events from its parent. So that would pretty much do *exactly* want I described. So... now I have that problem solved! And following that, I performed a little code clean-up, a few bug-fixes, and VOILA! POC 3 is Complete. |
Good Idea Games >