Sign in to follow this  
richell

python for games?

Recommended Posts

hello, recently ive started python programing after hearing it was easy to pick up (ive done a bit of css html c++ the lot but failed after the basics) so my question is can you use python for game programing? (im going to make a rpg) what ever happens im probably going to use it but i need some feedback or tips to point me in the right direction (or links to tutorials) i understand its not the ideal language to use but ive given a liking to it and hopefully buying a book about it soon. yours sincerely richell~

Share this post


Link to post
Share on other sites
I wouldn't say its not ideal - it is in fact one of the better choices available, especially for beginners. But go look at pygame.org for 2D stuff or panda3d.org for 3D stuff - they do all the heavy lifting letting you worry about actual game stuff.

Share this post


Link to post
Share on other sites
A couple professionally made games have been made using python and Panda3d. When you say not ideal... you mean... in what way? I'm considering switching from C++ (which I'm reasonably proficient in and have 10+ yrs experience in) to python for making games.

Cheers
-Scott

Share this post


Link to post
Share on other sites
Quote:
Original post by Lethe
I wouldn't say its not ideal - it is in fact one of the better choices available, especially for beginners. But go look at pygame.org for 2D stuff or panda3d.org for 3D stuff - they do all the heavy lifting letting you worry about actual game stuff.

Yes, check out the pygame mainpage and you'll see plenty of examples of what is possible.


p.s. I believe the Python RPG article on gamedev is one of the most popular articles of all time! If you haven't read it that might motivate you since you are interested in making an rpg?

Share this post


Link to post
Share on other sites
I've been learning to use pygame and from what I have seen It works pretty well. If something really needed to be time intensive then you just write it in c++ and use that.

Pygame was designed to make games. That in itself shows that python can be used to make games.

if you need more proof.
.Backyard sports(football, baseball.....) was made in python.
.check out Panda3d.net it shows what people have made in python. One project wss making a shadow of the colossus type game. It looks pretty cool too.
.Try it yourself Im pretty sure you won't be dissapointed.

Share this post


Link to post
Share on other sites
I think the fact that Python is a scripting language will make a lot of people say that it's sub par and won't be fast enough or give you enough control. Well, Python doesn't let you allocate your own memory, it does let you program and learn programming faster.

And, Python's an actually very fast language! It might not be C++ fast, but it's fast. It claims to be used often as a prototyping language.

I'd say it's not a bad place to start out, but it's not a perfect place to start out. I started with it, but it was hard for me to grasp the concept of types until I went for Java. This especially became a problem when I got into classes etc., so I stopped my Python training early.

I guess my suggestion, then, is to learn Python, then without stopping Python, also learn a more type-based language.

Share this post


Link to post
Share on other sites
Quote:
Original post by Splinter of Chaos
I started with it, but it was hard for me to grasp the concept of types until I went for Java. This especially became a problem when I got into classes etc., so I stopped my Python training early.

That's not about types, that's about type systems. A language like Python has fluid, dynamic typing, where variable identifiers are bound to objects of any type. Languages like Java, C and C++ are more rigid, limiting a variable to referring to a specific type and/or its subtypes only. The value of the Python approach, however, can be seen in C#'s introduction of the var keyword in 2.0, and the fact that a similar facility is set to be introduced in the next iteration of C++ (using the auto keyword for type variance).

Ultimately, though, you're right: it's important to learn languages that adopt various approaches in order to obtain a more complete understanding of the subject domain.

Oh, and Python isn't a "scripting language." It's a programming language that's usable for scripting.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this