Skip to content
rezoner edited this page Oct 11, 2014 · 13 revisions

Hello,

With sounds it feels a lot more like a game :)

Anyway - the player is getting no reward for his deeds so we want you to introduce score.

☑️ Player should get +1 score for crushing an asteroid

☑️ Display score: 32 in upper-right corner

Some help from Mike:

📧

The score display should get implemented in Hud.js - below I've listed some methods convenient for displaying text:

app.layer
  .fillStyle("#fff")
  .font("32px Arial")
  .textAlign("left")
  .fillText(text, x, y);

As for online tutorials - anything regarding HTML5 Canvas applies to the layer with a slight difference on setting properties.

ps: if you wonder whether you should keep separate scores for both players - it doesn't matter at this point - just find a method convenient for you

--

Joshua Hal

Producer