Tuesday, November 18, 2014

Work in production (coding the canvas)

I show the prototype of the html5 games that i follow base on the tutorial to Yee Siang, my supervisor on programming my final project. Although he say is a good source but he advise me to start from draft again, and code it myself. I can reference back the code but don't use fully on the code because the control and sending information progress is different.

As we all know that base on my previous blogspot, i am creating my display and control in two different HTML. For this canvas i am creating in the display html. 

So i start again by creating canvas. So i start with javascript to create a canvas and also code in a round object in the canvas to represent the character.


After creating the canvas in javascript, i go to the html source code to link the javascript with the html files and add in the canvas to display the canvas in the html page when it is being publish.


Due to my game is multiple players so i need to add in another player to so in the javascript i will be adding another shape to represent the another player.


If there are not mistake, when you display on browser you will see something like the images below.


References
W3schools.com,. 'HTML5 Canvas'. [online] Available at: http://stackoverflow.com/questions/702165/how-do-i-implement-press-and-hold-button-javascript [Accessed 23 Dec. 2014].


No comments:

Post a Comment