r/learnpython • • Sep 05 '24

Is python recommended for coding games?

Because I think it’s only good for coding like websites or some shit if it is recommended for coding games, sign me up where do I start because I’m starting out coding and programming

0 Upvotes

65 comments sorted by

View all comments

2

u/SquiffyUnicorn Sep 05 '24

Trying to collate the responses into a single meaningful reply here…

The real answer is that Python can be used to make games, with the caveat that some types of games are better made using other tools.

Unfortunately a lot of people ask what seems to them to be a very straight-forward question. There is no simple answer to this question. The actual answer is much more nuanced than they realised- more actual work is required before you can understand the answer. This is not what many people want to hear- sadly life is full of complexity and this has to be accepted.

High performance games (triple As, high quality 3d etc) will be better executed using other tools. Just like while you could fit that carpet with a knife and fork, in practise it would be hard work and won’t look good at the end.

As you said, you want to do 2D games.

Can I ask what your future plans are? If you want to do this professionally you might think about developing useful skills and experience with certain tools.

I understand that Python is used in a lot of games, but usually only in a small or very specific part. Graphics engine etc will often be done in something else.

Yes you can make games in Python. Yes 2D games are feasible in Python. It would not be a bad thing to start there and move on to do something else in the future should you want to.

Why should you choose Python over other languages? It is quick to learn and you don’t need an in-depth knowledge of it just to get started. Lots of libraries and a relatively friendly community. It is the standard for the AI and data science industry, and increasingly common in other areas.

Why would people suggest doing other things? C++ is more common for professional game studios and associated tooling. However, C++ has a steep learning curve which could prevent you from making your first game.

There is no single best language for anything.

Life is complicated and has many options. Sometimes it is best just to choose one and try it out, being willing to swap to your other option if needs be.

Caveat- I am not a game developer, nor am I a professional developer. However, I read, I learn and try to understand but accept that many things cannot be reduced down to a ‘which one is the best’ question.

This one is for free- sadly a lot of people seem all too willing to let others do their thinking for them. Think for yourself, make a judgement call and own it. Don’t be afraid to be wrong, just be willing to admit it and take a better path.

Especially, Don’t let chatGPT do your thinking for you- it does not actually think, and relies on the internet for its ‘facts’.

1

u/SquiffyUnicorn Sep 05 '24

Sorry if this sounds preachy. I really don’t mean it like that.