Cmaack / firstGame

0 stars 0 forks source link

Submission: Project1 #1

Closed Cmaack closed 8 years ago

Cmaack commented 8 years ago

https://github.com/Cmaack/firstGame/tree/master/SnakeGame

Completes Project 1: Snake Game

clay-reed-a commented 8 years ago

Excellent Submission Chris!

I loved reading this code. It shows a methodical mind at mathmagical work.:triangular_ruler: :pencil2:

I also appreciated the cuteness of the (incorrect) use of snake_case.

And I thought the changing of the "global" variable d on the 'keydown' event was stunningly brilliant. My mouth went like this :open_mouth: when I figured out what you had done.

I, however, think here are some ways the code could be made better. :-P

I would rather see it called snakeDirection. I understand ctx is traditional for <canvas>, but it's better to have variables that are immediately transparent. So keep ctx because people who work w/ <canvas> know about it, but change d to something immediately transparent.

I feel similarly about snake_array, but perhaps in the opposite direction. If you choose to change the implementation of your Snake from Array to SomethingElse, it's still a Snake from the perspective of our goal programming it. So, I think snake_array should just be snake. And it makes it easier for me to see this Array is the implementation of Snake (which wasn't immediately transparent to me).

Ultimately however, the best variable names are gonna be:

So if my arguments don't make sense, disregard. :snake:

Clay a

ajhofferber commented 8 years ago

Hey Chris,

Your project looks really good. The aesthetic presentation of your game as a whole is really nice! Also, props for diving into Canvas and giving it a shot!

Just a few thoughts for you, though. I know there are a lot of tutorials in the world for similar games, and although it's never a bad idea to look around and gain inspiration from the way other people approach things, we want to make sure that you are working through this stuff on your own too! And with Canvas being a new technology to explore, we fully understand using existing code or tutorials as guidance. Not sure if you referenced things or used others' examples, but we would love to see what of the code was original or what of the logic you set up all on your own. If you were to have like 2 more days on the project, what kinds of things would you add? How would you go about adding in additional features? What about maybe a button to start the game instead of having it start on load? Or having the score counter exist somewhere off the canvas? (as it is now, it sometimes blocks the piece of food!)

Again, not saying you shouldn't explore other code or that you necessarily did so on this project, we just want to make sure that you all were wrestling with the right kind of logic work for this project. But overall, your game is super fun and has a really great presentation.

Love it!

-Ash

ajhofferber commented 8 years ago

AH! Additionally, I would also encourage you to take some time to add a README.md file to your repo and explain some of the work you did and include a link to your live game! It just looks so good and is so fun to play that you should make sure anyone browsing around your github can see what you've been working on!

ajhofferber commented 8 years ago

ALSO,

Score: 2.5 (refer to project 1 markdown in class repo for scoring rubric)