Building Debug vs. Release

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Building Debug vs. Release

Post 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. :(
User avatar
superLED
Chaos Rift Junior
Chaos Rift Junior
Posts: 303
Joined: Sun Nov 21, 2010 10:56 am
Current Project: Engine
Favorite Gaming Platforms: N64
Programming Language of Choice: C++, PHP
Location: Norway

Re: Building Debug vs. Release

Post 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.
User avatar
bbguimaraes
Chaos Rift Junior
Chaos Rift Junior
Posts: 294
Joined: Wed Apr 11, 2012 4:34 pm
Programming Language of Choice: c++
Location: Brazil
Contact:

Re: Building Debug vs. Release

Post 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.
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: Building Debug vs. Release

Post by RandomDever »

Well so far I have learned:
In The project settings->c++->optimization tab make sure there is no optimization. Because it FAILS!
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: Building Debug vs. Release

Post 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).
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: Building Debug vs. Release

Post by RandomDever »

User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Building Debug vs. Release

Post 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.
User avatar
TheBuzzSaw
Chaos Rift Junior
Chaos Rift Junior
Posts: 310
Joined: Wed Dec 02, 2009 3:55 pm
Current Project: Paroxysm
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: Building Debug vs. Release

Post 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.
User avatar
bbguimaraes
Chaos Rift Junior
Chaos Rift Junior
Posts: 294
Joined: Wed Apr 11, 2012 4:34 pm
Programming Language of Choice: c++
Location: Brazil
Contact:

Re: Building Debug vs. Release

Post by bbguimaraes »

That reminds me of programmerinprogress' signature:
programmerinprogress wrote:I think I can program pretty well, it's my compiler that needs convincing!
Post Reply