Confused about python

Started by
1 comment, last by Alberth 7 years, 5 months ago
Can I developed a game with nice graphics in python ?

And did python support Opengl ?

And are python eseier then c++ at game programming
Advertisement
Can I developed a game with nice graphics in python ?

Nice graphics is subjective. There have been a few impressive looking games made with python but it's more based on style than graphics technology.

There is no reason python couldn't be used for AAA graphics, your API(OpenGl) is more of a factor here than the code you use.

And did python support Opengl ?

It does.

And are python eseier then C++ at game programming

Again this is subjective. Python is easier to learn and takes a lot less code to do things, however C++ has a flexibility that makes it great for games.

One of the most negative points of Python is processing speed, in the beginning it isn't that noticeable but when you use large amounts of lists, classes and arrays that need to be processed it can be slow.

While you are still developing small games it won't matter much if you use Python or C++.

I will recommend a engine if you are just starting out, Panda3D is a python code based engine if you are set on using code only; although I think it's a bit under used with Unity and Unreal being free now.

The "Python" you download from python.org is just the language and the standard library.

Every other capability is supplied by a 3rd party.

Since it is easy to connect anything C/C++ to Python, most things you want already exist. You may want to browse a few Python software index lists to point you to available extensions.

PyPy is a large site, an Internet search with some keywords usually also works.

I don't know about OpenGL (although I would be surprised if it did not exist), but for 2D games, there is pygame.org

C++ assumes you know what you are doing, it will let you do anything, including shooting yourself in the foot. It is not very helpful with error messages or so, since you know what you're doing, right?

It starts at a lower level, where you have to define a lot of small details before you can start working on the "real" problem. In the end though C++ will run faster due to doing all this ground work first.

Python tries to be much more helpful. You can still do a lot (it has many advanced features), but not everything. It gives you helpful messages when something goes wrong. There is no need to define a load of small level details, you can jump into solving the "real" problem almost immediately. Generally, Python code is shorter and more expressive than C++ code.

The cost that you pay for all this user-friendliness, is raw computing speed. For most code however, speed is not even relevant. In my experience, well written Python code runs fast enough.

For learning programming, Python is definitely the better choice, as it gives you a more gradual path and better guidance. Writing game code that works is the real challenge, and that is simpler with a language that is more direct hands-on to the problem. While you can stay with Python for a long time (it scales well to larger problems), once you are a bit used to programming, you may want to learn a second language. You don't have to make a final choice for language now.

This topic is closed to new replies.

Advertisement