Time for action — modifying canvas size

When you have your first playable results, you do the following:

  1. Compile for HTML5.
  2. Using Monk, open the MonkeyGame.html file, which is located inside the build/HTML5 folder of your project.
  3. Locate the line that looks like the following:
    <canvas id="GameCanvas" on click="javascript:this.focus();" width=640 height=480 tabindex=1></canvas><br>
    
  4. Change the width value to 480 and the height value to 800, and then save and close the file.

Now, when you build and run your project, the HTML5 canvas is similar to the targeted Android canvas size.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.35.194