Search code examples
javascripthtmlhtml5-canvasgame-enginemelonjs

melonjs-api wont load my map and receive no error


Im following the tutorial: http://melonjs.github.io/tutorial/ At the end of part 2 you should be able to see your map.

Melonjs just loads and stops, i get no error. my files: http://nicksegers.be/game1/

I did teh tutorial 3times and just cant get it to work. Always the same thing.


Solution

  • You need to edit the last line of game.js to display PLAY instead of MENU.

    // Start the game.
    me.state.change(me.state.MENU);
    

    Change to:

    // Start the game.
    me.state.change(me.state.PLAY);
    

    I opened an issue on their tracker: https://github.com/melonjs/melonJS/issues/402