Qbasicnews.com

Full Version: Game Making Tutorials for VC++
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Does anyone know of a tutorial that.

-SPECIFICALLY teaches you step-by-step how to make a graphical game.
-If SPECIFICALLY made for the Visual C++ programming language/IDE/whatever the heck I'm supposed to call that...

I've been looking for a while, but as usual... I can't find it, anywhere.
Search for "C++ tutorials". Don't expect to make anything graphical for a few weeks.
Um - there are no intrinsic graphics functions (no built-in, that is) in ANSI (standard) C++. However! Pick up Allegro ( http://allegro.cc ). Fast: gfx, sound, joystick, keyboard. Easy. You want to mess with multiple keypresses? Easier than QB. Smile
Well, is there anything that would work off of DirectX? I plan to use that instead of Allegro...
I've never used DirectX, for three reasons:
1) It's only for Windows. Allegro is for DOS and Windows, and will compile on either without changing one single line of code.
2) DirectX is hard to use in VB - and if it's hard in VB, it's certainly hard to use with C++. The DX SDK is enormous, too. Allegro is a couple of megs.
3) The user of your game needs to have the DirectX DLLs on his/her computer. Allegro can compile purely. Makes slightly larger EXEs, but any user can play your game.
Quote:I've never used DirectX, for three reasons:
1) It's only for Windows. Allegro is for DOS and Windows, and will compile on either without changing one single line of code.

He's using Visual C++. He can only compile in Windows anyways.

Quote:2) DirectX is hard to use in VB - and if it's hard in VB, it's certainly hard to use with C++. The DX SDK is enormous, too. Allegro is a couple of megs.

It is? DirectX isnt hard in VB. And what does using it in VB have to do with using it in C++. They are two different languages with two different implementation methods for DirectX.

Quote:3) The user of your game needs to have the DirectX DLLs on his/her computer. Allegro can compile purely. Makes slightly larger EXEs, but any user can play your game.
Most users already have the DirectX dlls anyways, especially if they play games.
My only reason is portability. Like Zack said, an Allegro game can be compiled for Linux, Windows, MSDOS, Mac, BeOs, Solaris or Amiga without having to change a line of code (if you code wisely). All you have to do is doing some defines that make the compiler branch and compile a piece of code or another if you are using some native functions (for example when working with filesystems: GCC and MSVC have different functions, for example).

Plus, I find DirectX a mess. Sure, if you are coding for Windows, DirectX is faster than Allegro 'cause Allegro wraps DirectX (allegro uses DirectX [or GDI] in its Windows ports, so most Allegro functions end calling DirectX functions), but DirectX is such a hassle. Most people who code in DirectX have to spend a couple of weeks creating a suitable wrapper to make life easier, and with Allegro you have an excellent wrapper that is very comfortable to code in,.
Quote:
Zack Wrote:I've never used DirectX, for three reasons:
1) It's only for Windows. Allegro is for DOS and Windows, and will compile on either without changing one single line of code.

He's using Visual C++. He can only compile in Windows anyways.

Quote:2) DirectX is hard to use in VB - and if it's hard in VB, it's certainly hard to use with C++. The DX SDK is enormous, too. Allegro is a couple of megs.

It is? DirectX isnt hard in VB. And what does using it in VB have to do with using it in C++. They are two different languages with two different implementation methods for DirectX.

Quote:3) The user of your game needs to have the DirectX DLLs on his/her computer. Allegro can compile purely. Makes slightly larger EXEs, but any user can play your game.
Most users already have the DirectX dlls anyways, especially if they play games.
1) That's not a good reason at all. If PJ's gonna release the source code, it isn't going to compile on a DOS compiler, with DirectX. Portability rocks.
2) As I recall, it took some time to get DirectX up and running for me. Also, remember, DirectX's functions alone are hard to learn. VB is a lot simpler than C++, nobody can deny that, so if using DirectX in VB is difficult, in C++ it will be even harder.
3) Really? I didn't have the DLLs when I installed RTCW. Luckily they gave me a CD with it.
Provided he codes in portable code (like nathan said, if he codes wisely) then yes he can compile in whatever he wants if he uses Allegro. But if he uses Allegro and codes in non portable C++, then he can only compile in Windows. Besides, he may not care about portability.

Also, just because it took more time for you to set up DirectX in VB doesnt mean someone more experienced in VB (or C++ for that matter) is going to take as long as you are. I'm going to safely assume you dont have much experience in VB, which is why it took you longer than say, someone with 5 or 6 years in it.

RTCW came out about 3 years ago when XP first came out and didnt bring the dlls in it. You can either download the SP, or get XP with SP1 slipstreamed. Almost all games now have DirectX on the CD, and you can choose whether to install it or not depending on the version you already have.
Quote:It's only for Windows. Allegro is for DOS and Windows, and will compile on either without changing one single line of code
Not true.
Allegro is for many platforms, Linux,Beos, not just Dos and Windows.
Second, you may need to change code to switch platforms, DOS does some funny things, and Windows uses some exclusive code. A simple app is an easy direct port, but it doesnt always work like that.

Quote: The user of your game needs to have the DirectX DLLs on his/her computer. Allegro can compile purely. Makes slightly larger EXEs, but any user can play your game.
Where did you learn this? Allegro USES Direct X to draw under windows. So go ahead, try to use Allegro without direct X installed on windows. See what happens.(Windows xp comes with a version of DX, youll need a fresh install of 98 or 95 to test this).

However, might be able to get away drawing in a window with GDI code under allegro WITHOUT DX.(But then, allegro uses Direct Input for joystick handling etc etc)
Pages: 1 2 3