View Full Version : Basics of C/C++ game programming
XvXJTNWXvX
10-22-2003, 03:02 PM
Hi, I'm new here and to C/C++.
Now before you start bashing me and telling me to learn more C++ before trying to attempt a game, please understand that I've been programing games for a while in Macromedia Flash. The only diffrence is in Flash, I didn't have to worry about displaying graphics or sound ect..
I just have a couple of questions that hopefully you can answer, or give me a link to a tutorial.
One, what is the best compiler for creating games?
And second, how do you display tiles of gif's?
I've googled these questions, but didn't come up with anything good. So thanks for any help. :)
EDIT: :rolleyes: Didn't see the sticky at the top. I'll check it out, but still if you have any comments please post them.
Sorry for not looking before I post.
Zoalord
10-22-2003, 05:00 PM
I will confess outright that I have never made anything in Flash before. I am willing to bet, however, that making anything in C++ is different than making something in Flash.
Thus we return to the problem of you not knowing C++ (Unless Flash programming uses C++ in some way). If you don't know C++, then you obviously can't use graphics and make games. C++ as a language does not provide support for graphics. Certain software companies and groups (like Microsoft) have made graphic libraries for C++. But, you can't use them until you now C++.
The best compiler hands down is MS Visual C++. The problem, however, is that it costs over a thousand dollars. Thus, I recommend Dev C++. Again, I cannot stress enough that you WILL have to learn C++. Knowing another language only helps you learn C++, it doesn't automatically give you the ability to make games.
Good luck! :)
you can pick up visual C++ .NET standard for around $100. if you have the resources and you really plan on sticking with this, i highly reccomend that compiler.
otherwise, if you just want a free compiler to get you started, i got my start on Dev C++ and i feel that, while not nearly as capable as MSVC, the ease of use and good design makes up for it.
XvXJTNWXvX
10-22-2003, 05:17 PM
Yes, programming in Flash is completly different. As I said, you don't have to worry about displaying graphics, Flash does it automatically by simply setting properties like _x, _y, _width, _height... and setting a frame rate. Also, It gave you simple key press detection (ie if(Key.isDown(Key.ENTER)) ).
Allthough I'm new to C++, I'm not new to game logic and all the functions that they both share. All I really had to do was learn the syntax, some new stuff like pointers and of course displaying graphics.
I searched download.com and came up with this Bloodshed Dev-C++ 4.0, is that what you were reffering to?
Thanks for your help. :)
XvXJTNWXvX
10-22-2003, 05:21 PM
... (weird name ;)) :
I'll probably pick that up soon. Since I'm still a student, I can probably get a student copy for about $25. :D
DavidP
10-22-2003, 06:42 PM
If you want to learn graphics programming in C++, I suggest 13h graphics. It is an EXCELLENT learning tool for beginning graphics programmers.
www.brackeen.com
that link should get you on your way.
Once you feel like you are superior in 13h graphics, here are 3 more API's to master:
SDL
OpenGL
DirectX
I suggest SDL first, because OpenGL and DirectX are huge steps from 13h, although that huge step can be done, and many have taken it before.
confuted
10-22-2003, 07:10 PM
DavidP forgot Allegro, which many people here seem to like.
SyntaxBubble
10-22-2003, 07:25 PM
I just wanted to say I never used 13h graphics or console games or allegro. I DID do a few game in the Win32 API, after I got the hang of it. That was when I moved out of console apps. I was using Bloodshed Dev-C++ at the time. :) It wasn't a bad, free compiler. I now have MS Visual C++ 6.0 and do most of my Windows apps in Microsoft Foundation Classes. I made an MFC Hangman game not too long ago, and I posted it here. :D Anyhow, when I moved on to graphical games, I started out with OpenGL, using NeHe's nice website as a guide. I now use, OpenGL, SDL, and DirectX. At the time, I have just finished a 3D engine in DirectX and started a new project. It's a first-person shooter paintball game. Terrain and objects are preset on a map, but it will randomly place trees using billboard images. :D I will post some more information in a NEW thread once I get some more done. :D I don't know that this had much to do with this post, but I just wanted to say a little something. :p
XvXJTNWXvX
10-22-2003, 07:56 PM
Wow, thanks for all the replies! :D
I downloaded Bloodshed Dev-C++ 4.0 and after a quick look at it, it seems great.
I'll take a look at 13h graphics and play around with it later. It might be a good choice for me since I won't be doing 3D procesor intensive games, just simple tile based games.
SyntaxBubble: Can't wait to see the game, I want to see how powerful C++/DirectX is. :D
Xeren
10-22-2003, 08:56 PM
Check your school bookstore for a compiler, I got MS Visual Studio.Net Academic version for $99 at my school. It has everything that the $1074 professional version has except for the OS and server software and version control, which a single developer doesnt need anyways.
XvXJTNWXvX
10-23-2003, 06:47 PM
Ok, thanks Xeren. I'll ask about it tommarow. :D
DavidP
10-24-2003, 01:17 AM
>I want to see how powerful C++/DirectX is.
Well you can do that by looking at any modern Windows game. :)
XvXJTNWXvX
10-24-2003, 12:57 PM
Do you have a link to it? I couldn't find it.
If it's at your site, your out of bandwidth. :(
Wow - My school was giving away Visual Studio 6 and I recently found out they are giving away the .Net package. I'm surprised that your schools are not allowing students to use the software.
When I purchased my laptop through the school they installed it on there for me, but if I ever decided to format harddrive I know where to look/go to install the software again. And its a known download so I am not hacking the school for the software.
I would contact the IT department or even you CS/CIS departments and ask politely if they are "supporting student development with software". :D if not then like mentioned above there are some great free compliers out there.
frenchfry164
10-25-2003, 12:18 PM
The best compiler hands down is MS Visual C++.
:rolleyes: don't make me laugh. Hands down the best compiler?
IMHO, mode 13h is a waste of time. Start out with a actual graphics library. I recommend Allegro, some recommend SDL, a few ClanLib. Just reasearch, and find the library you like.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.