Nov 262012
 

EPhysics has been vastly improved since it reached E project’s repository, a few months ago. Most of the road map was implemented, including the release of a game based on it, Escape From Booty Bay. It means EPhysics now support soft bodies and cloths, uses threads, works with the concept of Camera, has helpers to make it easier to use, has a sandbox tool to test scenes without coding and even supports 3D scenes somehow. Details are presented below with screenshots and video.

3D scenes

Perspective: Applying perspective to the camera allows developers to create more realistic scenes, setting the “infinite distance” point and focal distance.

Light: It’s possible to set an environment light and a light point, that can be moved around. Light colors can be changed as well, producing really interesting effects. Bodies that should be affected by light can be configured by the user.

It is simple, having some limitations worth mentioning: it doesn’t support light absorption, refraction or reflection and bodies don’t make shadows over  others.

Primitive types faces: Instead of just setting an Evas Object to each body, support to setting objects for each face of the primitive types was implemented.  So you can have different objects in each one of the six faces of a cube.

Soft Body

A soft body will deform when colliding with other bodies and when suffering specific types of impulse, handling with its mesh. Its hardness and bending constraints can be set to simulate different materials.

Have you always wanted to have a soft button in your software interface that deforms depending where the user press it ?

OK, now it’s possible.

Cloth

A cloth is a kind of deformable open mesh. It can be used to make objects act like pages or flags.

Sandbox

Sandbox is a tool to make it possible to test how bodies will interact under specific conditions. So it’s possible to modify world and bodies attributes  easily, set velocities, apply impulses, forces and see how they interact without a single line of code. Sometimes fine tuning physics scenes is harder, and  tools like that should avoid time spent in many “small code changes, build and test” cycles.

Marina Proni helped designing this tool, and she has posted about its development under a designer point of view. Article in Brazilian Portuguese.

Camera

A camera defines the region of the physics world that will be rendered on the canvas. It sets the point of view. Can be set to follow a specific body or apply  custom perspective.

More

Many helpers were added, so instead of setting body’s mass, for example, it’s possible to set its density, or even its material, so properties like density,  restitution and friction will be set considering default values. Many default values are exposed as well to make developers life easier.

Documentation was heavily improved, with the entire API covered, and many explained examples. A nightly build is now accessible on Enlightenment project site.

Future

We are currently focusing on make its API stable to be released in 1.8 cycle, fixing bugs, and discussing a proposal to support physics on Edje in e-devel  mails list.

p.s.: This post is dedicated to David Seikel, always following the development of EPhysics.

Sep 112012
 

Escape From Booty Bay (efbb) is the newest game made using the Enlightenment Foundation Libraries. It’s a physics puzzle game in which players operate a cannon to stop pirates escaping from the prison. As players advance through the game levels, difficulty increases and new challenges are placed, like firing against moving targets.

The main goal of this game is to test and demonstrate the usage of EPhysics. EPhysics is a library that integrates the EFL and Bullet Physics. More details can be found at this post.

I’ve being working on this game here at ProFUSION with Ricardo de Almeida Gonzaga (software developer) and Marina Proni (designer), while Leandro Dorileo and I continued the development of EPhysics, adding new features and fixing bugs. Great job, team!

Its initial version reached SVN last week, and can be checked out with:

svn co http://svn.enlightenment.org/svn/e/trunk/GAMES/efbb

Building instructions are on the INSTALL file.

In case of doubts, #edevelop at Freenode is a good place to ask.

Bug reports, patches and new levels are very welcome.

Jun 262012
 

EPhysics, a fresh new library is reaching Enlightenment project’s SVN repository today. It’s a wrapper between Bullet Physics and EFL to add physics effects in a simple way.

It’s possible to checkout it from our SVN repository:

svn co http://svn.enlightenment.org/svn/e/trunk/ephysics

The video covers the tests that are included in our source code, as one can see the code is pretty simple to an EFL programmer and we expect them to adopt EPhysics to create their next splash screen, transition effects and even more games!

Why Bullet Physics?

Bullet Physics is a very well established physics engine. It’s stable, fast and simple to use, licensed under a permissive license and packaged for most distributions. It’s used by many big companies for games and movies such as Sony, Disney, Activision and Rockstar Games.

How is it structured?

It’s possible to create a World and add many Bodies, that can be represented by Evas Objects. These bodies have physical attributes such as mass, friction and restitution and shape. They may receive impulses and collide between them. Events occur when something happens, as a body moving, two bodies colliding, or the entire world getting halted (all the bodies stopped). The following diagram should help to make it all a bit clearer.

Everything is documented using doxygen, so you can build documentation with:

$ make doc

or access it online here. It’s just a temporary place until it reaches our project’s server.

And much more is coming. On our roadmap we have:

  • Create collision shapes from image;
  • Helpers to help the physics inexperienced people to define attributes and use it;
  • Sandbox tools to try different materials / properties in a live, what-you-see-is-what-you-get way;
  • Deform objects;
  • Adding camera concept (POV);
  • Creating a game

A more extensive list can be found at TODO file. Adding support to physics effects on Edje is planned as well, making it possible to configure physics environment and reacting to events.

So if you liked that, give it a try. I’ll be glad to help. Bug reports, reviews, feature requests and patches are very welcome. I’ll try to post a tutorial on creating applications with EPhysics soon.