You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could do a few things to make you-win easier for beginners.
Replace arrow functions () => { ... } with function literals function() { ... }, to match the JS course.
Replace player.forever(function() { ... }) with player.onTick = function() { ... }, to reduce the number of brackets you need to type, and move toward things being defined in a single place. Beginners often end up with multiple forever loops and I think this is a point of confusion.
On that note: I think the distinction between initialization (at the top-level), and doing things every frame (inside a forever), is not the easiest to grasp. I wonder if it would be better to have an explicit initialisation step, something world.onBegin = function() { ... } , or uw.onBegin = function .... This would roughly match Scratch's "when green flag clicked".
I worry that our current style relies far too much on scope, e.g. creating a makeBullet() function. I wonder if it would be better to move towards a more class-based/OOP approach, like we did in the old Python Games course...
As a minor point, if it's possible to configure the editor we use to auto-indent / pretty-print on save, that would reduce a major proportion of the errors.
The text was updated successfully, but these errors were encountered:
We could do a few things to make
you-win
easier for beginners.Replace arrow functions
() => { ... }
with function literalsfunction() { ... }
, to match the JS course.Replace
player.forever(function() { ... })
withplayer.onTick = function() { ... }
, to reduce the number of brackets you need to type, and move toward things being defined in a single place. Beginners often end up with multipleforever
loops and I think this is a point of confusion.On that note: I think the distinction between initialization (at the top-level), and doing things every frame (inside a
forever
), is not the easiest to grasp. I wonder if it would be better to have an explicit initialisation step, somethingworld.onBegin = function() { ... }
, oruw.onBegin = function ...
. This would roughly match Scratch's "when green flag clicked".I worry that our current style relies far too much on scope, e.g. creating a
makeBullet()
function. I wonder if it would be better to move towards a more class-based/OOP approach, like we did in the old Python Games course...As a minor point, if it's possible to configure the editor we use to auto-indent / pretty-print on save, that would reduce a major proportion of the errors.
The text was updated successfully, but these errors were encountered: