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 now have a rudimentary Snake game, contributed by @Gnu-Bricoleur (here's the code in devel). It's awesome, and the splash image never fails to put a smile on others' faces =) While reading the code and watching people play it, I've found some improvements that could be made, so I'm keeping track of those here - in case anyone's interested in helping.
The resolution of the game is very small, so the difficulty is high. Thus, it would make sense to increase the snake's dimensions, at least as an option for "Easy" and "Normal" levels. My proposal is making a virtual grid, say, 64x32, which would then be transposed onto the field, so then the snake could be 2 pixels wide.
The chosen difficulty isn't saved between game launches.
For some reason, the highscores aren't properly saved either.
Given the amount of globals involved, it would make sense to refactor the game into a class-based app.
The highscore file could be tracked in a standard ZPUI config.json instead (together with the last picked difficulty)
When the game is failed and the "Highscore: " screen is shown, the buttons don't react to keypresses (so the users keep pressing one of the buttons, which is then processed in the game's main menu, leading to unexpected results).
Also, for some reason, the game field is shown once again after the highscore is displayed (while scores are being saved?) Coupled with the previous bug, that adds to the user's disorientation.
The text was updated successfully, but these errors were encountered:
@Gnu-Bricoleur I mostly publish this kind of issues for new contributors that are looking for something to cut their teeth on =) In particular, I'm going to publish a link to this issue (and some other small ones) in the upcoming newsletter, see if anyone's interested.
We now have a rudimentary Snake game, contributed by @Gnu-Bricoleur (here's the code in
devel
). It's awesome, and the splash image never fails to put a smile on others' faces =) While reading the code and watching people play it, I've found some improvements that could be made, so I'm keeping track of those here - in case anyone's interested in helping.The text was updated successfully, but these errors were encountered: