View Sidebar
 

Post Tagged with: Physics Editor

Physics Editor + Corona

Physics Editor + Corona

Got to spend a decent bit of time working on the game the last couple of days. I decided to refactor the code and put it into a new file. I’ve now implemented it inside an API called ‘storyboard’ which handles having different scenes in an app (eg. a menu screen, game over screen, game screen etc). The code had gotten a bit messy from working on it so I went through and condensed duplicated stuff into functions and cleared out old variables and other stuff that had become redundant.

So now the game is in a nice clean new form now I’ve been trying to nail down the controls. Adding the sliding ability of the player has proved to be a headache. There are so many different scenarios I need to account for during collisions with various things and how that affects whatever action the player is doing at the time. Also to enable sliding using the physics engine I broke the player object into about 5 different physics bodies. The physics engine is a bit buggy and often the player physics bodies will sink into other bodies such as walls etc which can mess the logic that needs to be performed. Also I’ve found that when the platform objects sink into the player object sometimes the player will get caught on one of his other physics bodies so will get stuck on the corner of the platform. I’ll have to keep working the controls to get them nice and polished.

Also decided on how I’ll create the levels. I’ll be using a combo of PhysicsEditor and Photoshop. This way I can draw out the collision detection in a basic transparent png and then map those physics properties on to a more detailed jpg or png art file. Here’s an example:

Untitled-1

This would be the collision detection. I just import this into PhysicsEditor, click ‘Trace’ and it’s done. Now I can make any kind of level section I can imagine. I’m hoping to have interior and exterior segments to add some variety.

Until next time!

 

30 July, 20130 comments