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 / New Tutorial For Dark GDK - Loading Custom Media

Author
Message
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 6th Feb 2008 10:56
I have recently been working on a new tutorial for Dark GDK. The aim of this tutorial is to show some advanced techniques in Dark GDK, specifically loading custom media. The tutorial will guide you through the stages involved in creating new objects and setting their data. The end result is a model from World of Warcraft loaded and animating in Dark GDK. Unfortunately I cannot give out any media for this but the key thing here is the techniques being demonstrated.

Attachments

Login to view attachments
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 6th Feb 2008 10:58
Source code is attached to this post. It is around 3 mb.

Attachments

Login to view attachments
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 6th Feb 2008 10:58 Edited at: 6th Feb 2008 10:59
Here's a screenshot showing the final result

Attachments

Login to view attachments
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 6th Feb 2008 11:00
If you have any comments or suggestions please let me know and I can see about making some changes.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 6th Feb 2008 15:33
Nice tutorial Mike, this will come in handy for a map editor I'm working on.

Projects Started: 20
Projects Completed: 0
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 6th Feb 2008 17:04 Edited at: 6th Feb 2008 17:05
Could you also write a tutorial about the basic steps of ode physics implementation for the hopeless` like i am please.

There is always one more imbecile than you counted on.
Niels Henriksen
19
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 7th Feb 2008 10:46
Is this also possible in .NET version? Or only in the new GDK?

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine (thanks kBessa)
Mystic
16
Years of Service
User Offline
Joined: 22nd Jan 2008
Location:
Posted: 7th Feb 2008 16:54
Ok I am kinda new here, and its probably a stupid question, but for some reason I cant open your tutorial, what program do I use to open a .RAR file?
Killer Fish
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 9th Feb 2008 03:25
Quote: "Ok I am kinda new here, and its probably a stupid question, but for some reason I cant open your tutorial, what program do I use to open a .RAR file?"


WinRAR
Darth Sidious 666
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location:
Posted: 16th Feb 2008 14:18
Woah, that's SOOOOO cool!!

Can it be used for any game? I really want to load some other model types to see what happens

This could be useful for remakes and the like.

Your skills are no match for the Power of DarkBASIC Pro!
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 19th Feb 2008 13:10
You can import pretty much any file format you like. Just follow the techniques used here and I'm sure it will work out fine.
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 19th Feb 2008 14:34
@Niels: There are some missing commands in DGDK.NET so it's not possible by now, but I've been talking with APEX for them to be included in future releases.

This one's really nice. I always wanted a Milkshape3D loader, so I'll wait for pex to implement the missing methods and I'd probably try it out.

@Mike: Before I forget as it got to my mind now... Did Paul talk to you about loading from streams? I mean, a lot of people here have been asking this, because DGDK only allows objects/sounds/etc. to be loaded from files, but not streams (not a real way to make PAK files, or anything similar). I've done it "fakely" in LightEngine, by extracting to a temp folder and loading the file, but no the solution most of us expected.


Thiago
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 19th Feb 2008 14:43
kBessa,

Could you not just create a memblock and read the data from the stream into it, then use the Make [INSERT TYPE HERE] FromMemblock.

Projects Started: 20
Projects Completed: 0
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 19th Feb 2008 15:11
kBessa, loading files in this way will be a good thing. It's something we need to consider for an upgrade.
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 19th Feb 2008 15:50
@monotonic: Yep, it's possible for somethings. But what about animated objects? Also, it still would be slower.

@Mike: I'm looking forward to it!
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 19th Feb 2008 15:53
kBessa,

Good point.

Projects Started: 20
Projects Completed: 0
Niels Henriksen
19
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 19th Feb 2008 21:18
I cant wait till it can be done in .NET... then I dont need to think about gfx for my game.... I can use from WoW...(joke)

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine (thanks kBessa)
Lover of games
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 26th Feb 2008 20:15
HHey mike you think you could make a tutorial on writing your own format and the loading it? cause i want to write my own but i can't seem to do it and have no idea what to start

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
theplake
16
Years of Service
User Offline
Joined: 30th Nov 2007
Location:
Posted: 28th Feb 2008 18:30
Dont work at me he said that: LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)
Redmotion
21
Years of Service
User Offline
Joined: 16th Jan 2003
Location: Mmm mmm.. Marmite
Posted: 17th Mar 2008 01:05
I've not looked at this too closely yet - I've been kindly pointed over here from another thread. Mike, once loaded into the executables memory,(and if there was a SAVE OBJECT command in the Dark GDK), could the memory be saved back out as DBO file for example or used with the Enhance Animations plugin? (I guess my question is; does the object exist inside the program the same way as a directX file loaded with LOAD OBJECT?)

War is terrorism with a bigger budget
aaron360
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 30th Mar 2008 19:19
good day,

i have a problem loading the materials of my model (now in .x file) that was exported from maya (.mb), the materials and shadings are not loaded, here's a screenshot




when i open the file in dx viewer, the "Blinn" materials are loaded and the shadings are shown, but i get this message

'polySurfaceShapexx_Mesh' material 9 - No effect instance specified.
Reverting to the default effect.

is there a code that would load the materials and shadings?
Adriano jones
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location: Turn around...
Posted: 27th May 2008 02:10
it's a pretty good model that came together there.
adrian

Adriano jones
BrokenGlass
16
Years of Service
User Offline
Joined: 4th Jun 2007
Location: In teh lab coding
Posted: 7th Jul 2008 06:27
I try to run it and i get it closes, went to debug it pointed at
fseek ( fp, 0, SEEK_END );

Current Project: Learning DBP
Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 1st Aug 2008 04:28
I didn't completely read through the paper.

How is the animation done in the end? Are the vertices updated manually each frame?

Roujin
15
Years of Service
User Offline
Joined: 30th Jul 2008
Location:
Posted: 3rd Aug 2008 07:26
Hi.
When i tried to load the solution files in Visual C++ 2008 Express, I got heaps of compiler errors. Is there something ive gotta do to Visual Studio C++?

If it can be missunderstood or messed up i can stuff it up even more!
Mista Wilson
15
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 14th Sep 2008 12:44
I believe you will need to download and install "MPQLib"(library for working with MPQ files) and "ZLib"(a data compression library) from the internet where they are freely available and point your compiler to where they are installed if it doesnt already, to be able to compile and run the code in these tutorials.. It is mentioned in the tutorial PDF somewhere I think, that the code uses functions from those 2 libraries and that they are freely avaiable on the web..

If it ain't broke.... DONT FIX IT !!!
yerrel
20
Years of Service
User Offline
Joined: 9th Sep 2003
Location: Planet Earth.. :-)
Posted: 23rd Sep 2008 12:28 Edited at: 23rd Sep 2008 12:30
Job well done Mike Johnson!

Nice and clean Tutorial!


I know that that my post is kinda on the very very late side, but i was out of the programming scene for a long time.

MSI K8T NEO-2 F2.0, 8XAGP, 2x512Mb Dual Channel... Dark GDK..... http://www.binary-coder.com
Indecom
16
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 28th Dec 2008 07:37 Edited at: 28th Dec 2008 23:33
This is awesome and very helpful, exactly what i need for my project

I've been working my way through the tutorial and i'm at ms 004 right now, and there seems to be some fundamental problem in the code that i cant figure out, with the following code apparently



It's something i get pointed to when debugging the program, if i dont debug it, if i just run it like normal it stays black and crashes.

when i debug it gives me this error and points to the final bracket in that code listed above: Unhandled exception at 0x004ca87d in Wow Loader.exe: 0xC0000005: Access violation reading location 0x0f958964.
Indecom
16
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 29th Dec 2008 00:19 Edited at: 29th Dec 2008 05:35
I'm pretty much stuck at this point. I've installed the mpg and z libraries in hopes that maybe missing those would cause a problem, and it did nothing. Has anyone been able to successfully follow this tutorial? Normally when I program i'd be able to ad lib some code to help fix it, but i havent been using cpp long enough to do that.

EDIT:
okay so i figured it might be the model causing the problem so i loaded up a different model, this time a cat, and it worked perfectly, i loaded up a gate, just a static level mesh, and it worked, i opened a dragon and it crashed, an orc and it crashed, wtf? is it possibly something to do with different types of m2 formats?
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 29th Dec 2008 08:05
This was unpinned?
Hayer
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 11th Mar 2009 15:22
Does this still work in the newer versions of DGDK?

Cause I can't get it to work, will post some source code when I get home.

Keep it simple.
Questions? Mail me
FIGHTEX
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 17th Apr 2009 22:57
mhm.... i have 1 question the mpq tutorial dose it open the .mpq file or does it extract it, i got a little confused, i need a encyfere/decyfere format, evven something like .dat files or something i cant find it anywhere.
:S

Game.Love

Login to post a reply

Server time is: 2024-05-04 06:13:20
Your offset time is: 2024-05-04 06:13:20