I just wrote my first tutorial on how to remake the classic Pong game in HTML5 and Phaser. It’s composed of 7-parts and I try to go as in-depth as possible to explain every single line of code I use. Here’s the outline of the entire tutorial:
gameDiv is the id for the HTML Document Object Model (DOM) where we will insert the canvas element that Phaser creates.
Feels like you’re missing a crucial word here: element. gameDiv isn’t the ID of the model, it’s the ID of the element. It’s also not the id of the model. :trout:
Thinking about the design aspects of the article… I think your use of a black background for your code fragments produces too much visual noise and distraction. Compare them with, for example, the relative lack of contrast of the code fragments on this forum. I just wonder what sort of havoc that design might be wreaking on the F-pattern people often employ while reading. Anyway, it seems like the heavy contrast suggests more importance than the more subtle note that I think you’re trying to communicate: that those sections of text correspond to code. See also: squint test.
Feels like you’re missing a crucial word here: element. gameDiv isn’t the ID of the model, it’s the ID of the element. It’s also not the id of the model.
Thanks for pointing that out =) I’ve update it accordingly.
I think your use of a black background for your code fragments produces too much visual noise and distraction.
I certainly agree with you on this and I will get it sorted out by the end of this week.
A volume/sound warning might be nice. I wasn’t expecting any noise and the sudden paddle sounds startled me quite a bit.
Perhaps I should disable the sounds until the user starts playing. Or I could use JS Fiddle so the reader has to click to view the results.
My goal for sharing and writing is also to improve my code and understanding. I’m thankful when I’m told I made a mistake or there are parts that can be improved.