1
\$\begingroup\$

I'm a beginner at making games, and my eBook that I learnt Python from just made a 2D game and simple game like snake in Nokia because I want to know more Python in correlation with game development.

Can someone tell and explain to me what the Python language can do to make a game?

\$\endgroup\$
  • 2
    \$\begingroup\$ Are you looking for examples of existing games or example code? \$\endgroup\$ – Sturlen Nov 4 '15 at 11:55
3
\$\begingroup\$

If you are using Python it is almost impossible to create a game with textures, like snake without using libraries. You should use the Pygame library if you want to create games like that in the Python language. Pygame offers many things like: Draw figures, render images to the screen, settings fps etc. I hope this answered your question, sorry for bad English.

This is an example of a game written in Pygame and Python: https://libregamewiki.org/Eskimo-run

Conclusion:

The Python language itself can not do much for creating a game, you have to use libraries for that.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Usually programming languages do not offer a lot for making games natively. Some languages are just used commonly for creating game engines, which then in turn can be scripted with other languages.

I recommend you to have a look at the Blender Game Engine which uses Python as scripting languages, and offers a lot of functionality for access with Python through its API. The engine itself is not quite the most modern game engine, but it has by far enough features for someone who wants to use Python for developing games on a non- or semiprofessional level (for example for small indie games).

Note that every game engine has its functionality implemented in a low level language (e.g. for physics, graphics, ...), which is often not the same as the language used for the game logic.

For very simple games you can just use a library for drawing 2d graphics instead of a game engine.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Please add a comment when downvoting, and tell me where my answer does not fit the question. Random downvotes are just rude, at least give a reason. If the answer is not specific enough, maybe the question should be more specific (it actually is a very vague question). \$\endgroup\$ – Raimund Krämer Nov 4 '15 at 15:48
  • 1
    \$\begingroup\$ +1 I personally don't think this is a bad route at all for stepping up to full immersion in Python - BGE is quite nice to use and takes a lot of the grunt work away from the user. I think it is also reasonably well documented? \$\endgroup\$ – Engineer Nov 4 '15 at 15:52
  • \$\begingroup\$ "Please add a comment when downvoting, and tell me where my answer does not fit the question" Welcome to stackoverflow! \$\endgroup\$ – OpenGLmaster1992 Jul 18 '16 at 16:45
-4
\$\begingroup\$

*Python. Most games are developed in a language like C or JavaScript; it is uncommon to see a modern game created in Python. If you want to create a game I suggest downloading a program like Unity, learn some basic JS or C#, and create a simple 2D platformer, there are tons of tutorials on the net for them! Also, if you don't have enough money for Unity Pro, try the Unreal Engine.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ -1 This doesn't answer the question. Also, you don't need Unity Pro. The free version contains pretty much all of the features since Unity5. Main reason for licensing now is if you make enough money then you need to buy it. Also to get rid of some of the Unity branding in your release game (eg. splash screen) \$\endgroup\$ – Fuzzy Logic Nov 4 '15 at 7:26
  • \$\begingroup\$ @FuzzyLogic I didn't say you needed it... \$\endgroup\$ – Caelan Grgurovic Nov 4 '15 at 7:30
  • \$\begingroup\$ @FuzzyLogic also, I couldn't comment so I decided to make a question out of it \$\endgroup\$ – Caelan Grgurovic Nov 4 '15 at 7:32
  • 1
    \$\begingroup\$ I was clarifying about Unity, not debating... You shouldn't post comments as answers. You should visit the Tour page (you'll earn a badge for reading it) and review the Help Centre. PS. Once you get 50 rep then you will be able to comment (5 upvotes or 2 accepted answers, etc). \$\endgroup\$ – Fuzzy Logic Nov 4 '15 at 7:56
  • 2
    \$\begingroup\$ The question was not about should one use python for game development, but what the Python language can do to make a game. \$\endgroup\$ – Philipp Nov 4 '15 at 9:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.