• Advertisement
Sign in to follow this  

Getting started with C++ Game Development

This topic is 4248 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I was wondering, what do I need to make games with C++? I have Borland C++ Builder 6.0 and Bloodshed Dev-C++. I would like to know: 1.What I need to make games 2.Links to tutorials/gamedev.net articles for using the tools I need to make games I already know C++

Share this post


Link to post
Share on other sites
Advertisement
Ok - so I need the DirectX SDK to make games?

And can I use the DirectX SDK with Borland C++ Builder 6.0?

Share this post


Link to post
Share on other sites
Hi, nice to meet U...

Of course U can... U just need to link the library and header file into the borland then U can compile your program...

Share this post


Link to post
Share on other sites
Ok I'm very confused. When I start a new Windows Application in Borland C++ Builder 6.0, I get a blank form with the following code:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------


Now what do I do?

(sorry this is very confiusing since I have only ever made command line apps in C++ before)

Share this post


Link to post
Share on other sites
If that is the case, I think should go for a "Win32 tutorial" first. Because it is really hard to explain here. At least U must know how to create a blank Window and have some understanding on the message loop.

Sorry about that I didn mention earlier, I am fans of Microsoft. But I do did some work on Borland but with very little knowledge about Borland.

For that piece of code, that is a dialog when U compile it. U can customise the "TForm1 *Form1;" to other name. Eg. TForm1 *My_Form;...

Share this post


Link to post
Share on other sites
I would highly recomend that you check out Microsoft Visual C++ Express Edition. It is an IDE and compiler like Dev-C++ and Borland, but it is much better, at least in my opinion and numerous others.

If you want complete easy of use for getting started, check out SDL. SDL handles the creation of windows, 2D graphics, keyboard/mouse/joystick input, CDs, audio, and more. I would recomend this over the Win32 API for a beginner. It would be a great way to at least get started making games, then once you have the hang of it, moving over to Win32 shouldn't be tough.

Share this post


Link to post
Share on other sites
ok. how much win32 do I have to learn before I can try games?

Also: another question: Before I installed Borland C++ Builder, I tried MS Visual C++ Express Edition, but my code didn't work!(even in command line). when i opened a default app it outputed to the screen using "Console::WriteLine(L"Hello World")" which I have never heard of! so if your a microsoft fan do u know why my code isnt working?

Share this post


Link to post
Share on other sites
Quote:
Original post by sahanx
ok. how much win32 do I have to learn before I can try games?

Also: another question: Before I installed Borland C++ Builder, I tried MS Visual C++ Express Edition, but my code didn't work!(even in command line). when i opened a default app it outputed to the screen using "Console::WriteLine(L"Hello World")" which I have never heard of! so if your a microsoft fan do u know why my code isnt working?


You need the Platform SDK for Win32 apps. I'm guessing you created a .NET project.

Share this post


Link to post
Share on other sites
Quote:
Original post by Omid Ghavami
Quote:
Original post by sahanx
ok. how much win32 do I have to learn before I can try games?

Also: another question: Before I installed Borland C++ Builder, I tried MS Visual C++ Express Edition, but my code didn't work!(even in command line). when i opened a default app it outputed to the screen using "Console::WriteLine(L"Hello World")" which I have never heard of! so if your a microsoft fan do u know why my code isnt working?



You need the Platform SDK for Win32 apps. I'm guessing you created a .NET project.

No, it was a Win32 project. I installed the SDK, but I think I might have configured VC++ incorrectly. I will try VC++ again.

[Edited by - sahanx on July 7, 2006 5:01:47 AM]

Share this post


Link to post
Share on other sites
Ok - I might try SDL.

Hey would OpenGL mabye be easier than DirectX?

Share this post


Link to post
Share on other sites
Good News! Visual C++ works!

I will learn a bit of basic Win32, then try DirectX

Share this post


Link to post
Share on other sites
Alot of people seem to think that OpenGL is easier for a beginner than DirectX, but not be a signifigant amount. I would stay away from both OpenGL and DirectX for a while though. SDL or Win32 is enough to create a complete 2D game. I would recomend at least making a Teteris/Pong/Space Invaders clone with just them, not DirectX or OpenGL first.

Share this post


Link to post
Share on other sites
Oh no! Problems!

You see, in VC++ I can create Win32 Command Line Apps but Windows Forms Applications are only available for .NET.

What do I do now?

Share this post


Link to post
Share on other sites
Ok im learning to use SDL with Dev-C++ but i'd really like to use Visual C++ instead but I can't create win32 windows forms apps!

what do i do now?

Share this post


Link to post
Share on other sites
Make sure you have installed the Platform SDK and then follow the directions on THIS PAGE

After that everything should work as advertised.

Quote:

Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box.

Add the paths to the appropriate subsection:

Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin

Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include

Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib

Note: Alternatively, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the \vc\vcpackages subdirectory of the Visual C++ Express install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%\Local Settings\Application Data\Microsoft\VCExpress\8.0" if it exists before restarting Visual C++ Express Edition.



Step 4: Update the corewin_express.vsprops file.

One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib" to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"



Step 5: Generate and build a Win32 application to test your paths.

In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder “%ProgramFiles%\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\".

In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:

// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;

Save and close the file and open Visual C++ Express.

From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Console Application template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.

As a final step, test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.

Share this post


Link to post
Share on other sites
FOr some reason code that works in Dev-C++ still dosent work in VC++. I think I'll just use Dev-C++ for now. Sure, it doesn't have IntelliSense or anything, but it'll do

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement