views:

672

answers:

19

I have been searching through the website looking for the best language for beginner game development. Many people say a C based language, others suggest Python.

Normally I would just pick one, but this is my dilemma. I am not sure if this is correct, but I read from programmers on here that C is much faster at 3d render, whereas Python is not. Then people post support stating that Python can excel at 3d rendering.

I do not know about either.

My current goal is to make a game with graphics similar to Blizzard's Diablo II.

I have experience with PHP, JavaScript frameworks and pure SQL. Also, I work in a Mac environment and do have access to Windows XP.

With all that said, where should I begin and why?

Cheers

EDITED WITH NEW QUESTIONS

Okay this is all overwhelming to me. Forgive me if I have overlooked anything. I have been viewing Unity 3d and XNA, but these are mostly game engines utilized with the .NET Framework, primarily C#?

If I wanted to solely do all of my development on OS X, but compile for multiple platforms, which is the optimal choice?

+14  A: 

I would try XNA Game Studio and see if you like it. I've use it a little bit and like it so far. It's tied to .NET which is a pretty solid framework to get started in and looks good on any resume.

I think it's a smart idea to begin with a framework to help you create these games. Otherwise, the the task of making any kind of meaningful game will be way too large for any one person to handle. Also, you'd be re-inventing a ton of functionality. The only way I would recommend this is if you wanted an academic exercise and just wanted to learn how these engines work from the ground up.

Building games are both difficult and fun. There are several interesting challenges game creation provides and this is a great way to get smarter and build something you can enjoy. Start small, keep at it, and don't give up! Who knows, maybe in a year or so I'll be checking out your game.

Here's a link to get you started.

Robert Greiner
Yes, definitely start with a gaming framework. Please do not start with Python, unless you are already familiar with that language.
orvado
@orvado agreed, I added that to my answer.
Robert Greiner
The OP doesn't specify familiarity with any .NET language, so it's six of one, half a dozen of the other.
Ignacio Vazquez-Abrams
@orvado as Diablo II is a fairly simple isometric 2D game I think Python/pygame may actually be a good fit. I wouldn't recommend it for a 3D game though.
extraneon
+1 for the love of .NET and XNA
Hasan Khan
+1  A: 

I would set your sights on something smaller first. Diablo was developed by a large team and took years to develop.

Then you need to decide what platform you will design for: desktop, web, mobile, or console.

Assuming you choose something like XBox, there is XNA which can be coded in C#. If you choose to develop a web app then there are lots of web game generators like Sploder.

Lucas B
+1  A: 

My understanding is that graphics-intensive games like Diablo II are generally written in C++, for performance reasons.

But I like the idea of XNA-based .NET development in C# or VB.

Robert Harvey
A: 

I would recommend C# with XNA, because the XNA library does a lot of the work for you.

ChessWhiz
+1  A: 

It depends. C/C++ is much faster since it is compiled to plain processor instructions. Python is interpreted, which makes it slower by definition. The important question is: What is your game going to be like? Something like Diablo II might be efficiently possible with Python. Interpreded languages tend to be much more comfortable to work with, so if performance and distribution allow it, go for Python. Otherwise C/C++ is a great choice because of its speed and number of available libraries (almost every graphics library was initially coded for C/C++).

elusive
C/C++ is almost never compiled to bytecode, rather, it is compiled to machine language.
TokenMacGuy
@TokenMacGuy: I picked the wrong words. Corrected now.
elusive
Strictly speaking Python is not interpreted, it's bytecode-compiled.
Ignacio Vazquez-Abrams
@Ignacio Vazquez-Abrams: And that optimized bytecode is not interpreted? As far as i know, Python does not generate processor instructions. Its the same thing with Java.
elusive
Both Java and Python have JITers. Java even makes theirs available by default.
Ignacio Vazquez-Abrams
+1  A: 

I started playing with game development years ago using a mix of C++ and the Allegro game library. I'm not sure how far Allegro has come in the last decade, but I would suggest getting your feet wet before diving into XNA.

Matt H.
+1  A: 

It is reasonable to begin with something familiar like Haxe or ActionScript (since you already know JavaScript) in order to learn about game development techniques and design patterns. Once you've learned that, learning another programming language is relatively trivial.

