Creating a 2D platformer game

Hi Cocos2D-x . I’m new to game development.
i would like to create a 2d platformer game like megaman, super mario, and sonic
i have a few questions :

  1. am i able to create 2D platformer game with current v1.0.3 of Cocos Creator?
  2. how to move the camera following the character?should i remove the canvas?
  3. how can i create a save / load game data?
  4. how can i create a storyline?
  5. is there any tutorials of cocos creator beside the documentation available?
    thank you for your help :smile:

It’s easy.

do {
  write
  test
} while(!ready)

:smiley:

I think there is a long journey before you. Google helps by most problems. Think simple, try to reach your goal in small steps. Good luck.

3 Likes

well the first thing that comes to mind would be ray wenderlichs tutorial:
https://www.raywenderlich.com/15230/how-to-make-a-platform-game-like-super-mario-brothers-part-1

(no offense but it’s literally the first thing on google if you search for ‘platformer cocos2d’)

Admittedly for a beginner it might be hard if you don’t use ios, but everything done in the tutorial should be possible using cocos creator and javascript.

cheers

2 Likes

thank you for replying. yes i think this will be a long journey for me because i’m totally new to this stuff, i’ll try figuring it out. btw, the do while loop will be used for storyline?

thank you for replying. i haven’t try cocos2d-JS nor cocos2d-x keywords because i read that those have different APIs , so that’s a lot of help from you. i’ll try reading it and try again from scratches. anyway thank you for the link :smile:

No, it,s just a joke.
Programming is coding, testing, and repeat until is not ready.

The game loop is same (the order can change):

do {
  react to input from player
  move and animate actors
  detect and react collisions
  draw graphics
} while (! game over)
1 Like

Hi geyza thank you for the swift explanation.
I want to ask about where should i put the do-while game loop?
Because in cocos creator i figured the scripts can only be used by attaching them to entities or objects.
Sorry for the noob question, i only learnt C++ in my college for a short period of time, so i only have vague knowledge about OOP :S
Again thank you for your helpp :slight_smile:

Try to find the update function in the scene.
I think by cocos creator the concept is the same as here:
http://www.cocos2d-x.org/docs/programmers-guide/2/index.html

hi gejza, thank you for make this clearer. i guess i’ll try from cocos2d-x and cocos2d-js 1st then.