"Firce"- Program HTML5 game (easy)

HTML5 Programming the game

The idea is simple, we have a character that moves forward continuously. At least that's what it looks like. To be exact, enemies are coming towards him, two different types of enemies. One from the Fire Element and one from the Ice Element. These have to be attacked and destroyed with the reverse magical attack.

The character

Our magician is designed in little detail. For simplicity I also kept the animations simple and here I used a technique that gives the animation a lot of movement with little effort.

And I edited the character with the selection tool. In each frame I have moved the character down at a position X. Pictures say more than 1000 words.

This creates the illusion that the whole body is moving.

The first document

We will realize the game with HTML5 Canvas and Javascript. Accordingly, our first document will be an HTML file. The one we call index.html.

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <canvas id="canvas" width="800" height="600"></canvas>
        <script>
        </script>
    </body>
</html>

Basically this is the whole HTML part, we do without any layout or style. The more interesting part will take place between the script tags and follows in the next sections.

Next site
Wait, talk to elements and gameloop
Leave a like or comment (~‾▿‾)~
Name Text