Splashdust
+2  A: 

If you look at a game like Civ IV you can see that the GUI is implemented in C (SDL I believe) which binds to Python, and a lot of non-GUI logic is written in Python.

This may be a good way to start, especially for a prototype which can be very dynamically developed.

If you find a bottleneck, you can always port that to C or something like that and bind it into Python.

Whether or not you use Python, you can at least play a bit with Pygame.

And it has the added bonus that the game will be playable on the mac. I don't now how good .Net is supported on that platform.

extraneon
Civ IV is C++ not C.
mathepic
And to clarify: Python will be portable to any platform that supports it, notably Linux, BSD, Mac, and Windows, whereas XNA (the main .NET choice) is only for windows. I think MonoXNA is still experimental.
mathepic
+10  A: 

Choosing a language because it will eventually be necessary for performance of a program you haven't written yet is a very good example of premature optimization. This is especially true since you will be writing a program as a learning exercise.

Learning C++, learning 3d rendering API's, and also learning game programming techniques are three tough goals. It's probably a very good idea to do them one at a time, so that you aren't struggling with all three at the same time.

If you've already decided on C++ and a particular graphics API (OpenGL, DirectX, whatever...), then I'd advise learning them on three separate projects, in that order, first a simple console C++ app, or a series of exercises such as on Project Euler, then familiarize yourself on the API with some graphical visualizers, and once you've reasonably conquered both of those move on to building a game.

If you aren't really married to any platform or toolchain, you should probably start by learning the game programming techniques. Unfortunately, neither PHP nor JavaScript really lend themselves to this, but as others have suggested, python, with the use of the PyGame library, is a very easy thing to pick up.

once you've got a feel for how game programming works in an easy language, you can start learning your way around a 3d api, building a game that suits your goal. It probably won't be too long before you start running into performance problems. Only then should you look into rewriting critical code paths into another language.

TokenMacGuy
So many times this.
Ignacio Vazquez-Abrams
+1: "performance of a program you haven't written yet".
S.Lott
Regarding Python: it's relatively easy to hook python on C or C++ libraries to offload the heavy tasks to faster languages and still retain ease of scripting for the rest. I suppose it's what PyGame does ?
Matthieu M.
A: 

I would suggest you look at what sort of games you actually want to make. Fast pace 3d fps require some other skills then SimCity. There are quite a lot of frameworks for game development, each with its own advantages and specialties. Look for one that matches the kind of games you would like to write. Choosing the language is less important.

For the Mac Unity seems to be popular. Another interesting option you can explore is Blender. While it is a 3d modeling application, it is scriptable in python and can be used for game development.

araf3l
+2  A: 

I've just started trying it out myself, but if you want to try Python with 3D, I would recommend trying Panda3D. All of the core functionality has been written in C++, but you can program in Python or C++. It is a game framework so it has a lot of built-in functionality like collision handling, some artificial intelligence and performance monitoring stuff. It was developed by Disney, but is free and maintained by both Disney and Carnegie Mellon. There's a great [manual] online and and quite a few sample programs. Another cool thing about it is that there is a web plug-in for it. Oh, and did I mention that it is cross-platform?

Justin Peel
+1  A: 

I found C++ with OPENGL alot easier to manage than others, mainly because of the vast amounts of Information on the internet/Books. I did use some JOGL (Java+OPENGL) but it was rel. new at the time and I didn't like it as much.

Tetris is usually a good starter game IMO.

Mercfh
+2  A: 

...I read from programmers on here that C is much faster at 3d render, whereas Python is not. Then people post support stating that Python can excel at 3d rendering.

This really depends. C is much faster overall, but when it comes to games, your bottleneck is often graphics rendering - and then, optimizing your OpenGL calls, for example, can let you write games in Python and still get nice performance. However, Python isn't a good choice for overly complex/3d games by itself; you would want to use engines like Panda3D instead (it has been mentioned here). Why? It provides rendering code written in C++ (in this case) for performance, allowing you to write higher-level logic in Python, but still use C++ if speed is absolutely essential. If you haven't learned a language yet, Python will be less intimidating - but C will give better performance in the long run. Note that optimizing prematurely (i.e. worrying about performance before you have much written) isn't a good idea.

