Game Programming and Development Tools

how to start making games with c++? – Lonelli

Lonelli

Member

Posts: 14
From: Finland
Registered: 07-29-2004
I have done some c++-programming, but mostly in DOS. What compiler and other stuff should I use for making games in Windows?

------------------
Click http://www.iguaanipelit.urli.net for free games

GUMP

Member

Posts: 1335
From: Melbourne, FL USA
Registered: 11-09-2002
If you already understand the basic concepts then personally I'd find an open source library or engine that targets your particular needs. Even if you end up rewriting most of the code at least you have a functional framework to begin with.

So, what type of game are you planning on making? Have you ever thought of joining a group or a company already in existence?

Briant

Member

Posts: 742
From: Stony Plain, Alberta, Canada
Registered: 01-20-2001
You have a few options.

The best choice (in my opinion) is to go with a Microsoft compiler. You can get Visual C++ .NET 2003 Standard for about $100, or cheaper on places like Ebay. Or even Visual C++ .NET (2002) Standard or even Visual C++ 6.0 Standard for cheap, but they're getting a bit dated (but still good for just getting into programming on Windows). Also, you can get the Visual C++ 2005 Express Beta for FREE at http://lab.msdn.microsoft.com/express/visualc/default.aspx

Another popular (i.e. free) option is http://www.bloodshed.net/download.html but I've never used this, so can't comment too much on it.

As for "other stuff", you'll probably want to get some exposure to OpenGL and/or DirectX.

For beginners in game programming, I recommend:
- for OpenGL
- getting this book: http://www.amazon.com/exec/obidos/ASIN/1592003699/
- visiting this site: http://nehe.gamedev.net
- for DirectX
- getting this book: http://www.amazon.com/exec/obidos/tg/detail/-/1556229135/
- visiting this site: http://www.two-kings.de/tutorials/d3d.html
- for everything
- http://www.gamedev.net

And asking questions here!

------------------
Brian

Lonelli

Member

Posts: 14
From: Finland
Registered: 07-29-2004
Thanks for your answers. I'm not planning to join a group, I've just made some small games with Game Maker and BlitzBasic and I was wondering if it's possible to start doing something in C++. And I'd like to get the software I need for free, maybe bloodshed then. I guess there's a free Borland compiler too...?

------------------
Click http://www.iguaanipelit.urli.net for free games

Briant

Member

Posts: 742
From: Stony Plain, Alberta, Canada
Registered: 01-20-2001
Borland has a free compiler too, but it's only command-line based (i.e. no user interface), so although it will work, it is going to be cumbersome to get set up nicely.

That Visual C++ Express Beta 2005 might be a good choice for what you want. But then I'm partial to the Microsoft compilers for programming Windows.

------------------
Brian

HeardTheWord

Member

Posts: 224
From: Des Moines, IA
Registered: 08-16-2004
Win32 Programming took me a while to understand and I still consider myself a novice at OpenGL programming. I think BrianT mentioned some excellent resources for OpenGL (I don't know much about DirectX).

Another site, that is much like gamedev.net, is www.gametutorials.com . But since they decided to publish their book you have to pay for most of their tutorials. It might not be a bad idea to check the book out if you have $50.

I would also take a look at SDL, at www.libsdl.org , if you are interested in 2D (or 3D) games. It is a simple library that can set up your window and handle events and has the option to use OpenGL for rendering. This can help you learn OpenGL before tackling Win32 message handling. Hope that helps!

Lonelli

Member

Posts: 14
From: Finland
Registered: 07-29-2004
I downloaded Dev-C++, which seems nice. I've tried to look some tutorials but I'm still very confused... At nehe.gamedev.net there seems to be quite good tutorials, but Dev-C++ doesn't include glaux.h, which is needed for all the code there is...

I am more interested in making 2d games so I got to take a look at that libsdl page. So OpenGL is the one to use for 2D stuff?

------------------
Click http://www.iguaanipelit.urli.net for free games

Briant

Member

Posts: 742
From: Stony Plain, Alberta, Canada
Registered: 01-20-2001
quote:
Originally posted by Lonelli:
I downloaded Dev-C++, which seems nice. I've tried to look some tutorials but I'm still very confused... At nehe.gamedev.net there seems to be quite good tutorials, but Dev-C++ doesn't include glaux.h, which is needed for all the code there is...

I haven't used Dev-C++, but I'm surprised glaux.h/.lib isn't included. Did you search the main include folder? Sometimes the OpenGL stuff is in a "gl" subfolder (i.e. #include <gl/glaux.h> ). If it's really not there, simply googling or asking on a Dev-C++ discussion board should set you up. I have Microsoft's glaux files, but I'm not sure they'll link properly with Dev-C++. I can send them to you to try if you can't find the "proper" files.

quote:

I am more interested in making 2d games so I got to take a look at that libsdl page. So OpenGL is the one to use for 2D stuff?

You have several options for 2D. Even though OpenGL is designed for 3D, it is fully capable of handling 2D, through the glOrtho functions. Here's a link (ignore the condescending comments there) that has a nice 2D setup for OpenGL: http://www.gamedev.net/community/forums/topic.asp?topic_id=104791

You can also do 2D in Direct3D, by just keeping everything using the same z-coordinates. You can also use the DirectDraw interfaces (from DirectX 7) which are exclusively 2D, but a bit tricky to set up the first time (I can help you with this if you want to go this route).

Yet another alternative on Windows is to use the more limited GDI and GDI+. These aren't really going to be a great choice for most games, though, as they are not hardward accelerated, and are more useful in stuff like editors and stuff that simple 2D games that don't need higher frame-rates.

------------------
Brian

kevryan
Member

Posts: 37
From: Shaver Lake, CA
Registered: 07-20-2001
I used to use Borland, but now use Visual C++ 6.0 for all my game development work. It is a little older, but works fine. I think Borland's compilier is now available online for free, but doesn't come with the IDE?

------------------
Kevin Ryan
Marble Blast
Minigolf Blast

HeardTheWord

Member

Posts: 224
From: Des Moines, IA
Registered: 08-16-2004
I started learning C with Dev-C++. Works well if you don't want to spend money on a compiler. Although I have been working with Visual C++ for about two years and prefer it over Dev-C++ (I'm biased, I know).

