Want to program game in Python just for experience and education, where do I start?

Started by
6 comments, last by Robster 7 years, 8 months ago

Currently, I am learning a Python language - and at the same time, I am interested in game development. And I thought it would be a great idea to unite these two learning paths into one. Yes, I know, Python is not the greatest, but I just want to build pretty basic game that I designed to see if this thing is for me - programming and game development.

It is quick paced shooting platformer for two players with one single arena as a battleground where two players have to collect points and block the opponent from doing so. I would love to do it in 3D but I dont know if is possible for me (as a beginner) and especially if its possible for Python - would like to know your opinion....

I was looking for a while on the internet for the resources and methods how to build a game and I have found myself little confused with all the engines, frameworks, modules.

People mostly talk about:

PyCharm (as an IDE)

Pygame (as an module)

Panda 3D (as a game engine)

Blender (as a game engine)

CoCos2D (as a framework)

VPython (as a module)

PyOpenGL (as an OpenGL)

PyOgre (as an libary)

My question is: Could you please briefly tell me whats the difference between all of these items and how they are interconnected?

What do I need first? Second? For what use is that and that? What I dont neceserally need?

Or better, you dont have to tell me, just give me some comprehensome documentation where all of this is explained and I am good...

Also I should note that I havent yet finished my basic programming lessons in Python so I am not that skilled in it yet... Should I first finish learning general programming and than jump in to that game as my first bigger project? Because I see that I need to have strongly grasped basics to move to this fancy stuff...

Thank you for all of your responses good folks of the internet, I value every single opinion and an advice.

Advertisement

I did some development, including game development, in Python and had a blast with the language. My games were fairly simple when it came to graphics, and - as I recall - Pygame proved to be basically everything I needed. It provides simple graphics and input facilities (it probably does more, but it's been a few years now, and those are what I recall using). Easy to use, good documentation, and a big enough community to handle any questions that outlast the first two.

I Create Games to Help Tell Stories

I did some development, including game development, in Python and had a blast with the language. My games were fairly simple when it came to graphics, and - as I recall - Pygame proved to be basically everything I needed. It provides simple graphics and input facilities (it probably does more, but it's been a few years now, and those are what I recall using). Easy to use, good documentation, and a big enough community to handle any questions that outlast the first two.

So you are saying just to stick with the Pygame and thats enough? None of that fancy stuff is needed for now? And the first two questions you mean: 2D and 3D choice?

Apologies, meant to address those in the initial response but was in a hurry.

As you say you are a beginner, yes I would very much recommend sticking to 2D. Even if you are excellent at the math required for working in 3D, it introduces a great deal of complication and additional tools required.

And I would tentatively say that yes, Pygame is probably all you need. Tentatively because it was all _I_ needed, but everybody is different. The only other thing I might suggest is finding a GUI system that works well with Pygame. I created my own GUIs from scratch - which was fairly simple to do, but the results were also simple. If you want something more advanced and don't want to reinvent the wheel, you'll want to look for 3rd party solutions (afraid I have no suggestions there, though).

For learning projects, it's best to keep things simple. Python with Pygame is simple. Every step beyond that increases the risk that you'll be biting off more than you can chew, which in turn increases the risk of you getting fed up and abandoning your projects without getting the answers to the questions you have.

I Create Games to Help Tell Stories

there is pygame in python.

If you're just starting out, stick simple and use pygame.

Panda3D is a full engine that demands a lot more knowledge out of a developer in terms of content pipelines, math, animation, physics, etc. Take a look at this good list of games to make/clone to learn the basics of game development: http://www.gamedev.net/page/resources/_/technical/game-programming/your-first-step-to-game-development-starts-here-r2976. Not a one of them requires the features of a full engine like Panda3D, and most will be _harder_ to make in such an engine than they will be using a simpler framework like PyGame.

By the time you need a real engine you'll want to have graduated into a more capable large-project-friendly language like C#, C++, Java, Rust, etc. (and hence you'll be better off using Unity or Unreal than Panda, or a simpler framework+engine like Cocos).

Sean Middleditch – Game Systems Engineer – Join my team!

Start simple, start with something that you can work up through while you learn the language and the environment.

So write a hangman game. Small dictionary of words, it picks one, player guesses letters.

1. Write it using just python -- you don't need the pygame part. Just reads from the terminal, handles guesses and prints out an ASCII of the hanging man. Now you know you have the game core working.

2. Make pygame start. Write an app that sets it all up and draws a screen that's blue or something obvious to let you know you can start it all. Now you know you can set

up for graphics

3. Make it draw a graphic in the middle. Make it change that graphic when the user presses keys. Now you know you can handle inputs.

4. Add your hangman system to it, so the graphics are the hanging man, the guessed letters and the un-guessed spaces. Now you know you can lay out screens.

5. Add the hanging animation (his face turns red and bulges and he wriggles around). Now you know you can move images around.

6. Go crazy for a couple of days adding things in -- make the letters pop into place, make him get more worried as you get more guesses wrong, make him happy when you win. That sort of thing. It's all good practice.

This gets you the principles of handling inputs, painting screens, winning/losing systems and so on along with the general python skills you drive them.

It's how we USED to learn how to program (although we used to do it in BASIC...)

Throwing this in here. Godot is NOT python but very much like python. Might be worth an investigatory moment after the above advice is completed.

This topic is closed to new replies.

Advertisement