PDA

View Full Version : DGC Components



iLLUNis
07-11-2002, 12:43 PM
Hi everyone...nice to see Delphi based forums created. What i would like to ask is if anyone knows if there is a new implementaion on the DGC components to run on Delphi 5 or later. I have found some nice game implementation using this at http://www.geocities.com/SiliconValley/Circuit/5530/ but unfortunatelly when i am trying to compile on Delphi 6 i get an error on DirectX. I think it has to be the version of the DirectX. Any suggestions, ideas would be really welcome. Thanks again.

Alimonster
07-11-2002, 01:35 PM
If I remember correctly, the DGC components have pretty much died out in recent times, since they weren't updated for ages (correct me, people, if this is wrong).

I think that your best bet would be to use a more recent component set. There are a few around, though I'd guess that none encapsulate things in exactly the same way.

See if Powerdraw (http://turbo.gamedev.net/powerdraw.asp), DelphiX (http://turbo.gamedev.net/delphix.asp) or the Omega Project (http://www.blueworldtech.com/ds).

If you can list some errors, it may be possible to update the headers for later versions and recompile everything (assuming it comes with source - is that the case?). Tell me where to grab that copy of DGC and I'll see if I can recompile it for D5/6 (in a few hours time, that is).

Alimonster
07-11-2002, 01:36 PM
Oh yeah! Harry Hunt (who posts over at the Turbo forums (http://www.gamedev.net/community/forums/forum.asp?forum_id=30&forum_title=turbo) on Gamedev) said that he was working on a component set for creating games. Harry, if you've registered here, any news on that?

iLLUNis
07-11-2002, 01:45 PM
I knew about DelphiX....i am looking now at PowerDraw...thnx

iLLUNis
07-11-2002, 02:57 PM
...If you can list some errors, it may be possible to update the headers for later versions and recompile everything (assuming it comes with source - is that the case?). Tell me where to grab that copy of DGC and I'll see if I can recompile it for D5/6 (in a few hours time, that is).

I dont have the list of the errors with me know since i am not at home but i do remember is all about not finding a direct something thingy. Most probably it has to do with the directx....The closest ]http://www.geocities.com/SiliconValley/Pines/3805/download.htm[/url] ....if you want i could email you a latest version i have for you to have a look...
Thanks anyway... :wink:

Alimonster
07-11-2002, 03:06 PM
I dont have the list of the errors with me know since i am not at home but i do remember is all about not finding a direct something thingy. Most probably it has to do with the directx....The closest ]http://www.geocities.com/SiliconValley/Pines/3805/download.htm[/url] ....if you want i could email you a latest version i have for you to have a look...
Thanks anyway... :wink:

Sure, no problem. Mail it to me if it's less than about 4 megs (should be the case). I'll be able to check my home mail in about 3 hours from now.

Bobby
07-11-2002, 06:56 PM
*cough* use omega *cough* ;)

As for DGC, I liked using that, they were some pretty good components, thats that I made my first game with. Then I used DelphiX, which is also VERY good, but had some serious issues, so I decided to try to make my own with directX8.

Bobby Baker
Delphi Sanctuary.
www.blueworldtech.com/ds

