![](https://article-imgs.scribdassets.com/47yiegjk3kad7ibr/images/fileXO2ZYWV6.jpg)
PYTHON
Credit: https://github.com/mx0c/super-mario-python
OUR EXPERT
Andrew Smith is a software Developer for NHS Digital. He enjoys scripting in Python and playing video games.
QUICK TIP
When practising with new or unfamiliar code, always back up the file you are practising with, so if anything goes wrong, it is easy to recover.
During the early to mid-’90s, platform games were incredibly popular on game consoles. The king of the platformer was Nintendo and iterations of Mario games were rolled out for the Nintendo Entertainment System and Super Nintendo Entertainment System. This means that, even today, people still love to play Super Mario Bros and its ilk in a staggering array of variations.
For this instalment, we are looking at a Python project created by Marius Bauer (https://github.com/ mx0c) that aims to ape the original Super Mario World video game. We’ve modified and adapted the code for the benefit of this tutorial and are using replacement original sprites and game titles to appease the legal eagles. The original (unmodified) source code and resources can be found at the following Git: https:// github.com/mx0c/super-mario-python.
The aspects of the project that we’re covering in this tutorial include looking at the overall structure of the project, the video game menu, loading game characters by sprite sheet and looking at the code that controls how the video game characters are moved in the game program. Before we can do any of this, though, we first need to make sure we have the correct environment set up.
Let’s go!
We’ll install and set up Python 3.10 for the benefit of this tutorial. For those who have Python/PyGame already installed, Python 3.8+ should