Dubbed electronic drugs by the Chinese, online games have been known to take up the time of serious players for up to eight hours. This, of course, is fraught with potential social problems and can result in the devastating effects of what is called gaming addiction.
What will that mean for your love of Genshin Impact adventures? Perhaps nothing.
Having said that, in keeping with China’s policy for harm reduction, development could easily be slowed down, but probably only for gamers in China.
Genshin Impact is written in C++ which is well-known as the programming language for robots but it is also behind a whole world of systems. So, if you are wondering if making a game in Python is possible, keep reading as this article answers your question on how to make a game with Python and many others too.
Want to give private lessons?
Join the Superprof community and share your knowledge with inquiring and motivated students.
What Is a Computer Game?
You might be thinking 'what kind of question is that?'. Who doesn't know what a computer game is? Well, sure, we all know there are stunning graphics and engaging storylines and intriguing characters and so on.
But what is a computer game, actually?
Games played on mobile devices and those driven by gaming consoles must have graphical user interfaces.

Games with Python make use of interfaces called GUIs (pronounced ‘gooeys’) which is how a user would interact with games in python.
To see how this works, slide your finger across a screen which can result in a menu that pops up.
If you have a writing or drawing application open, you’ll see a line that follows the path of your finger. Perhaps you will have to draw a pattern on the screen to unlock it.
These examples and others, like needing to touch an icon to open an app on your phone, are all ways for you to interact with your phone.
Whether you are playing games in Python on your phone, or through a gaming console, it is the same, you are causing on-screen actions through the physical moves that you make.
When you understand this, you will understand that computer games are essentially GUIs and that making a game with Python is one of the best programming languages to use to make them.
As already mentioned, Genshin Impact is written in C++. For a great many programmers and game writers, it’s a go-to language that is fast and able to render beautiful graphics. On the downside, the language can be complex and unyielding.
The key to writing game code is that it can take 100 people or more to write. To do this, each coder needs to know the programming language as well as the next. That’s no mean feat when you consider how heavy C++’s syntax can be.
A disadvantage of C++ is that it loses out on cross-platform coding. Even though libraries are available for adapting game code to different operating systems, the language complexity makes it difficult. Writing game code in this language means not only knowing C++ inside and out but also knowing how to adapt it for other platforms.
Before we look at Pygame, or how to make a game with Python, consider JavaScript, which is 100% responsible for Minecraft and makes for interesting gaming.
Contrary to C++, Java is a great cross-platform language and is how 97% of all websites manage their pages. On the downside, it can be slow and if you know anything about Minecraft, you’ll agree that it could be more of a dynamic game. Also, it does not adapt well to low-end computers unless you run an optimisation module called Optifine.
Pygame, which is used for making games in Python is not only cross-platform friendly, it is not overly complex.
Unlike its counterpart C++, it is an interpretive language that does not require translation from source code to machine code. Granted, some performance is lost, but this makes Python ideal for machine learning.
Another reason why games in Python are a good option is that there is no need for extensive coding. Because of its modular structure, the margin for errors is lowered and coding is simplified to knowing how to retrieve the desired module from Python’s extensive library and then plugging it in where needed.
On the downside, if you are creating games in Python that demand high numbers of frames-per-second (FPS) and much processing power, your Pygame might need some help.
Find out how to make a game with Python with a Superprof tutor.

Try this python course here.
The Cross-Platform Question
Is your phone powered by Apple or Android? Do you like gaming on Mac or PC? Do you mitigate your security concerns by using a Linux operating system?
These operating systems, known as platforms are generally the ingredient that gives coders their main headache.
For Google Play there are Android apps, for Apple, there are iOS apps and Microsoft has its own app store to download for PCs. If you visit these stores, you’ll find the same apps, the only difference is that they have different code.
Coders and developers who use Pygame (modules for making a game with Python) should always aim to work with the applications that they want their applications to run on. This means that if you are only designing for Apple, you should forego Windows and Android. And if you decide to make games with Python that are only for Windows, bear in mind that they have the lowest smartphone market share. This means you would lose out on an entire mobile service market.
One of the reasons that coders love making a game with Python is that it works well across multiple platforms. This is far more preferable than the older programmes where separate code needs to be written for each platform.
Interestingly, even though Python, which has been around for 30 years, is not a new language, it has recently come into its own. One of the reasons for this is its versatility, not only in Pygame but also as one of the preferred languages for web development.
Find out how to make a game with Python here.
How to Make a Game with Python

Bear in mind that even though Python is relatively easy to work with and has excellent applications, performance is not one of its redeeming characteristics. Therefore, if your game requires a lot of graphics and action, you might need more than only Python.
If, however, you are writing code a simple 2D games like Noughts and Crosses that requires limited graphics, then Python will certainly fit the bill. Find a tutor on Superprof to help you understand Pygame.
Pygame is a unique library of Python modules that have been written and compiled specifically with computer games in mind. These contain sound pieces and computer graphics for making a game with Python easier. How do they work?
- Familiarise yourself with Tkinter, the standard GUI for making games with Python
- draw geometric shapes with a canvas widget
- use the bind widget for identifying the action that mouse clicks should take
- start your games in Python with a game flow diagram
- code your game's initialisation functions
- code your games with Python drawing functions
- code the game's logical functions
The logical functions run the game.
They keep track of the user’s inputs, the stages of the game as well as how to advance the game’s progress. Making a game with Python logical functions will keep track of scores, determine when the game is over and deliver the win or lose results.
Those annoying 'illegal move' messages are also one of the game’s logical functions.
This is just a very broad outline of what it takes to code a game with Pygame. If you want to embellish further by using different colours and effects, these can be found in the Python code library.
Creating computer games is just one of the many applications of Python.
The Downside to Making a Game with Python
The greatest downside to coding for games with Python is low performance. By comparison to more popular graphics-rich, fast action games like Genshin Impact, Python simply cannot measure up in terms of speed or visuals.
Even with all its versatility, Python is not suited to the mobile environment. This is the reason very few mobile devices use Python. Python is better suited to server-side development than it is to running power-driven applications.
Finally, remember that developing a game in Python has the potential to get tedious. For all its extensive libraries which are well-labelled and easy to use, the processes required for Python game creation are quite convoluted. Most developers will contend that the effort is not worth its simplistic yield.
Still, there are many stand-out Python-based games, for example, Frets of Fire and Save the Date.
Don’t let this review put you off before you have checked out the perfect marriage between Python and data science.
Want to give private lessons?
Join the Superprof community and share your knowledge with inquiring and motivated students.

