Quote Originally Posted by pmetcher
Thanks Harry for providing so much info from the little I posted. I'll have a play and see how it goes.

As far as choosing Delphi goes, why would you use anything else?

Peter
Wise words!

I'm working on a small and (relatively) object-oriented little game. I'll send you the source code so you can get a feel of one way of making a game. I'm not sure when it'll be done (maybe by the end of the week if all goes well).

The first decision you'll face when starting to code is the component sets/libraries to use. Let's take a look through some of them.

Graphics: starting with the fun one! The easiest method for graphics is the VCL with TBitmap/TCanvas, etc. Of course, this ain't the quickest for fancy graphics (it's just a wrapper for the GDI), but for quick prototyping it's very useful. Note that transparency is enough to bring the GDI to a major slowdown -- not good, not even touching on translucency (alpha blending)!

You can also use DirectDraw. This a (getting on a bit) technology that's part of Microsoft DirectX. It was last updated in version 7 of DX. DDraw has a really straightforward interface once it's been encapsulated. It's good for drawing and pixel manipulation. It also gives you colour-keying (removing one colour from a picture when drawing, like with TBitmap.Transparent) but at a decent speed. However, it doesn't do alpha-blending, which is pretty annoying. DDraw is pretty compatible and will run on older machines.

You can also use a 3d API such as OpenGL or Direct3d. There's a trick with these to render as if you were using a 2d API. The advantages here are that you get all sorts of nice features (e.g. alpha blending, anti-aliasing) without difficultly, and it'll be quick on newer PCs. Of course, it may well be slower on older PCs. A disadvantage is the annoying power-of-two sizes requirement of textures.

Of course, there are tons of component sets out there to wrap up the graphics side of things. However, they'll all use one of the above APIs behind the scenes, with their respective advantages and disadvantages. Here are some, in no order of preference (note that Harry wrote one of them, hence his slight coughing fit )...

Xcess GDK
PowerDraw
GameVision
Project Omega
GLXCess
DelphiX
WDirectX
FlegelX
DOT

...and lots more. Everyone and his dog has written some sort of Delphi component set for games! You can either do it the hard way (get the DirectX or OpenGL headers, then write the framework yourself) or use one of the above. Check out the tutorials section here -- there are a few tutorials on some of the above (e.g. one on using TCanvas, some for DelphiX, yadda yadda).

Sound: there are a few choices here (apologies if I forget one)...

Directsound/music (part of DirectX)
FMod
Bass
OpenAL (a good complement for OpenGL, plus Noeska has some tutorials on it)
ModPlug

Some of the above have restrictions (e.g. free only for freeware games, pay licences when selling your game properly).

Input: basically, every uses Win32 or DirectInput AFAIK. I don't know of other libraries for this, but then I've not looked...

Physics: Open Dynamics Engine (ODE) is a good bet here.

Network: No idea. I'd probably use sockets (winsock 2) myself, but I guess you could also use DirectPlay (again, part of DX).

You're probably better off writing VCL games rather than Win32 API ones to begin with, since it's far more productive. I'd recommend getting a few small games under your belt (maybe start off with a simple board game, then a remake of an old game, then work your way up from there). Traveller's site has a ton of game projects for you to look at.

If you decide what route to take then we can let you know where to get the relevant files and how to get started.

We try to make this forum as helpful as possible, so ask as many questions as you need!