Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am looking to create a game. Starting with something simple, the "hello world" of gaming if you will. I think OpenGL will fit my goals. I want to start on a PC because its readily available to me. Eventually I would like to develop on the iPhone and since it uses openGL I feel this is a good translatable skillset.

I would really like to keep things simple. Maybe start with PONG then a 2D scrolling Mario-ish game. Ultimately I want to create a game similar to Farmville.

To the experienced game devs out there, do you agree? Does OpenGL offer a free/low cost to entry as I think it does? How well does the skillset Xfer to the iPhone (I believe I'll need to use C on the PC and Obj-C on iPhone)? Finally, what are the "big-3" using for development (PS3, Nintendo, Xbox)?

share|improve this question
1  
This question is asked very often. Search the site for existing answers. –  jhocking Jun 15 '11 at 15:01
1  
Although if 'my' is in the title it is not a duplicate a long as a different person asks it each time. :) –  Jonathan Connell Jun 15 '11 at 15:04
4  
The big three should not influence you at all, simply because (no offense meant) you're not going to be developing for them in the forseeable future. –  The Communist Duck Jun 15 '11 at 15:08
    
Wow @ the amount of answers posted so fast, when there has been hardly any activity for the past few hours... –  Jonathan Connell Jun 15 '11 at 15:12
1  
@jhocking : I was jhocking... (sorry :P) –  Jonathan Connell Jun 16 '11 at 8:05
show 1 more comment

4 Answers

up vote 7 down vote accepted

On OpenGL:

OpenGL is a suitable choice for a graphics API. There's a fair bit of legacy cruft floating around in the API, especially if you are not using the latest version, which can be distracting and confusing for a newbie. It's also a fairly low-level system and it's possible you may want to investigate other potential 2D engines that provide a higher-level API. This is especially true if you only want to focus on 2D graphics initially, because OpenGL is a 3D API -- it has no "2D mode," and if you don't understand the fundamentals of the 3D graphics pipeline that you're using, even when faking 2D with it, you can get yourself into some uncomfortable spots with weird, difficult-to-diagnose (for you) bugs.

There's a lot of questions on the subject of 2D engines here.

OpenGL, Direct3D, whatever -- it's more important that you learn the fundamentals of graphics programming. That skillset will transfer to any API or any engine, which means when changing platforms you simply need to learn another API and how that API exposes those fundamental, shared concepts, which is trivial. Or at least should be, for a good programmer -- if it is difficult for you, you just need to practice it more.

Does OpenGL offer a free/low cost to entry as I think it does?

Yes, it costs nothing to use OpenGL itself.

How well does the skillset Xfer to the iPhone (I believe I'll need to use C on the PC and Obj-C on iPhone)?

You can use C and C++ on iOS as well -- you'll require a minimum amount of Objective-C bootstrap, but the bulk of your program can easily be written in other languages. The iPhone provides you the OpenGL ES API, which is essentially a subset of the full OpenGL API. It should be relatively easy for you to adapt your code to run on an iOS device.

Finally, what are the "big-3" using for development (PS3, Nintendo, Xbox)?

It doesn't matter. This kind of question is indicative, usually, of a concern that you should pick the one "right thing" to learn and focus on that. But there isn't a right thing and if you know the basics, as I noted in the initial part of this answer, you can learn any API presenting those basics with relative ease.

That said, the PS3 has an OpenGL implementation that nobody takes seriously and a proprietary API for anything real. The 360 uses an API that is quite similar to Direct3D. The Wii probably uses something OpenGL-like as well, although I couldn't say for sure.

On "Your Needs:"

We can't really answer that for you, since we only have the most cursory understanding of your needs and your ability. Just like learning APIs, evaluating requirements and potential solutions for those requirements is an important part of a developer's training.

The best way to do this is to try it -- set up a project and try to build a quick tech demo with OpenGL. You'll get a feel for how the API works, where you can find good reference material (because you will invariably get stuck somewhere and have to hit up Google to find out, for example, "how to create a shader in OpenGL."

You can then grab some higher-level 2D engine and try to recreate the same tech demo and see how you feel about the relative experience. You can try to demonstrate features you know you'll want in your game -- if you want fancy alpha-blended explosions, try building demos that render a bunch of transparent sprites (or even just blank, colored quads) intermixed with some opaque ones. You'll discover the problems inherent in rendering transparent graphics and you'll have to solve them with both pieces of technology you're evaluating. One will, perforce, work out better/easier for you. That may be the API you want to actually stick with.

share|improve this answer
add comment

Yes you can use OpenGL freely. Its a good place to start since its a well-known api with a lot of resources already out there. Since OpenGL is available on a lot of platforms, your skills once you learn it will probably transfer nicely.

However, if this is your first time diving into unmanaged code, you could lessen the learning curve my using a managed graphics api and then jump to OpenGL. But that depends on where you stand now.

Also, you can use c++ with OpenGL on the pc. Hope this helped :)

share|improve this answer
add comment

Yes, you can use OpenGL to render 2D stuff and it gives you some flexibility. I regularly does this, but it is a bit trickier than using a simpler 2D only API. What you gain is accelerated scaling and rotating, and the step to 3D is not that big if you want to take that later on.

The API itself is C, and so is the GL ES API (for iPhone), but you can use it from Objective C and C++ (and most other languages).

The consoles usually use custom low level API:s, but the Xbox360 one looks a lot like DX9.

share|improve this answer
add comment

Listen to this sentence and repeat it a couple of times, because it's very important if you want to program games: Develop games, not engines.

If you want to develop games, you shouldn't use low level things like DirectX or OpenGL at all, because 99% of your learning time will be spent dealing with the graphics API instead of actually programming your game.

There are tons of free good engines for 2D and 3D out there, and even if you don't want to take a finished engine and work with it, you should at least consider using an abstraction layer library like SFML, which builds upon OpenGL, but also provides most other stuff that you need for game programming, like support for audio, window and input handling, networking, etc. ( http://www.sfml-dev.org/ ).

So my advice: Forget about OpenGL for now, search for engines or high level APIs out there which let you achieve your first Pong game more quickly, and go with it.

share|improve this answer
1  
Engines are much more fun than games ... :) –  Notabene Jun 15 '11 at 15:10
1  
Learning a graphics API is a piece of game programming - he should not exclude it. –  Wroclai Jun 15 '11 at 15:13
    
I disagree. Learning a graphics API doesn't have anything to do with games programming. You don't need to know about OpenGL/DirectX to program games. That said, if he's still interested in learning more about it after he started working on his games, he can pick it up later. But in order to get started on programming games, I absolutely suggest that he stay away from low level APIs for now. –  TravisG Jun 15 '11 at 15:16
    
But in order to get something on the screen you HAVE to learn either a software based graphics API or a hardware based graphics API, it is included in the progress of making a game. –  Wroclai Jun 15 '11 at 15:17
    
Of course, but like I said, he should use a higher level API or even an engine when starting out, which does the job for him. –  TravisG Jun 15 '11 at 15:20
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.