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 / Do I have a hole?

Author
Message
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 9th Aug 2005 20:51
I`m using glfw to handle pads (DarksdK only supports one pad at once) so I`ve done a little test to see if they work together. While they apear to work fine I`ve noticed that the programs memory usage just increases over time. Is this normal behaver? I haven`t left it long for fear of crashing my pc but it got up to 20 megs and didn`t show any sine of stopping.

P.S LoopSDK just returns a 0 when the x button is clicked right? Just worrying if my program actually gets to glfwTerminate();.


Gimme teh votez!!!!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Aug 2005 21:02
Quote: "LoopSDK just returns a 0 when the x button is clicked right?"

At the moment we're not sure about that...

Quote: "(DarksdK only supports one pad at once)"

And it gets worse if you have multiple joysticks, of which at least 2 are the same type...

As for your main problem - I have't used that for a while, so I dont know. There didn't seem to be a problem when someone did the plug-in using that.

Unfortunately I cant test it...

AtomZ - its got an A. Its got a Z. Now its just needs U
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 9th Aug 2005 21:26
Quote: "At the moment we're not sure about that..."

Darn. Maybe I should email Mike?
Quote: " There didn't seem to be a problem when someone did the plug-in using that.
"

Well I`ve found out it has nothing to do with glfw. I run it on it`s own and it stays at some 8megs. I run another DGSDK program and the same problem happens though it increases at a slower rate. Probably due to the fact that it runs at a slower frame rate. I`ve also tried it with Leo Christopherson`s snake game and the same thing happens. Even with the precompiled version. So I`m guesing this is just how directx works right? Or could this be a bug with DGSDK?


Gimme teh votez!!!!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Aug 2005 22:53
Thr GL joystick system uses OpenGL (hence the name) - or possibly Win32's way of reading joysticks. Either way, I dont think it uses DirectX.

I would be more inclinded to say its a problem with the GL library myself, although it would be the two systems interfering with each other...

AtomZ - its got an A. Its got a Z. Now its just needs U
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 10th Aug 2005 12:11
It must be a fault my end as this memory thing happens with all DGSDK games. I might trying seeing how much memory the programs go to later. Though I don`t like crashing my pc on purpose it might be that it just hadn`t finished allocating memory. Does it happen on your pc?


Gimme teh votez!!!!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Aug 2005 14:04
Yes, memory usage seems to be steadily increasing.

AtomZ - its got an A. Its got a Z. Now its just needs U
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Aug 2005 14:07 Edited at: 10th Aug 2005 14:09
It seems to be either dbPrint or dbStr causing the memory problem - my tests show it appears to be dbStr.

Try this :



AtomZ - its got an A. Its got a Z. Now its just needs U
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 10th Aug 2005 17:08
Same problem. I declare dbStr guilty as charged. So do I send that email to Mike?


Gimme teh votez!!!!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Aug 2005 17:15
Too late - did that ages ago...

AtomZ - its got an A. Its got a Z. Now its just needs U
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 10th Aug 2005 18:35
ah ok. By the way. Do you know a way to print a float to screen without dbStr?


Gimme teh votez!!!!
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 10th Aug 2005 20:06
char tmp[256]; //or whatever
float myFloat = 0;

sprintf(tmp, "%f", myFloat);
dbText(10, 10, tmp);

sprintf requires you to #include "stdio.h"

MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 10th Aug 2005 20:44 Edited at: 10th Aug 2005 20:55
Cool. Thank you.
mmm I need to learn how to make longer sentances.

Edit:
Bouncy Brick: I think I`ll email Mike anyway. I need to know how LoopSDK works before I crash my pc.....


Gimme teh votez!!!!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Aug 2005 22:32
Hole? You mean 'leak'.

LoopSDK will return false when the window is closed - whether from the X being hit, ALT-F4, or from otherwise receiving the WM_CLOSE message.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 11th Aug 2005 14:12
Quote: " Hole? You mean 'leak'."

Well my logic was that in order to have a leak I would have to have a hole. Like when a buket leaks water it has a tiny hole in it. So I wanted to know if I had a hole and if so where it was. I wondered when someone was going to ask that question.
Quote: "LoopSDK will return false when the window is closed - whether from the X being hit, ALT-F4, or from otherwise receiving the WM_CLOSE message."

Ah cool. Then it works how I want. Thank you.


Gimme teh votez!!!!
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 11th Aug 2005 16:42
Ah it won`t work. Aswell as returning false it calls PostQuitMessage(0) which exits imediatly. In order to have it just exit the function you have to use:

Thanks to Mike for this information.


Gimme teh votez!!!!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Aug 2005 17:14
Did he mention anything about dbStr ?

AtomZ - its got an A. Its got a Z. Now its just needs U
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 11th Aug 2005 17:44
mmm. No. I didn`t ask. I thought it would be rude if we both sent him emails asking about it. He did give the code to LoopSDK though:

Did you get info about dbStr? Should we place bets on patch 1.2? Maybe there`ll be a patch 1.12.


Gimme teh votez!!!!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Aug 2005 17:46
Haven't heard from Mike about - probably busy (or storing it for later on)...

There wont be a patch for a while yet due to the physics thing...

AtomZ - its got an A. Its got a Z. Now its just needs U
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Aug 2005 18:07
Ah, that explains a few things ... I didn't know that LoopSDK was quite that light - I thought that it included a standard windows message loop to. I wonder where the windows messages get handled?

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 12th Aug 2005 10:28
The standard windows message loop is contained in the core library. When a quit message is received the global g_iDarkGameSDKQuit is set to 1 and this is where the LoopSDK function comes in. Its purpose is simply to check when a quit message has been sent and then to break out.

I will have a look at the dbStr function and see what can be going wrong.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 12th Aug 2005 10:57
Quote: "I will have a look at the dbStr function and see what can be going wrong."

Good-oh

AtomZ - its got an A. Its got a Z. Now its just needs U
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk

Login to post a reply

Server time is: 2024-04-25 02:37:28
Your offset time is: 2024-04-25 02:37:28