I need to re-code a snake game for class, so any advice on it... I know it is not that hard but I just started coding and I am going to do it in javascript so any help?
This has been done dozens of time before. Learn to use a search engine.
It has to be original
>>54714672
Just write it. You'll learn more from fucking it up than you will from being told how to do it.
it is due friday... but ig i can go full retard staying up all night and doing it at school during lunch and the class i have it fore
Just steal someone's code and change all the variable/method names like the rest of your class is doing :^)
>>54714888
In 3 days? That's too much time.
>>54714672
You can do this >>54714961 if you don't want to learn.
Also if you have a certain coding/naming style, make sure you adhere to it so you don't give it away.
have an update method
Have a draw method
Think about your data structures for the snake, the food, and the "world" that the snake and food will be at
Your snake needs to move, so it would need a velocity
Then just have methods on what happens when you collide with the food and the snake body, on movement from input keys, etc
>>54715116
AABB collision detection, google that
Or make it grid based, then you will know what position the food is with your snake head