A month ago, we showed a first preview of the new collision detection and physics library. We haven’t stopped since then and we are still working hard to include it in an upcoming release! This new engine was to be based on a new and innovative approach and also was to be capable of solving collision and physics behavior as we have never seen before in Flash. If you haven’t seen the video yet and you are wondering if that is possible? You can find the answer bellow. Thousands of objects, all working at beautiful 60 fps.
From the moment that we obtained the first results, a large smile was put in our faces!
A different approach
Let me talk a bit about the direction we’ve taken. When we looked at some games, we realized that a lot of them, don’t necessarily use physics, or in some cases they just fake it, but most of them have a need for collision detection. That doesn’t mean they don’t use physics, but they may not be simulation games either. Keeping this in mind, we faced the problem from a non-traditional point of view. Just to start, the system must be able to solve collisions in a highly optimized way. And after that, physics behavior may be applied on the objects involved. This approach is far more stable than traditional physics simulations, so it is very important to have a more controlled game environment. What we mean by a ‘controlled environment, is avoiding the unpredicted behavior that you may get in typical physics simulations, but without taking away all the fun
Collisions and objects (the core)
In your app you’ll be able to interact with collisions between different kinds of objects.
The available kinds of collisions are: ray, mesh, sphere and box collision (coming next: capsule, convex hull), and the objects affected by these collisions can be classified into Static, Dynamic, Rigid Bodies and Trigger, each one with its own behavior.
New features will be fully integrated with Flare3D (engine and tools) and you can use physics/collision by code or define properties and behavior in a visual way using Flare3D IDE. The whole development was made “in house”, fully made by the Flare3D Team from scratch, which a ridiculously high performance! This is 100% AS3 (No FLASCC or cross compiling)
Who will benefit the most from the new engine?
We can say that the obvious answer is Game Developers. Game developers will be the group that will take most advantage of the new collision system (Especially those that are doing mobile apps). But, at this point we are sure that it can be used in a lot of other apps, because it provides a unique real solution for collision detection in low performance devices like tablets and smartphones!
The first mobile test
Yellow Planet, our tutorial game that recently was updated to Flare3D latest version, was our first mobile test for the new collisions system. The game is the same, we only optimized the assets to make them “mobile friendly” and we changed the controls to allow game play without a keyboard. In the original version, collisions were the most intensive resource consumer. Now, collisions only take less than 1%
A little help from my (Flare3D) friends
To make your life easier, the new collision engine will be released including a super pack of mini-games showing how to use the new engine in a real project! This will be the ideal starting point for many developers!
Do you want more?
Check out our talk in Flash Online Conference #6 where we talked about Collisions and Physics in Video Games (our talk begins at 4:00:30 ).
Remember, this is not another Physics engine. This is a custom and powerful engine that we did it to make you happier! And we think that we did it