Page 1 of 1

Building Debug vs. Release

Posted: Mon Apr 16, 2012 11:20 pm
by RandomDever
I have visual express C++ 2008 and I can build my game in debug mode and it works fine.
But when I build it in release mode, the collision detection doesn't work.
ANY help would be GREATLY appreciated, as this is the only thing keeping me from releasing my new game. :(

Re: Building Debug vs. Release

Posted: Mon Apr 16, 2012 11:58 pm
by superLED
Make sure you have ALL the files in the release folder, as you have in your debug folder.
And make sure you have the same settings for both debug and release when building.

And make sure that all the files are updated. If you have a file where you "draw the map", maybe this file is out of date, and is not adding your solid tiles.

Re: Building Debug vs. Release

Posted: Tue Apr 17, 2012 12:01 am
by bbguimaraes
Also, I've been told that Visual Studio has the habbit of initializing variables to you, but only on Debug mode (though I can't confirm that, as I don't use it). So, when you compile and run it on Release, some weird events start happening because you forgot to initialize some of them.

Re: Building Debug vs. Release

Posted: Tue Apr 17, 2012 12:34 am
by RandomDever
Well so far I have learned:
In The project settings->c++->optimization tab make sure there is no optimization. Because it FAILS!

Re: Building Debug vs. Release

Posted: Tue Apr 17, 2012 12:47 am
by RandomDever
I fixed it. Thanks to superLED.
The Second thing that was causing collision to fail, was Under Project->Properties->C/C++->Code Generation->Basic Runtime Checks Make sure it is 'Both (/RTC1, equiv. to /RTCsu)' or It will, in typical Microsoft fashion, fail epicly.
Expect a post about the new game soon(1 hour or less).

Re: Building Debug vs. Release

Posted: Tue Apr 17, 2012 12:51 am
by RandomDever

Re: Building Debug vs. Release

Posted: Wed May 02, 2012 8:34 am
by Falco Girgis
RandomDever wrote:I fixed it. Thanks to superLED.
The Second thing that was causing collision to fail, was Under Project->Properties->C/C++->Code Generation->Basic Runtime Checks Make sure it is 'Both (/RTC1, equiv. to /RTCsu)' or It will, in typical Microsoft fashion, fail epicly.
Expect a post about the new game soon(1 hour or less).
Son, you should really back off the hating...

If the "runtime checks" fixed anything, it's because you made a mistake in your code. It isn't magic. It checks for errors that you have made as a programmer. Visual Studio is probably the most powerful compiler that I have ever used.

Your errors have nothing to do with Visual Studio and everything to do with your code.

Re: Building Debug vs. Release

Posted: Thu May 03, 2012 10:24 am
by TheBuzzSaw
Falco, do not forget: in the web development world, the relationship is reversed. Everyone can and does code however they want, and they expect the browsers to adjust to them. Browsers are expected to work with malformed HTML and inconsistent JavaScript (filled with errors), but it is NEVER THE CODER'S FAULT.

Re: Building Debug vs. Release

Posted: Thu May 03, 2012 5:03 pm
by bbguimaraes
That reminds me of programmerinprogress' signature:
programmerinprogress wrote:I think I can program pretty well, it's my compiler that needs convincing!