Question

I want to write computer games that I can share with other people. Currently all of my games are written with python and pygame. I certainly wouldn't say I am a master at python, I just want to learn something new. I wrote a couple android apps with java and I didn't like it nearly as much as python. It is important that the program isn't too hard to share, because I can't share my python codes with my friends very easily and whether it can be turned into an exe easily or posted online easily I want it to be portable. BTW i will be writing the codes on ubuntu idk if that matters, thanks for any suggestions.

Was it helpful?

Solution

Considering you are already familiar with pygame, I would suggest learning C or C++ and using that with SDL. SDL is written in C, but works natively with C++ and can be paired with OpenGL. C is not object oriented and easier to learn than C++, although you may find C++ easier to learn since it is object oriented like Python is although it shares some similarities with Java.

If you are making a game that requires a high FPS(frames per second), then you can't go wrong with C/C++. If you are making a casual game like solitaire or something similar, then there is nothing wrong with using Python. Another benefit of using C/C++ is that you can still create libraries for Python(and other languages). An example of this is SWIG.

For a portable language, Python is hard to beat because the end user just needs to have the python interpreter installed. C is highly portable because you can compile it for almost any platform you run across. One benefit to knowing C is that you can also use it with an Arduino incase you want to use it in a hardware project. If portability is a high concern, then you might want to look at HTML5 also (but requires the end user to have a compatible web browser and possibly an internet connection).

There are tradeoffs with any language, knowing which is best for a particular situation is they key.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top