In this post we continue with our previous two tutorials by loading the TexturePacker and PhysicsEditor data into our Corona SDK project. In case you missed the previous two tutorials you can visit them via the links below.
- PhysicsEditor and Corona SDK
- TexturePacker and Corona SDK
You should have the following TexturePacker and PhysicsEditor output files in your project:
- platformshapes.lua (PhysicsEditor, indicating the shapes of each display object).
- platformSheet.lua (a lua file with the definition of your image sheet) (TexturePacker).
- platformsheet.png (an png file with the images of TexturePacker).
In my previous post I introduced TexturePacker to handle a lot of images in a simple way to improve i.e. game performance, the developer of TexturePacker created another program called PhysicsEditor. With PhysicsEditor you can easily trace your display objects so when the object bounce with other objects in your game it looks like the object has the real shape and not some bounding box around it. Often images have a transparent background which determines the real “image”, but when two display objects collide we want to images to collide as there shapes and not a collision of the larger transparent backgrounds. Well, this can be solved with the tracing tool of PhysicsEditor. Besides the tracing, another great thing about PhysicsEditor is that you can set your properties of each individual display object.
In case you’re new to PhysicsEditor, you can download the program here: http://www.codeandweb.com/physicseditor