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.

Work in Progress / Object GDK - OOP Wrapper for DarkGDK

Author
Message
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 30th Sep 2008 22:07 Edited at: 23rd Oct 2008 03:57


ObjectGDK is an OOP wrapper for DarkGDK. It wraps all of DarkGDK into about 25 different classes.

You can find ObjectGDK here: http://objectgdk.leadhoster.com/home.html


Here's some example code of spinning a cube in ObjectGDK:



Instructions

Just place the folders wherever you want, then in VC++ Express go to Options->Projects and Solutions->VC++ Directories and set the Include folder of ObjectGDK to the Include directories.

Credits
-jason p sage, who helped me out quite a bit when I started my wrapper.
-WindowsKiller, for pixel-perfect collision code. I haven't actually added it yet, but I figured I'd add this now so I don't forget.

...plus several people/sites for media; you can find a list in the README.

If you guys have any ideas of what else I can add feel free to make suggestions.

<<---------CLICK IT
draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 30th Sep 2008 23:51
Nice work AndrewT, I look forward to using this in my next GDK project
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 1st Oct 2008 00:04 Edited at: 18th Oct 2008 18:31
Quote: "Nice work AndrewT"


Thank you! If you plan on using it for a project let me know if there are any features you'd like added to help you.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 2nd Oct 2008 05:22 Edited at: 18th Oct 2008 18:31
Just wanted to bump because I've finished an update. Nothing much, just added the limb functions and added all the memblock functions, and I have working commented examples for both. You can download in my first post. I'm also done with vertexdata functions and almost done with sparky's collision, so you can expect another update tomorrow.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 4th Oct 2008 06:48 Edited at: 18th Oct 2008 18:31
K, I've finished the next update. It includes all the vertexdata and bitmap functions, as well as everything from Sparky's collision. That means that the effect functions are all that's left! You can download v0.3 in the first post.

The Real Abaddon
16
Years of Service
User Offline
Joined: 26th Jun 2008
Location:
Posted: 8th Oct 2008 14:01
Noob question and probably off-topic....sorry but i can't understand with what a wrapper can help for my future projects, can anyone show me what are the advantages of using this wrapper or any other ?

http://drainwrath.blogspot.com Drain Wrath Action/Adventure development blog.
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 8th Oct 2008 22:19 Edited at: 18th Oct 2008 18:32
Quote: "Noob question and probably off-topic....sorry but i can't understand with what a wrapper can help for my future projects, can anyone show me what are the advantages of using this wrapper or any other ?"


Basically it'll allow you to use OOP with DarkGDK. However, by the nature of your question I can tell you probably don't know what OOP is. I would explain it to you, but I'm very bad at explaining things. so you can check out this site in order to learn about it. OOP can speed up development time and a lot of people prefer it because they find it easier to use and understand. My OOP wrapper simply allows you to use OOP with DarkGDK. Hope that explained it.

The Real Abaddon
16
Years of Service
User Offline
Joined: 26th Jun 2008
Location:
Posted: 9th Oct 2008 13:19
Thanks for the explanation, the problem was that i didn't get it is because i didn't see to much of a diference betwen the OOP code and DarkGDK code in a matter of lines speaking.

I`m downloading now your wrapper to test it out and try to learn it. Thanks again for the wrapper and explanation
.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 9th Oct 2008 17:20 Edited at: 9th Oct 2008 17:21
Someone likes Irrlicht?

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 9th Oct 2008 22:04 Edited at: 18th Oct 2008 18:32
Quote: "I`m downloading now your wrapper to test it out and try to learn it. Thanks again for the wrapper and explanation"


Cool! Hope it helps ya. As far as I'm concerned ObjectGDK isn't totally 100% ready to make an entire complex game (i.e. an FPS engine) so it's really important that you point out ANY missing commands or bugs with it so I can get it to that point.

Quote: "Someone likes Irrlicht? "


How'd you guess?

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 13th Oct 2008 05:20 Edited at: 18th Oct 2008 18:32
I made a very basic game demo just to get a couple interesting screenshots. It's a ball-rolling game where you play the role of a smiley face. I should have v0.4 of ObjectGDK done soon.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 17th Oct 2008 02:38 Edited at: 18th Oct 2008 18:32
v0.4 is done! Download is in my first post. I've added support for DarkPhysics Cloths and Materials. I've also added a couple missing functions here and there.

Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 19th Oct 2008 03:50
Nice job.

Any chance you have MSN, Yahoo!, AIM, GTalk? I have some questions for you, so, if you don't mind, e-mail me.

Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 19th Oct 2008 04:00 Edited at: 19th Oct 2008 04:08
I don't have any messaging program right now unfortunately, but I can email you.

EDIT::

K, I emailed you.

<<---------CLICK IT
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 21st Oct 2008 22:37
Version 0.5 is done, I've added the shader/effect functions. It also includes 3 new examples.

Since I'm mostly done with DGDK functions I think I'm gonna start working more on the documentation and the tutorials/examples, so if you guys have any ideas please tell.

<<---------CLICK IT
Rena
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 23rd Oct 2008 01:03 Edited at: 23rd Oct 2008 01:57
Hi!

Thank you for ObjectGDK, good job.

