PyGame Series
Writing a Snake or Worm game using Pygame. I take you through the steps in this series.
the code for this game can be found at https://bitbucket.org/gameexperiments/pygame-worm
Writing a Snake or Worm game using Pygame. I take you through the steps in this series.
the code for this game can be found at https://bitbucket.org/gameexperiments/pygame-worm
2D frame based animation (2D kinematic animation) is easier to explain so we will start there.
2D kinematic animation is controlling the movement of an object without physics involved. We simply move in a direction at set intervals. To keep the speed of the motion same on different size screens we need to take time into account. We will make use of the number Frames per second or more accurately the time difference between each frame (delta time) included in our distance calculation. Don’t worry its quite simple. We ‘animate’ our character by swapping the image with another image every few frames or fraction of a second.
This tutorial is for the beginner, the ‘PyGame Worm’ lessons are intermediate at a rough guess. IDK, those terms were never well defined when I started programming.
We dont teach the absolute basics of python here. You need to have a very basic understanding before you start these tutorials else you will be lost.
The style used here is code as we need, not the best method but a good way to try things out if you keep your changes small. We don’t use tests as that will distract from the lesson, but that will be taught soon.