Alimonster
07-11-2002, 07:31 PM
Muhaha! (http://www.alistairkeys.co.uk/images/lahdeedah.png)
Muhaha! x 2 (http://www.alistairkeys.co.uk/images/lahdeedah2.png)

:roll:

iLLUNis
07-11-2002, 08:03 PM
dohhh...... :D

Alimonster
07-11-2002, 08:11 PM
I had to comment out the property editors, unfortunately, because I seem to be one .dcu short of what I should have :( (got the .int but not the .dcu, which sux!). I'll try to work around that later.

It's using the latest JEDI headers.

I'll spend a while (rest of today, maybe a few more days -- it could even become a full-time project) reworking and testing it. Until then, feel free to try out Bobby's project omega stuff ;). I'll have to sniff around and see if I can find the original authors, too, to see if they're fine with the update.

Expect an upload some time in the future... :D

Philth
08-11-2002, 12:33 AM
I started with DGC, it was a great set of components. I really wish they hadn't stopped workin on them. Since then i've been using DelphiX with TurboPixels 1.2 (They both work together great.) with great success. The stuff i'm doing now is a lot of 2D and 3D together, and the bitmap font support and wulines from TurboPixels is invaluable. Keep an eye out for Omega, it's almost there, but not quite. (I dont think it does D3DRM or D3DIM yet AFAIK)

Bobby
08-11-2002, 01:00 AM
Keep an eye out for Omega, it's almost there, but not quite. (I dont think it does D3DRM or D3DIM yet AFAIK)

Whats D3DIM and RM :D

Corpse^
08-11-2002, 01:19 AM
You could also purchase some components from http://www.silicmdr.com those are some good components and the games the creator produces are fun. I am currently in the process of making my own game development components to help ease the pain of writing for long hours to get simple functions done.

balog
08-11-2002, 11:34 AM
D3DRM = Direct 3D Retain Mode (obsolete now)
D3DIM = Direct 3D Intermediate Mode

Bobby
08-11-2002, 02:34 PM
Hi, do we have those balog? :P

iLLUNis
08-11-2002, 02:38 PM
This is going off topic i would think. Best thing would be to start a new one?...or you could wait for BlueCat to create the so highly anticipated Getting Started Forum..... :?

Philth
09-11-2002, 12:36 AM
D3DRM = Direct 3D Retain Mode (obsolete now)
D3DIM = Direct 3D Intermediate Mode


Thats actually Immediate mode, which is basically what we call Direct3D now, since (I think) retained mode was stopped being worked on in 8.0 apparently (Though still works fine with DX8 drivers).

I didn't see anything about 3D with Omega is what I was basially saying. :)

And there really isn't a post in here that is offtopic. It's about all the different gaming components for Delphi.

Bobby
09-11-2002, 01:52 AM
Hi, Omega uses Direct3d for all of its rendering stuff, thats why we have such good alphablending and speed. :)

Alimonster
11-11-2002, 12:19 AM
Hi ho everyone. Here's version 0.01 (http://www.alistairkeys.co.uk/download/dgc_modified_2.zip) of the DGC update - it works under my Delphi 5 and 6 - and may work under Delphi 7, but that's where you come in!

First of all, you have to use the JEDI headers: over here (http://www.crazyentertainment.net). Extract them and install them into your library path (tools->environment options->library->library path). I'm not sure if they work fine with Delphi 7, since Illunis contacted me and said that there was an error in DirectDraw.pas. If you get that error, here's the pm I sent to him earlier:


Strange! It works fine in D6. It sounds like a problem with the JEDI headers rather than DGC.

I think I've tracked the problem down, though I can't be sure without D7 to hand.

Find the line #139 in DirectDraw.pas - it has a comment saying "// Delphi 5 can't handle interface in variant records
// so we have to use pointers instead (which can be type-casted into interfaces):"

Notice there are a few {$IFDEF}s there. These conditionally compile different parts of the code. The term used, ver***, means the Delphi version used. I don't think that the headers have been updated for Delphi 7, though I could be wrong!

Find the line #148. It says:

PDirectDrawSurface = IDirectDrawSurface;

Try changing this to

PDirectDrawSurface = Pointer;

Recompile it and tell me the errors you get, if any.

I'm not sure if there are any more changes required for D7...

Once you've done that, double click on the "dgcb7.dpk" package and hit compile, then install on the package editor window (you may have to move the code editor out of the way if you can't see it). With luck, the things should be registered on a "dgc" component tab and you'll be able to compile your old projects.

I had to take out the property editors, which are the nice things that open in the IDE when you select a property (Borland, what were you thinking when you renamed dsgnintf.pas and didn't include it in D6 Personal?!). This will make it harder (or impossible, I'm not sure) to fiddle with some settings).

If you have Delphi 5 then it should be possible to use the design editors. Find any .pas file containing "DsgnIntf" in the uses clause (commented out). Uncomment it, then search all files for the string "todo ak". Look for the "property editor" style comments and comment those blocks. I'm not sure if I commented them all, unfortunately... I may post an update for D5 with the property editors intact.

This release is simply intended for backwards compatibility: I offer no guarantee for new projects. I'm not even sure if it works yet, since I've not tried any of the examples (note to illunis: could you mail me the examples to [akeys "at" icscotland "dot" net], please?).

Post any and all errors/exceptions/computer catching fire errors here for me to deal with, please!

Alimonster
11-11-2002, 12:46 AM
Here's the property editors done for D5 only: here (http://www.alistairkeys.co.uk/download/dgc_modified_3.zip) (97K). It's compatible with D6 too, though (but no extra editors since they're wrapped up in {$IFDEF VER130} to check for D5 while compiling.

Note that the changes I've made will probably break < D5 (but hey, if you wanted that then you could probably use the standard DGC stuff, I guess...).

Alimonster
12-11-2002, 07:42 PM
Hmm, yet another update. For some reason, Delphi 6 complained today about the input stuff. If it does that to you ("cannot pass a constant as a var param" or something) then you want to open up DirectInput.pas (line 881) and change it from SetDataFormat(var whatever...: TSomething)" to SetDataFormat(whatever: PSomething); (slightly vague, I know, but you can figure that one out ;)). Wherever the compiler complains about SetDataFormat calls, add a @ in front of the var (e.g. {Dxcheck}(FDirectInputDevice.SetDataFormat(@c_dfDI Keyboard));).

In other news, Illunis' game compiles now and works fine in Win9x, but not 2k. :( Slowly getting there!

iLLUNis
12-11-2002, 08:46 PM
...In other news, Illunis' game compiles now and works fine in Win9x, but not 2k. :( Slowly getting there!
Just to make something clear. This is NOT my game. I wish... but is not.... :cry: It belongs to that guy as i mentioned when i first posted this topic. :shock:
http://www.geocities.com/SiliconValley/Circuit/5530/

Alimonster
12-11-2002, 08:49 PM
Oops, sorry! My bad.

iLLUNis
12-11-2002, 08:54 PM
:? :shock: :D

Useless Hacker
13-11-2002, 11:54 AM
For some reason, Delphi 6 complained today about the input stuff. If it does that to you ("cannot pass a constant as a var param" or something) then you want to open up DirectInput.pas (line 881) and change it from SetDataFormat(var whatever...: TSomething)" to SetDataFormat(whatever: PSomething); (slightly vague, I know, but you can figure that one out ;)). Wherever the compiler complains about SetDataFormat calls, add a @ in front of the var (e.g. {Dxcheck}(FDirectInputDevice.SetDataFormat(@c_dfDI Keyboard));).
I think this is just a mistake in the JEDI headers. I changed it to SetDataFormat(const lpdf: TDIDataFormat) (I think), which is nicer that setting it to a pointer.