User Tools

Site Tools


notes:comporg:spring2024:projects:mpg0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:comporg:spring2024:projects:mpg0 [2024/02/07 20:15] – [Handling motion] dwhite26notes:comporg:spring2024:projects:mpg0 [2024/02/08 02:32] (current) – [Game loop] rspringe
Line 7: Line 7:
  
 ====Game loop==== ====Game loop====
 +For this project, you will be making a Snake game.
  
 +The game loop for Snake is simple: you will control a snake around the screen to eat pieces of food. Once a piece of food has been eaten, your score will increase, and the snake will get longer.
 +
 +The game ends when the head of the snake runs into either a wall, or another part of its body.
 ====Sprites==== ====Sprites====
  
Line 54: Line 58:
 <code bash> <code bash>
 if( var == 1 ) { if( var == 1 ) {
-  Snake.X -= PlayerSpeed;+  Snake[0].X -= PlayerSpeed;
 } }
 </code> </code>
Line 94: Line 98:
  
 } }
-<code c>+</code>
 ====Score Display==== ====Score Display====
  
notes/comporg/spring2024/projects/mpg0.1707336905.txt.gz · Last modified: 2024/02/07 20:15 by dwhite26