By John Pullen, Paul Bearne and Jeff Kurtz
(Some of the beta 3 features are listed below and are identified
by the symbol)
DGC is made up of several utility programs and components (and some classes). These are described in more detail below.
TDGCScreen -DirectDraw Delphi Component
This is the main DGC component. It is responsible for initialising
DirectDraw and maintaining DirectDraw image library surfaces. To use it
just drop it on your form and choose the required resolution. The rest
is done for you. Several functions have been built in to this component
to facilitate game programming. Pixel collision detection, scrolling, keyboard
handling and clipping are just some of them.This component also allows
you to draw on DirectDraw surfaces using the standard Delphi TCanvas class.
IMGLIB.EXE - Image Library Editor
The image library editor will create a single file containing multiple
bitmap images. This program will automatically maintain and optimize a
single palette as each bitmap is added to an image library. A transparent
color can be set for the image before it is added to the library. The image
library files (*.IML) created by this program are used by the image library
Delphi component.
TDGCImageLib - Image Library Component
The image library component is basically a storage and load mechanism
for the Image Library files. The component allows your graphics to be saved
along with your Delphii program. If you want to load the image library
files at run-time use the LoadFromFile method. The images in the library
can be viewed at design time using a custom property editor.
SNDLIB.EXE - Sound Library Editor
The sound library editor will create a single file containing multiple
wave files. A volume and pan can be set for each sound. The sound library
files (*.SDL) created by this program are used by the sound library Delphi
component.
TDGCSoundLib - Sound Library Component
The sound library component is similar to the image library component.
It is used for storing and loading sound library files. The component also
has a custom property editor for playing sounds at design time.
TDGCAudio - DirectSound Delphi Component
This component will initialise DirectSound and maintain DirectSound
sound library buffers. This is probably the easiest DGC component
to use. Playing and adjusting sound properties is easy using the Play,
LoopPlay, Stop, Position, Pan and Volume methods.
TDGCSpriteMgr -Sprite ManagerComponent
The sprite manager component makes it easy to add sprites with automated
motion and animation. With a just a few of lines of code you can write
a simple shoot-em-up. Sprites with different types of movement can be created
and a number of different classes are implemented to faciliate this:
TDGCBouncer - This is for sprites that bounce arround the screeen (or in their own rectangle). You would use this type of sprite for the invaders in a Space Invaders game or the player's bullet. Different actions can be made to occur when the sprite hits the edge of it's Limits rectangle. For example, a sprite could bounce off the side, reverse it's current direction, stop inside the limits rectangle, stop outside the limits rectangle or simply fire an event.
TDGCPlayer8 - This is a player controlled sprite that can move in up to 8 directions. Once this sprite is created DGC will automatically check for key presses and move the sprite for you. All sprites have a Speed, MaxSpeed, Acceleration and Deccelaration property. Using these a sprite can gradually increase speed and then slow down. You can still fully control the movement of the sprite using events and properties. For example, if you want the sprite to just move left and right you can set the AllowUp and AllowDown properties to False.
TDGCRaceCar - This movement type emulates a race car. The sprite can be rotated, acceleration applied and of course you can brake. The class also has a 'Handling' property which controls how responsive the car is. Again, this is a computer controlled sprite that is updated for you automatically by DGC (optional).
TDGCThruster - This is a really cool class that makes it very easy to write an Asteroids or Subspace type game.
(Currently there is not a class for jumping sprites like Mario inplatform games. We are currently working on a world coordinate system and maps for tile based games. The TDGCJumper class will probably be done as part of that development)
TDGCIntroLib - Intro Screens Component
This is a really neat component and utility written by Paul Bearne.
Using the FX Editor and TDGCIntroLib component you can create cool
intro sequences and transition effects to your games.
TDGCStarfield - Starfield Component
If you want to code a quick shoot-em-up in your lunch break then this
component is a must for you. Plonk it on your form, call the Generate and
Update functions and you have a 3D scrolling starfield. The component uses
palette indexes 240-244 so you can choose the colors for the stars.
TDGCHighScore - Highscore Component
This component is for capturing and displaying hi scores...what else?
(for more information on the new sprite engine download DGC beta 3 and take a look at the readme.txt file)