[GAME][iOS][Android] Stuck in the Dark

[GAME][iOS][Android] Stuck in the Dark
0

Hi All,

Finally porting of Stuck in The Dark, from cocos2d to cocos2d-X, is finished and the game is now available on AppStore and PlayStore.

Stuck in The Dark is a survival game where you have to keep your calm when everything falls, move fast when it’s time and survive in the middle of rocks, enemies and lava.

Here is also a preview of the game: Stuck in The Dark Preview

I’d love your feedback and thanks to cocos community for the precious help on forum.

website: www.eagletap.com

Congrats. Can you tell everyone how the port went? Obstacles/challenges, etc?

Thanks @slackmoehrle

Sure, with pleasure. I will try to give an idea of ​​the work done and about the impact that such a job of porting can have in terms of effort.

The initial decision made was to create a new project from scratch with cocos2d-X 3.17 and gradually integrate all the various elements of the existing game into it.

Porting was not difficult but it took time because a lot of changes were made.

Here is a summary of the main activities carried out, some design choices made, obstacles encountered and some brief comments:

  1. From ccb to cpp files:
    we have chosen to convert all the elements of the game (scenes, objects, nodes, particles, etc.), created in SpriteBuilder and contained in ccb files, in C++ objects without the use of other graphic tools. Consequently all the initial parameters of each single object (position, anchor point, scale, opacity, etc.) have been implemented by code directly in the corresponding objects (.h/.cpp).

  2. Replacing Soomla with SDKBOX IAP plugin:
    for in-app purchase management, the cocos2d game used the great soomla-core library for iOS. In the new version instead the SDKBOX IAP plugin has been integrated plus the encrypted data management (for example, a new DataManager, DataStoreInterface and IAPManager have been created).

  3. Reformatted and optimized objects:
    several algorithms have been improved with a more modular redesign and better management of objects inheritance.

  4. Support of new devices requirements:
    obviously redesign has allowed to test the game with the new devices and the new features (for example the support of the safe-area of ​​the iPhone) and this has been a further time to put into account.

  5. Bug fix:
    have been fixed some bugs found in the management of collisions between objects and some operations in general.

  6. Collision management:
    collision management has been rewritten and improved. Moreover, some PhysicsBodies have been changed. In cocos2d, for example, I used “bodyWithPillFrom”:

*+(CCPhysicsBody ) bodyWithPillFrom:(CGPoint)from to:(CGPoint)to cornerRadius:(CGFloat)cornerRadius;

which is not found in cocos2d-X. However this was not a big obstacle because there are many tools for generating physics shapes.

  1. Acceleration:
    acceleration management has been rewritten, improved and simplified

  2. UI refactoring:
    new scene objects were created and some sprites improved

  3. Game asset:
    all the graphic and sound assets have been reused (apart from creating new .ogg files for android).

  4. Spritesheet:
    the automatic creation of SpriteBuilder spritesheets has been lost but with TexturePacker it has been possible to have more options and more control over the generation of the output spritesheet

These are the most important activities. I hope this brief summary can help those who have to do a similar job. :slightly_smiling_face:

1 Like

@eagletap this is great. Thank you. I’m sure others will benefit from this information.