Basic Kinematic Animation - Movement first
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.
Setting up Visual Studio Code for Python development
If on windows Install the powershell & terminal from microsoft store or the website first. The default ones on Windows 10/11 are old.
You may need to set them as defaults.
Here are the steps for a fresh install
- Install Python
- Install Visual Studio Code
- Install the Python Extension
You may need to Install older versions if you plan on using Windows 7