Advertisement

Python for 1st language?

Started by January 09, 2016 03:23 AM
18 comments, last by Tutorial Doctor 8 years, 11 months ago

Hey guys,

I'm hoping to learn how to program games for PC. So far, I have read and researched that C++ is the way to go, but for a complete noob such myself, it is not the best language to start with.

I've been told that Python should be my 1st programming language and after a while it would make it easier for me to start learning C++.

Do you agree with this statement? Or would you suggest a different language or maybe go right into C++?

I can devote about 25-30 hours a week for learning.

What I am looking for is the most efficient way of reaching that ultimate goal of ability to program a PC game. For now, I would like to have enough skill to make a simple prototypes to test game mechanics and at least be familiar enough with coding to be able to modify already existing code written by someone with more experience.

Any other advice on the topic would be appreciated!

Python is an excellent choice for learning to program.

I would go farther and say C++ is not an excellent choice for learning to program.

Stephen M. Webb
Professional Free Software Developer

Advertisement
What I am looking for is the most efficient way of reaching that ultimate goal of ability to program a PC game.

If I knew what this was I certainly wouldn't be willing to tell you for free, and neither would anybody else. :)

Your plan to start with Python is good; as Bregma said, you're plan to avoid C++ first is also good.

Find some introductory material for Python you can follow -- the Python website used to have tons of "getting started" and whatnot guides aimed at programmers and non-programmers alike, and probably still does -- and start with it. Build the exercises they suggest. Build exercises you set for yourself, like a simple "guess the number" game, or Blackjack, or Hangman. All of these can be done fairly simply without having to worry about the complexities of windowing and graphics APIs and are good ways to grow as a beginning programmer.

Once you feel comfortable, post those games somewhere here or elsewhere on the interest and ask for feedback with your code. Keep making simple text IO based games until you feel like you are ready to tackle learning a windowing and graphics API, and then pick one up and go for it.

Nothing wrong with Python as a first language, but if your eventual goal is PC programming with C++, you may want to start with C# instead. Difficulty-wise it's roughly equal to Python, and it's closer to C++. In terms of game programming C# is probably easier than Python with better libraries and frameworks available.

Do you agree with this statement?


We agree with this statement. Use Python and PyGame and create games smile.png

Beginner in Game Development?  Read here. And read here.

 

Nothing wrong with Python as a first language, but if your eventual goal is PC programming with C++, you may want to start with C# instead. Difficulty-wise it's roughly equal to Python, and it's closer to C++. In terms of game programming C# is probably easier than Python with better libraries and frameworks available.

Just quoting to say I agree with this idea. There is nothing wrong with Python as a first language at all, it is a solid choice but c# is a very nice language, if you are on Windows you get a fantastic IDE to use (Visual Studio 2015 Community edition) and as SiCrane points out it's closer to c++ than Python is so I think it would be a better stepping stone.

Interested in Fractals? Check out my App, Fractal Scout, free on the Google Play store.

Advertisement

I have honestly always gone the other way with this advice, seemingly opposing the rest of the planet. But it worked for me.

I think the important question is how you look at coding:

Is the idea of programming in your head an idea you enjoy?

OR, is writing code something you see more as a means to an end, and it's more about making games?

Since your post sounds more like the latter, then yes, the advice others have offered here is probably what I'd suggest too.

So just sharing my personal take here: I jumped straight into C++ and I have to tell you I am always happy that I did. I am always thankful that C++ is "The thing I got used to", rather than "The thing that's more complex and irritating than the thing I got used to." However, yes, disclaimer: I was just interested in/excited by any coding at all, and learning "the hard one" was itself the motivation for me. I only carry on about this perspective because, having learnt C++ first, every other language I've picked up since has been a real doddle.

(Nothing wrong with having Python under your belt either anyway; it definitely has its advantages over C++, especially when you want to throw things together. But from your OP, I'd agree C# is probably what you want.)

I recommend learning C.

In the long run, it would be the best way to start programming.

It teaches you basic concepts, memory operations, how software work.

Then start an higher level language like C# or C++, then you could focus on software development.

How to design OOP systems, how to build engines, etc...

Python is a nice scripting language that could be used for many objectives.

However, it is not recommended for first language since you don't dive in into software.


I recommend learning C.

I recommend the OP not do this. I also recommend that the OP only uses the tools needed to do the job and do the job well. C does not fit that criteria.

Beginner in Game Development?  Read here. And read here.

 

Before you make up your mind, I recommend you consider JavaScript. JavaScript, as you may know already, runs in your web browser which is a very capable platform for games. And there is no end to the number of game programming libraries and tutorials out there to get you started.

Plus, if you write something you want to share, all you need to do is host the files somewhere and share the URL. No one needs to download or install python. You don't have to mess with py2exe or anything like that. It couldn't be easier.

A great place to start is with phaser.

This topic is closed to new replies.

Advertisement