Skip to main content

1 Tutorial : Add game engine to a project

In this article, I will teach you to add the game engine object to your project.

First, you need a project as this :

Then, create a game view object with : app.CreateGameView( width, height );
So we have : gv = app.CreateGameView( 1, 1 );

Next, create a script file called : 'game' with this button : 
After, that you clicked you obtain this :
Return on your main project file by clicking on 'game.js'
Add under gv = app.CreateGameView( 1, 1 ); : gv.SetFile( "game.js" ); for set the game file to the game view. Add also gv.SetFrameRate( 60 );  And add lay.AddChild( gv ); for add game view to the layout.

Then return in your game.js, and add two function : 'OnLoad' and 'OnReady'.


In the next post, I will learn you how create a scene with background and sprites ;-)

Comments

  1. Nice, nice, nice. Please keep on and thanks.

    ReplyDelete
  2. This is when I am checking out your tutorial but I can say I already like it.... It's so incredible.

    Keep up the good work! ��

    ReplyDelete

Post a Comment

Popular posts from this blog

2 Tutorial : Create a scene and sprites

In this article, I will teach you to create a scene with a sprite.

3 Tutorial : Animate a sprite

Hi ! In this tutorial I will teach you how animate a sprite.