As for the glaux.h file. At the beginning of the first tutorial at NeHe they say there is replacement code for the glaux library on the front page. You might want to check that out and replace parts of the existing code. Here is the quote...

quote:
When the first tutorials were written, GLAUX was the way to go. Over time GLAUX lost support. Many of the tutorials on this site still use the old GLAUX code. If your compiler does not support GLAUX or you would rather not use it, download the GLAUX REPLACEMENT CODE from the main page (left menu).
Wacko4X

Member

Posts: 92
From: Bellvue, WA, USA
Registered: 08-21-2002
I thought that I might throw in my two-sense (considering this topic is dominated by Visual lovers and im a Dev-C++ lover -though it has its kinks-)

Dev-C++ is a great compiler/IDE and if you need any add-on libraries (such as Direct X, OpenGL, etc..) you cand download them via Dev's WebUpdate feature
In order to utalize this, open Dev-C++, click Tools > Check for Updates/Packages, click on the button that says "check for updates", search for what you need and then download it.

I would also like to point out that though DirectX and OpenGL are very popular they are not the end-all in game programming, in fact you dont even need to them to create a good 2D game.

I would suggest the Allegro Library (just because I am currently learning it, its free, and its easy to work with in both 2D and 3D) it can be found (with plenty of tutorials) at http://www.talula.demon.co.uk/allegro/
(woot! opensource!)

And I would like to say Dev-C++ is much easier to use, along with being free, when compared to Microsoft Visual Studios. The learning curve is much steeper with Microsoft VS. (sorry guys, were all biased)

And a word of warning to others who might skim through this: "Your first game should never be 3D. Start console, move to 2D, learn to love spending long hours, mountain dew (or coke), and debugging. And always remember, there are 10 people in this world, those who know binary and those who dont"

Happy coding!

(p.s. the other nice thing about Allegro is that it works cross-platform supporting BeOS, Linux, Windows, DOS, Solaris, and many more. DirectX cant do that)

[This message has been edited by Wacko4X (edited January 25, 2005).]

Wacko4X

Member

Posts: 92
From: Bellvue, WA, USA
Registered: 08-21-2002
Sorry, I didnt feel like editing a second time.

One downside to Allegro is that it is kind of a pain to get working with Dev-C++. (at least going through this book I have) Hopefully you will have better luck with the online tutorials.

Lonelli

Member

Posts: 14
From: Finland
Registered: 07-29-2004
Thanks for your replies, they've been for great help! I like Dev-C++ very much, so I think I'll keep on using it. It took a lot of time and Googling to get SDL work (I think it would have worked the first place if I just had used the update feature in Dev-C++), but it seems to make graphics programming easy so I'm quite excited about it. But I think I got to take a look at Allegro too...

By the way, Dev-C++ doesn't include glaux.h, but I found it from DiNGS, so I might get back to NeHe tutorials later... And yes, there is a glaux replacement code too.

------------------
Click http://www.iguaanipelit.urli.net for free games