Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / DarkGDK -> Fully OOPed

Author
Message
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Mar 2008 00:05 Edited at: 8th Mar 2008 14:31
Firstly, I know there is already an OOP thread for DarkGDK, but it wasn't around when I started work on this, and I'm too far in to turn back now

This is a wrapper for DarkGDK, which wraps EVERY command, or provides its own equivalent!

Example code:


Progress:
Core
Text
Display
Input
File
Basic2D
Bitmap
Sound
Music
Sprites
Image
Animation
Light
Camera
Basic3D
Matrix
World
Particles
3D Maths (Uses structures that inherit from D3DX structures directly instead of using DarkGDK)
FTP
Memblocks
Multiplayer
System
Terrain
D3D Plugin (converted to DarkGDK by me, and then wrapped)
Sparky's DLL
Billboarding
LOD Objects

My culling plugin (only available for DBP atm)
My fog of war plugin (not released at all, but a few people have seen it)
Dark Physics (I'm getting a fatal error C1007, unrecognized flag '-typedil' in 'p2'. This happens in the samples as well, and nobody has ever posted a solution to it)

Dark AI

3D Maths
The 3D Maths section contains many more commands the the DarkGDK equivalent. It has support for quaternions and planes as well as Vector2/3/4 and Matrix4x4. Conversion of Euler angles of any order to/from matrices and/or quaternions is possible. Conversion between quaternions and matrices is also possible.

Sparky's DLL
The sparky's dll section is built into Basic3D, so you can set up your objects for collision like so:


Cloggy's D3D Plugin
Converted for use with the DarkGDK by me, all its commands are wrapped for OOP

General
All position and rotation commands can use the Vector structures as well as the x/y/z values for easier use. All internal data of Objects/Cameras/etc. can be accessed using the GetData function of that class.

Because so much time has gone into this, it will most probably not be free. It will only cost around £5 though, which is really not much considering what you get! When it is ready, Aaron Miller will be kindly hosting it on his site.

The name...
Currently, the project has a temporary name (DarkOOP) which I think might already be being used by another OOP wrapper, so any inventive suggestions are welcome

kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 8th Mar 2008 00:28
Hey Digg, nice job man!
Wanna take a look at this baby when you release it! (although I probably won't ever use it, I'm into DGDK.NET, right?)

Ok, for the name, my suggestion is: DON'T USE DARK PREFIX! I mean, it is not good for TGC as people always associates Dark<something> as TGC's official products.

I thought about a new name for a OOP Wrapper that I'll never use (because of established LightEngine) but unfortunately... I can't remember it now
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Mar 2008 10:36 Edited at: 8th Mar 2008 10:37
Thanks Also, if anybody has any other plugins they would like added (They must be available in GDK form, or be open source so I can convert it) please suggest them here!

Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 8th Mar 2008 13:15
Well.... DarkAI and DarkPhysics will be good

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine (thanks kBessa)
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Mar 2008 20:48
I've been trying to add DarkPhysics, but I always get a fatal error C1007, unrecognized flag '-typedil' in 'p2' when I try to compile. The examples raise this error also, so if anyone has got a way around it, PLEASE tell me All the cloth functions are wrapped, but I can't test them until I can compile!

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Mar 2008 03:13
What OS? If XP I know it CAN work but I also don't don't what your linking to (other stuff) that may be causing this trouble.

Have you made any non - oop - raw test programs just to play in DarkPhysics a Bit? I Ask because I have NOT come close to using all the commands and in my own classes - if I have a function declared in my header and forget to write the code behind it... it compiles fine UNTIL I try to use the missing function - then I get a linker error too.

So, I'm kinda guessing that its not imposible that a command you hooked to in your wrapper is hitting a lesser used command possibly that simply didn't make it on the DarkPhysics current build.

Just trying to help ya with ideas.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 9th Mar 2008 11:16 Edited at: 9th Mar 2008 11:51
It gives that error whatever command I use That suggests that is just the linking of the library that is causing the problem...

edit:
Is DarkPhysics.lib suppoesd to be over 50mb???

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Mar 2008 14:34
That Sux about the linking! (BTW - the lib is 49.## meg, 50,284k... Yup.)

Vista? XP?

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 12th Apr 2008 19:04
XP

DarkOOP now has it's own OOP win32 api wrapper, called DarkWin

Controls finished, showing inheritance:
-> BaseWindow
---> ButtonWindow
-----> PushButtonWindow
-----> CheckBoxWindow
-----> RadioButtonWindow
-----> GroupBoxWindow
---> ComboBoxWindow


The wrapper is event driven, very similar to .net windows forms, using another new section of DarkOOP, DarkDelegate!

DarkDelegate is almost identical to a .net event, except that it is unmanaged C++, and it's FAST!

Example code:


That code declares a delegate called MyEvent, with two parameters, sender and mydata. It then assigns two functions to that event, and finally raises the event. In doing so, it calls the two functions.

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 12th Apr 2008 22:33
This is looking really promising Diggsey. If these are anything like the quality of your ViewGUI offering then I'll be keeping a close eye on this. Great work!

No matter how good your code is, someone will improve on it
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Apr 2008 17:02
I do like the template driven approach.

Good Work. That is a very clean code snip.

I am writing a GUI fram scratch myself, as I want the gui in the Window - not outside if I can help it... also shooting for 3d Menus - where the Menu can actually be placed "INSIDE" a scene.

I'm not so sure how I'm implementing everything yet - I have a good idea - but the hard part is going to be the GUI DESIGNER, GUI DESIGNSAVE - and GUI DESIGN Load. I'm hoping I can make it like Sales Logix CRM Legacy Forms.

The GUI, event names, etc all could be done in the designer, but you still had to write the code for those events separately.

This will allow me in theory to have one code base work on a ton of different GUI layouts etc.. Just by connecting the events in the code to the GUI "Stub" for them (Like OnFocus, OnClose, OnOpen etc etc).

Good Work Diggsey - keep it up. I know from my own experience that making this stuff if very rewarding

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 13th Apr 2008 17:40
I've got visual styles working fine, but I've found that if you want to change the colour of a button, you have to enable owner draw. I can get the WM_DRAWITEM messages fine, (I have set it up so they are forwarded to the window being drawn, so it is not really owner draw any more) but none of the visual styles drawing functions work

Login to post a reply

Server time is: 2024-11-20 07:27:46
Your offset time is: 2024-11-20 07:27:46