Archive for the ‘Physics’ tag

BADJ Day 5: First Balance

Vlad here to make a balance of this first week of development. It was my plan to show the power of Nape wrapped in Bold Pixel but it was not possible. So I decided to write a balance, sort of a week post-mortem! :)

What went right

Nape went right! I couldn’t be happier about it! It seems that Luca didn’t forget anything.

The project is superbly organized. From a coder point of view, everything is accessible and integrated, I managed to have debug, release and testing projects all-in-one (should make a tutorial about that!) in Flash Develop and that really raises my current and future productivity to a whole new level. We’ll see how it works for Marco and David, but I think it will be alright.

What went wrong

Basically, it was a slow start. The physics wrapper is in the “almost there” for a couple of days, which means it is taking a couple of days too long. There is a good side though since objective for the wrapper at this point was to just start it and almost all functionality is present and totally abstracted, so we might squeeze some development time from it in the future.

Both me and Marco had some non-Bruce-Ali stuff to manage… that took some time too, but it was worth it since it would bug us sooner or later, so might as well be sooner!

Next week

I really want to move on to the gameplay. That will introduce several systems Marco wants to use and that I want to build ASAP.

On a personal note, I admit I feel somewhat rusty… too much time without developing any larger game project I guess, but I’m hoping (and this is mostly a personal desire) that during next week I can shape up again.

See you again next week!

Posted: September 25th, 2010
at 12:03am by Vlad

Tagged with , , ,

Categories: Dev Journal: Bruce Ali

Comments: No comments

BADJ Day 3 (and 4!): Physics continued


Nape wrapper is almost wrapped… pun intended, but first, apologies for the missed day 3. While Marco was working on the Hajime trailer I was surfing the waves of wrapping a physics engine. Before moving forward, a big thank you to deltaluca for helping out!

Although not necessarily final, the current wrapper consists of:


This class basically controls the behavior of Nape’s space. Due to its nature, Nape wants simple things to be done quite often, for instance, if you want to change gravity, you need to wake all objects. Core does these small things for you.


Physics entities basically wrap Nape’s bodies. The abstract entity (if you don’t recall how we are using abstract classes in Bold Pixel, check this out) will offer most if not all of the functionality. Although this means that the class is not really abstract, it also means that classes that inherit from this can and should be used as presets. Currently we have a simple box, simple circle, core walls and a explosion.

As time goes by more and more presets will be built, that’s the whole beauty of it!

Debug View

This class allows for fine lines to appear on screen so we can degub objects positions and so on. Quite useful for blit, not that useful for display objects since it uses Nape’s assignGraphic method. The debug view observes if there is a display object assigned before drawing the debug sprites. This means that if a object is already skinned, it won’t have a debug sprite.

A simple test

The SWF below uses the wrapper exclusively. The walls are a non-skinned PhysicsCoreWalls object. The light wood boxes are also non-skinned so we can see the debug sprite, but the bitmap is handled manualy. The objective of this is to show how blit objects will look if debug sprite is present. The dark wood boxes and the rock circles are a normal body with a assigned graphic, so, no debug sprite is created.

Plans for tomorrow: have a bang with Nape… almost literally! Until then, click the SWF underneath to watch a simple simulation.

Click the SWF above to see the test…

Posted: September 24th, 2010
at 1:08am by Vlad

Tagged with , , , , ,

Categories: Dev Journal: Bruce Ali

Comments: No comments

BADJ Day 2: The Nape Wrapper

Hello again.
Like the previous days, I can’t really say we are already on full speed with Bruce Ali, mostly because there has been some loose stuff on other projects we had to deal with. After lunch I was able to pick on something that was on my task list for sometime: the physics!

We will be using Nape for physics. Nape is a physics engine developed by Luca Deltodesco (aka deltaluca on FGL and Nape’s forums) that focuses on performance. For more about Nape, visit also the Project Page on Google Code and the Documentation.

We’ve been authorized by Luca to make Nape a part of Bold Pixel. In order to do this work, Bold Pixel releases (starting at v2) will include the AS3 SWC and our own wrapper. The wrapper is being designed to provide presets, easy management and a debug view that can be integrated with both other pieces of Bold Pixel (namely and most evident good use is the blit engine) or a typical Flash/AS3 project. Obviously it will have a lot of conventions and to make full use of Nape you’ll need to know how to use it, but the worst case scenario is that any coder will much less code to write and maintain.

We wish the best of luck to Luca and wish we can pull a lot from Nape and Bold Pixel. As soon as we have a tech demo of what we are doing with it, I’ll post it.

See you all tomorrow!

Vlad out!

Posted: September 21st, 2010
at 11:12pm by Vlad

Tagged with , , ,

Categories: Dev Journal: Bruce Ali

Comments: 3 comments