Sign in to follow this  
Lobotomy

Python, 3D, and other things

Recommended Posts

Lobotomy    122
A number of questions I had were addressed in another thread regarding Python and C++, however I decided to start up a different thread so as to not hijack the other topic as I have some different avenues of inquiry to persue. I'm more or less a hobbyist when it comes to programming (took lots of classes back in high school, but never went college with it), and I've been dealing mainly C for a few years via working on text-based MUDs and the like. Recently I decided to move on and upwards to the realm of graphical games, specificly of which being 3D. So I've been looking into this and digging around the site for various information I'll need to make the transition, and which directions I should be looking in. From what I gathered out of the other thread, Python would probably be a good language for me to move to. I had been considering C++, but having dealt with C for so long now the idea of moving away from much of the tedious memory leak and segment fault issues sounds very interesting. This might be a rather stupid question, but 3D games can be done in Python, correct? And if so, about how well can they be done, or is there no particular limit other than the ability of the programmer and the hardware involved? Also, the other thing mentioned about Python that interests me is the multi-platform aspect described. For that part, I was also considering Java perhaps. But if Python can do that too, all the better I suppose. I've also downloaded ActivePython thanks to the link in the other thread, and I'll have a look at it in a while, but I may have another stupid question regarding that which is: Does ActivePython include any sorts of tutorials for learning Python, perhaps? Or would I need to seek out an alternate information source on that one? Another thing I'd like to know is if anyone has had success creating MMO games with Python using the whole client and server software scheme thing. And, where I might want to look for information regarding how to create client and server seperated software for making an MMO possible. Such as the sorts of processes to leave to the server program, and what to leave up to the client program, and whatnot (I have some thoughts on that, but they're kinda sketchy). My goal in trying my hand at graphical games, ultimately, would be to create a MMO (relatively of the FPS/TPS and Flight/Space Sim variety) simply to see if I can even do it. I'm not neccessarily concerned with whether it's successful or uses glitzy fantasmatical graphics, so much as it actually works. I had other questions, but they escape me at the moment. I realise that much of what I'm asking is answerable were I to simply continue digging around looking for it instead of bringing this topic up, but I like to see what I can find out this way too. Responses and further information are greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites
Lobotomy    122
Oh. And another thing is, what sort of ways are there to implement 3D graphics in Python? DirectX? OpenGL? Does it have its own integrated methods?

Share this post


Link to post
Share on other sites
rollo    366
Don't know about DirectX, but there is pyOpenGL that has worked fine for me. There is also PyGame and PyOgre depending on how much more juicy stuff you need.

The only real downside with Python vs C++ is speed. Lots of logic in pure python are going to be much slower (10-100 times), but its pretty easy to call C libraries from python, so if some part turns out too slow you can always rewrite it in C. Dont worry about potentially having to rewrite things a second time, development in python is so much quicker that you have plenty of time for optimizing if there is a need. Games like Eve Online (MMO) for example use this method. Much of the game written as libraries used by a core of python.

If you are familiar with C and programming in general (which it seems) I can really recommend the book "Dive into Python", is great and very quick way to learn python if you have decent programming experience. Its also available free online: http://www.diveintopython.org If its too much of a plunge there are other sources around. google is your friend.

Share this post


Link to post
Share on other sites
Lobotomy    122
Thank you, that definitely helps quite a bit. I'm not neccessarily sure what I'm looking for graphics-wise, but seeing as my own computer is relatively low-end compared to what's out there right now I'll probably shoot for modest graphics around that range (if I can't play my own game, why bother?). I'm looking into PyOrge at the moment, as I remember someone suggesting Ogre at some point in the distant past when I tried looking into 3D before. Although I'm not sure to what extent it can or should be used. I notice that its a "3D engine", so can I assume that means it handles all aspects of graphics and all I need to do is splice its usage into the inner, non-graphical guts of a game to get a game-shaped result? But I also don't exactly know what kind of hardware requirements PyOgre will demand, or if I can create as high or low end as I want with it, or othersuch.

Err, I should probably mention that I keep saying I'm looking into things due to my currently having very brief spurts of internet access non-home-based, as I recently moved to a new locale and don't have the net running there. So if I'm coming off as lazy by that, my apologies.

As for the speed problems and whatnot, I suppose I'm not quite as concerned with that if I keep my current aim of low-end hardware spec graphics (should balance out?) so long as I can do much better at getting a grasp at making this lofty little dream of mine a reality through something like Python.

Anyways, thanks for the advice and links. Further help appreciated too.

Share this post


Link to post
Share on other sites
Hollower    685
Just a note about PyOgre. At least from my own experience, it can be tricky to get up and running so you may want to save it for when you are more experienced with Python. First I struggled with getting the relative paths configured correctly (is it ../media or ../../media? That kind of thing.) Then the example framework that came with it was broken (had to edit the files to change anything using degrees to radians). It also looks like PyOgre is being superceded by Python-Ogre, but you still may have to go from tutorials for the former until it gets its own.

Share this post


Link to post
Share on other sites
Lobotomy    122
Yeah, it seems to me too that PyOgre has kinda gone under Python-Ogre. Primarily from seeing that there's no Python 2.5 version of PyOgre (2.4 is the last one they have I think), while Python-Ogre does. But I appreciate the advice regarding it. Although I'm not exactly sure how I'll do this process. I'm halfway thinking since I'm diving into a new language as it is, that I'll probably just throw caution aside and dive into all that I can and see if I can figure it all out in the process or what.

I'm slightly tempted at the moment to try making a few non-MMO games perhaps at the same time, or prior, simply for the sake of doing so. Sounds interesting.

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