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 vs XNA (I'm lost)

Author
Message
xbandages
14
Years of Service
User Offline
Joined: 30th Mar 2010
Location: Michigan
Posted: 1st Apr 2010 20:05
I really really want to get started on making a great 2D game and hopefully complete it by summer's end. The only issue i'm having as of right now would be the collision detection system in DarkGDK.

My real question: Is DarkGDK like XNA but for BASIC and C++? While XNA is for C#?

I'm trying to start programming with DirectX and the code is quite different...using Microsoft Studio C++ 2008...

THANKS!
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 1st Apr 2010 21:33
Dark GDK is much different than XNA, mainly because it is not object-oriented. In XNA, (I believe) everything is object-oriented.

For example, loading an image:

DarkGDK:
dbLoadImage("image.bmp", 1);

XNA:
Texture2D image;
image = Content.Load<Texture2D>("image.bmp");

I'm pretty sure that there are other threads in this forum that discuss more pros and cons, use the search function at the bottom of the page.

"A computer once beat me at chess, but it was no match for me at kick boxing."
Emo Philips
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 1st Apr 2010 22:11
DarkGDK also has a .NET version, take a look at that too.
If your objective is to just make a 2D game, DirectX may not be the best choice as you want to get it finished soon.
DarkGDK wraps DirectX for you into simple easy to use commands and will speed up your development.
Since both are free, try a tutorial in both GDK and XNA and see which you prefer.

xbandages
14
Years of Service
User Offline
Joined: 30th Mar 2010
Location: Michigan
Posted: 1st Apr 2010 22:39
Okay, thanks. My next question would be one that I also started on another thread, is there a better version of darkGDK that has better collision detection with sprites?

The reason I got into DirectX was because I read about how to do collision detection (didn't understand it though) and thought I should study up on directX in order to continue using darkGDK.

p.s. I have also searched long and hard (forums and google) for this answer....no replys on forum for darkGDK and results from google led me to directX coding.
pirogoth
16
Years of Service
User Offline
Joined: 6th Apr 2008
Location: Good Old California
Posted: 1st Apr 2010 23:02
If your eventual goal is to learn DirectX then start with DarkGDK. It's designed to allow you to mix DirectX and GDK code. The DarkGDK will allow you to skip a lot of the basic cruft that comes with getting started with DirectX.
Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 2nd Apr 2010 01:34
xbandages, I'm working on my own 2D game right now, and I have some really weird sprites where the bounding rectangle collision wouldn't work, and where pixel perfect collision would be a disaster.

So to fix this problem, I'm creating a system where you give the program some verticies, then it can draw a polygon, and the lines of those polygons are used to detect collision. I'm still working on getting some lines draw correctly, I'm really close on this, just have to do a little mathmatic wizardy.

I'll see if I can get it up by the weekend, though it might take a bit longer.

http://www.darkgdk.us/ <- You can now submit pages, upload images, yet were lacking content. We need your help!
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Apr 2010 01:35 Edited at: 2nd Apr 2010 01:39
Quote: "is there a better version of darkGDK that has better collision detection with sprites?"


Quote: "dbSpriteHit
This command will return a one if the specified sprite has impacted against the target sprite specified. If a target sprite has not been specified and a value of zero has been used, this command will return the sprite number of any sprite impacting against it.

Syntax
int dbSpriteHit ( int iSprite, int iTarget ) "


Quote: "dbSpriteCollision
This command will return a one if the specified sprite is overlapping the target sprite specified. If a target sprite has not been specified and a value of zero has been used, this command will return the sprite number of any sprite overlapping it.

Syntax
int dbSpriteCollision ( int iSprite, int iTarget ) "


I have not done much with 2D but I suggest you just do a simple test program and use the above commands and see if they fit your needs. Whatever you have read about DirectX 2D collision detection is probably wrapped up nicely in the simple commands above, I'm not certain about that though.


EDIT: Just noticed your other thread, these commands are nor pixel perfect although the post above may be on to something

xbandages
14
Years of Service
User Offline
Joined: 30th Mar 2010
Location: Michigan
Posted: 2nd Apr 2010 04:39
Thanks for all the responses!

@Cuddle Bunniezzz 12
I'm currently looking into creating pixel perfect collisions as well. I'm spamming the forums with tons of questions about the header files

Also reading a few books on directX because I found a great link that looks like the answer here.

A few of my friends and I have been programming for about 5-6 years (some rec, others school), but non of them have touched anything on graphical programming. If you guys can help me further, i'm currently looking for a way to set/get pixel colors....thanks to another question answered, I can scan the bitmap pixel by pixel!

Login to post a reply

Server time is: 2024-11-20 01:36:02
Your offset time is: 2024-11-20 01:36:02