- This event has passed.
6 PM – Android Game Dev – Gamas
August 6, 2025 @ 6:00 pm - 7:00 pm
Today We Did
- We converted from View to SurfacedView.
- We made the snake and apple to be drawn once every 200 milliseconds.
Homework
- Move the snake according to
directionattribute. - Draw snake head image according to its direction. For example if direction == RIGHT, then you need to use the
R.drawable.snake_green_head_32_rimage. - When the snake move UP and hit the edge, it needs to appear on the BOTTOM.
- When the snake move DOWN and hit the edge, it needs to appear on the TOP.
- For UP and BOTTOM edge behavior, you need rely on
rowCountwhich you calculated in theonSizeChanged(..)method. - When the snake move LEFT and hit the edge, it needs to appear on the RIGHT.
- Make sure you run your code for each of the 4 directions and confirm that they are working.