In Search of Physics
Rooted is starting to feel a little bit, for lack of a better word, too solid. The physics that HaxeFlixel has built in are good enough for a lot of small projects, and we’ve used them on many small projects before. But we realized that Rooted is a game about forward motion, about flowing from one area to another, and HaxeFlixel’s built in velocity just doesn’t have what it takes.
With that in mind, we started working on implementing Nape today. Nape is:
a 2D rigid body physics engine designed for games. Nape is written for ease of development, with a powerful and succinct API that checks it is being used correctly, and reports errors if it is not.
In essence, Nape looks like just the thing for fluid physics and animations on a time frame and a budget. HaxeFlixel seems to make implementation fairly straightforward, and we get a lot more bang for our buck.
We created a new repository to test on. If implementation goes fairly smoothly, then we’ll work on adding it to the actual Rooted project.
Goals for the Rooted physics:
- Needs to support angled corners (for maintaining the character’s momentum)
- Needs to have a “flow”, making slow and methodical play less fun than brazenly forging ahead
- Needs to be flexible enough to allow “power ups” that allow your character to speed through areas or slow down in sludge
- Might be nice if it has support for zooming cameras? Maybe the camera should slowly transition outward as you speed up
Hopefully Nape will help with these goals. Time will tell!