Description
This tutorial will go through creating a basic platformer using python and pyside. It will not use any external library, and we will be using some cool tricks to emulate gravity. All the sprites are included!
Although developing a platformer game inside Autodesk Maya and Autodesk 3dsMax may seem useless, have in mind that many of the techniques showcased here can be used in real life tool development.
To keep it simple and fun, we will break the work in the following tasks:
- Create a basic UI containing a QListWidget for selecting objects and a QScrollArea as the main viewport.
- Add draggable blocks using QLabels.
- Add a character using a QGroupBox.
- Create a main loop that receives the keyboard and mouse inputs to interact with the character.
- Add collision detection in the main loop.
- Add an enemy using a QLabel.
- Add a power up so that the character doubles its size when consuming.
- Create the interaction between the enemy and the character: bounce over the enemy if the character is jumping or die otherwise.
- Add sprites.
To better take advantage of this tutorial, it is recommended that you have an intermediate understanding of python. Have fun while learning!