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 / Problems Running my EXE

Author
Message
Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 8th Sep 2010 04:00
So my problem isn't getting my game to run by clicking on the exe its when I am actually playing the game there are things that aren't working when I play it. Now when I run the game in debug mode everything runs perfectly and I don't have any issues but when I run the exe in the debug the game gets screwed up. Now I know I have to put all the correct files in the same folder as my exe so the game runs but how can I debug what is going on when I am running the game from the exe? I mean if it is working when I am testing it in the debug then is there still something wrong with the code or is there something wrong with where the exe is located?

Any suggestion would greatly be appreciated.
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 8th Sep 2010 04:44
Quote: "Now when I run the game in debug mode everything runs perfectly and I don't have any issues but when I run the exe in the debug the game gets screwed up"


Do you mean in release? Or just without the debugger attached?

Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 8th Sep 2010 05:01
I haven't ran the game in release mode just debug and then went and ran the exe that the is in the debug folder(I also put the media in there as well so it runs). I haven't had that be an issue with the last two games I have made exe's out of but could that be the problem?
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 8th Sep 2010 06:37
Well by default the IDE sets the current working directory to that of the project location, but the exe is inside /Debug, so running it there means the relative paths will all be wrong. So try moving the exe up a directory and running it.

I personally like building my exes into a /bin folder and having my media within that, that way it's far easier to deploy.

Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 8th Sep 2010 07:17
I don't think it has to do with my directories I have moved them into a new folder and tested it there and like I said it runs fine and works, but for instance for one of my moves when I delete the sprite it doesn't delete it just stays on the screen. Now when I run it in the debug and not the exe it runs fine and that doesn't happen. So how would I debug that even though its working in my project?
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 8th Sep 2010 07:45
You're most likely doing something wrong with GDK, and by default there are no error messages thrown when you do something wrong so you'll have to throw your own errors when an error occurs. I believe Diggsey has written some code to do this, but I don't have a link to it, so you'll have to search for it.

Login to post a reply

Server time is: 2024-11-19 18:46:11
Your offset time is: 2024-11-19 18:46:11