Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving the Snake game #141

Open
7 tasks
CRImier opened this issue Nov 22, 2018 · 2 comments
Open
7 tasks

Improving the Snake game #141

CRImier opened this issue Nov 22, 2018 · 2 comments
Labels
cleanup good first issue New contributors should be able to tackle this help wanted

Comments

@CRImier
Copy link
Member

CRImier commented Nov 22, 2018

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.
@CRImier CRImier added help wanted cleanup good first issue New contributors should be able to tackle this labels Nov 22, 2018
@Gnu-Bricoleur
Copy link

Gnu-Bricoleur commented Nov 22, 2018

I had forgotten about it 😄 , I'll see what I can do to improve the above-mentioned points !

@CRImier
Copy link
Member Author

CRImier commented Nov 22, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup good first issue New contributors should be able to tackle this help wanted
Projects
None yet
Development

No branches or pull requests

2 participants