Monday 22 September 2014

New project with new engine

A month ago, suddenly a game idea popped out in my head. To proceed with the idea, I got a producer friend to help with with the game. Everyone was interested with the idea I had and now we already have a small team.

While I wasn't sure the artist situation, the game engine has been decided to be Cocos2D-X. These past weeks I have been playing around with Cocos2D-X physics and last week I finally finished our prototype. I couldn't say much about the project I am working at the moment. I can only say that we target to release this game on mobile device.


Before I started this project, I thought this will be a quick project. Yes, this game was small. I didn't intend to make it a big project since the beginning. The main problem is the time. I thought that since now I have no class and I am only staying at home while waiting for my green card application, I will have a lot of time at hand. Unfortunately, that's not the case. Stay-at-home does mean you have a lot of time at hand. In the same time, you also have a lot of distraction around. My main distraction, unfortunately, is my other hobby: making handcrafts and cooking/baking. I also have to spend some time doing house chorus and looking for a job. Now with the main mechanics done, I am committed to finish this project no later than the end of next month.

Back to Cocos2D, the main reason we chose it is the programming language used. I am already familiar with C/C++ and Cocos2D-X use C++. The main challenge, as always with new game engine is to understand the engine especially the physics. So far I learnt this language from the test included in the engine. My first big challenge is the physics. I decided to use the Box2D physics engine. I wasn't sure if this is a good choice. Box2D is no longer maintained by Cocos2D. Still, I decided to use this engine for the simple reason: it has more test example than chipmunk.

More example means easier to understand, right? Yes, that's right. However it doesn't mean quicker to implement. In the last 2 weeks I spend hours trying to find why my physics won't work while I basically copy it from the test examples. It wasn't until I notice another example with pixel-to-meter ratio, I realized the force needed to move an object is ridiculously huge if I didn't reasonably scale it to meter. In other words, the unit used by the renderer and the Box2D physics engine is different. You need to scale it down with a reasonable ratio for the physics to work with reasonable force. I am glad that now the physics is working. Time to go to next stage! Polishing, polishing, polishing, and in the near future publish it.

No comments:

Post a Comment