I have one question though. Does IMouseInput::GetMovement() do the same as dbMouseMoveX/Y? When I try to use it I get -1610612736, am I doing something wrong?

Sorry for being a newbie @-@
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 23rd Oct 2008 03:49
I've created a small site for ObjectGDK, so rather than update this thread I'm gonna update the site. You can find the site in the first post.

<<---------CLICK IT
Rena
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 23rd Oct 2008 13:12
Also I freeze every time I try to use terrain, even in your example

Quote: "First-chance exception at 0x005e599e in Example 9 - Terrain.exe: 0xC0000005: Access violation reading location 0x00000008.
Unhandled exception at 0x005e599e in Example 9 - Terrain.exe: 0xC0000005: Access violation reading location 0x00000008."


It runs but I get an error and am left with a black screen until I end the process.
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 25th Oct 2008 00:01 Edited at: 25th Oct 2008 00:03
Sorry Rena, didn't see your posts because you're still on post-approval.

Quote: "I have one question though. Does IMouseInput::GetMovement() do the same as dbMouseMoveX/Y? When I try to use it I get -1610612736, am I doing something wrong?"


I can't be sure unless you post your code, but my only guess is that you're not using the 'Update()' function in the mouse. Basically, in DarkGDK if you call the 'MouseMoveX()' function more than once in a loop, then you get funky values. So, instead I call
it once in the Update function, and store it in a variable, then just return the variable instead. The reason you're getting a weird number is because dbMouseMoveX() and dbMouseMoveY() haven't been called yet, so you're retrieving uninitialized variables. Just add:



to your main loop. Of course, replace 'Mouse' with your mouse pointer.

Quote: "Also I freeze every time I try to use terrain, even in your example"


I'll investigate that, and edit my post if I find anything. Thanks for using my library , if you find ANY bugs at all I really want to know so I can improve the system.

<<---------CLICK IT
Rena
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 25th Oct 2008 01:09
Quote: "I can't be sure unless you post your code, but my only guess is that you're not using the 'Update()' function in the mouse. Basically, in DarkGDK if you call the 'MouseMoveX()' function more than once in a loop, then you get funky values"


Thanks, that did it.

Quote: "I'll investigate that, and edit my post if I find anything."


Does that happen to you too? Worried it might just be me.

It seems to happen when ITerrain::Build() is called, I get an error message that just says '6' too.

http://i37.tinypic.com/sy3rtf.jpg
Rena
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 25th Oct 2008 01:16
In your 'Water Surfaces' demo the call to SceneDevice::NewWaterSurface() is missing an argument. You didn't mention it in the comments so it was probably added since.
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 25th Oct 2008 16:11 Edited at: 25th Oct 2008 16:12
Quote: "In your 'Water Surfaces' demo the call to SceneDevice::NewWaterSurface() is missing an argument. You didn't mention it in the comments so it was probably added since."


Fixed. Thanks. Also I had changed 'SetControlFPS()' and forgot to change params, so I fixed that one as well.

Quote: "It seems to happen when ITerrain::Build() is called, I get an error message that just says '6' too."


Is this the example?? And are you running from MSVC++ or building the project then running it outside MSVC++?? The project works fine for me if I compile then run from outside MSVC++. And does this happen with DarkGDK's terrain demo, or only with ObjectGDK??

<<---------CLICK IT
Rena
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 25th Oct 2008 16:33
(sorry for the double post, forgot I was waiting for one to be approved)

Quote: "The project works fine for me if I compile then run from outside MSVC++"


I didn't think to try that, it runs fine when run outside. Weird.

DarkGDK's Terrain demo runs fine from within MSVC++
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 25th Oct 2008 17:54
Quote: "I didn't think to try that, it runs fine when run outside. Weird."


Cool.

Quote: "DarkGDK's Terrain demo runs fine from within MSVC++."


K, I'll try to find out why.

If you find any other bugs please post here.

<<---------CLICK IT
smaas
16
Years of Service
User Offline
Joined: 29th Oct 2008
Location: Edam, Netherlands
Posted: 29th Oct 2008 19:27
Great Work, makes programming in Dark basic a lot easier.

Could you build and compile youre objects so that they can be used as .net objects?


Steven
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 30th Oct 2008 00:25 Edited at: 30th Oct 2008 00:45
Quote: "Could you build and compile youre objects so that they can be used as .net objects?"


I'd be happy to! Only one problem, and I'm kind of embarassed to say this...how do I do that??

<<---------CLICK IT
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 30th Oct 2008 01:40
I don't know if this has been asked, but does this do automatic garbage collection? It looks really neat!

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 30th Oct 2008 04:30 Edited at: 30th Oct 2008 04:33
Quote: "does this do automatic garbage collection? "


Not at the moment, but I'm looking into doing that. I don't know if I've mentioned this yet but I'm still fairly new to C++, so a lot of topics such as garbage collection are pretty advanced to me, and I'm still learning about things like that. But I'll see what I can do sometime in the future.

I've got another update done (0.7, don't ask me why I skipped 0.6 ), but I don't have time to upload tonight so I'll do it tomorrow. List of fixes/added functions:


<<---------CLICK IT
Rena
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 7th Nov 2008 15:35
Make a neat keyboard device!

Login to post a reply

Server time is: 2024-11-24 07:26:46
Your offset time is: 2024-11-24 07:26:46