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 User Here

Author
Message
Justin AnyhowStep
13
Years of Service
User Offline
Joined: 17th Jul 2011
Location: Use of uninitialized variable
Posted: 18th Jul 2011 01:19
Hello, I'm a new user of Dark GDK.
I came across it from a book I borrowed at the library.
Anyways, I've got a few questions (I am new, after all).

Is there a function I can call to get a sound file's size and play-length?
I'm just curious.

Also, is there a limit to the number of sounds I can load?
I know music files have a limit of 32.. And images have.. INT_MAX
(whatever that is, 65,535?)

And has anyone released a pixel-perfect collision system for Dark GDK?

First year student of a game-programming course
vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 18th Jul 2011 11:41
Im not the right person to say this but Welcome xD

About the first question, i dont know sorry, but you can try this:
Start > All Programas > The Game Creators > DarkGDK > Documentation > Information

Now check if theres something there you can use.

About the second question, i think there's a limit, but really? are you using 9999999999999999999999 sounds at one games? xD

About the third question you can use
dbSpriteCollision(Sprite, Collide with?);

But of course its not a perfect collision system.

So i use this for stactic Sprites:



Just a example of this:

Boat2 Boat
X-----> X<----

Sorry if im too confuse xD

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 18th Jul 2011 12:07
There were experiments earlier for pixel-perfect collision, and also "vector collision". I haven't tested either (being more interested in 3D stuff than 2D) but I will post the threads here, I hope they will be useful to you.

http://forum.thegamecreators.com/?m=forum_view&t=168243&b=22

http://forum.thegamecreators.com/?m=forum_view&t=168273&b=22

http://forum.thegamecreators.com/?m=forum_view&t=138964&b=22

http://forum.thegamecreators.com/?m=forum_view&t=173339&b=22
Justin AnyhowStep
13
Years of Service
User Offline
Joined: 17th Jul 2011
Location: Use of uninitialized variable
Posted: 19th Jul 2011 18:30
@Mireben
Thanks, xbandages' collision system works fine (As far as I can tell)

@vitinho
I just wanted to know if there was an upper limit because I'm too lazy to keep track of which instances of objects in my game use which sounds and sprites.

So, I have added an additional layer of abstraction by creating allocators and deallocators for sounds and sprites

I just want to know 'when' I overstep a limit, just to be on the safe side.

@everyone
It seems that the following gets the sound-information I need:
void dbGetSoundData ( int iID, DWORD* dwBitsPerSecond, DWORD* Frequency, DWORD* Duration, LPSTR* pData, DWORD* dwDataSize, bool bLockData, WAVEFORMATEX* wfx );

But I can't use dbPrint on DWORD variables.
Any suggestions on how I overcome this?

First year student of a game-programming course
vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 19th Jul 2011 21:14
Maybe convert it to char and use dbText, How? I dont know =D

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 19th Jul 2011 21:30
sprintf is your friend.



http://www.cplusplus.com/reference/clibrary/cstdio/sprintf/
vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 19th Jul 2011 23:41
hehe i use that =D but i use dbText

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5

Login to post a reply

Server time is: 2024-11-19 09:36:34
Your offset time is: 2024-11-19 09:36:34