Jump to content
  • Advertisement
Sign in to follow this  
Ballistix

Python for 1st language?

This topic is 878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Edited by Josh Petrie

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.)

Share this post


Link to post
Share on other sites

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. 

Edited by WoopsASword

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites

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.

Edited by smr

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!