Also, note that either way, you're probably going to learn raw OpenGL if you really want performance (or use a game engine).

...graphics similar to Blizzard's Diablo II.

Because this is an older game (as has been mentioned), performance and speed may not be absolutely essential. Python is known for rapid prototyping and faster development.

...Unity 3d and XNA

From what I know, XNA is generally Windows-only, but it's great if you're new to game development. Unity3D supports Windows and Mac, even though it uses .NET languages. It also supports a dialect of Python called Boo, so this may be useful.

For Python engines and libraries, you'll have PyGame and Pyglet for 2D. Pygame is a wrapper around SDL, and it seems to be more popular. Pyglet is a windowing framework for Python and OpenGL, though it also provides animation, event loops, media playback, and more. However, that means that you'll have to learn OpenGL, while with PyGame, it may not be necessary. XNA frees you from having to learn DirectX, and Unity gives you its engine. Panda3D has been mentioned for 3D; Pyglet+OpenGL also can handle 3D.

Unity looks the nicest; it may be overwhelming, however. Python is okay, but there isn't always as much provided.

l33tnerd
A: 

If your goal is to make a game per se with the requirements of developing on OSX and running anywhere it's sounding a lot like Unity3D would be a good match. On this path you'll end up coding in UnityScript and or C# probably. It gives you a lot of tools in a package and it's popular in games development circles. So it sounds like a good match for you too me.

If you just want to learn, you can use whatever language you like. Something fairly popular if you want readily tranferrable skills. I wouldn't worry too much about performance if you're just learning concepts. Languages are a dime a dozen and most will teach you a strong basis to build on.

If you want to become a professional games developer for a big name studio working on consoles you might want to consider learning some C or C++ - particularly to understand memory management, pointers and some other low level concepts.

Montdidier
A: 

You may check out (some of) the following (cross-platform) game engines:

OpenArena, ogre3d, Irrlicht (hosted on sourceforge), Sauerbraten, dimension3, Panda3D, Cube, Unity, torque-3d, ...

http://osx.hyperjeff.net/Apps/apps?f=game%20engine

forkd
A: 

Since you're a newbie, you want to remove as many programming difficulties as possible. I would recommend an isometric game engine like IsoWorld that has a lot of rooms, objects and graphics already built-in. It's available for both Mac and PC, and it has a demo.

Brandon Corfman
A: 

I have used XNA myself and I have to say its a very nice platform to start on, however, if you're sure you wish to start with a platform independent project then I would suggest you look at the likes of OpenGL with C/C++. Also take a look at the likes of GLWF http://www.glfw.org/ or SDL http://www.libsdl.org/ for windowing, OS event management and input handling. I've used SDL for a multi-platform port of Tetris but have since switched to GLWF for a version of Asteroids I'm writing. GLWF comes with a reference and users manual when you download it.

The engines page on DevMaster: http://www.devmaster.net/engines/ contains a lot of links to libraries for various aspects of game development and would be a good place to start.

A. Murray
A: 

You want to start with Diablo 2? That's a massive game. Even the original Diablo would take months to make on your own. I would recommend starting with something smaller, probably in 2D.

I personally used Tetris as a starting point.

With regards to a language that's cross-platform and develop-able on Mac I'd probably vote ActionScript (Flash). Should be fine performance wise unless your doing some crazy heavy math (which I doubt you'll be doing) or wanting reasonable 3D rendering.

JonoRR
A: 

You can't really have your cake and eat it too.

If you want raw speed, you're going to have to roll the C/C++ way more or less. Compiled binaries are still the fastest way out there.

If you want super awesome cross-platform portability, Python is probably your best bet. It's horrid slow though. :-/

If I was writing a 3D game, I'd write it in C++, with #defines for any cross-platform work.

I don't particularly care for the frameworks mindset for the usual reasons people have.

For a programmer wanting to get into game development, I would recommend C++ without a second thought. You will be able to create sufficient libraries to allow your expressivity, generally speaking.

Paul Nathan