Game Development Community

VC++ 6.0 SP 5 - Larger EXE & Console Window?

by Welias D. Willie II · in Torque Game Engine · 03/28/2004 (7:37 pm) · 7 replies

Hello, I purchased Torque almost a year ago with intent to dig in and learn C++. Well I wimped out and have spent the last 6 months with 3D Game Studio. I confess, it was a mistake. So I have come full circle and now I am back.

I recently compiled the 1.2 HEAD branch successfully in VC++ 6.0 but I am curious as to why the executable is three times larger than the executable distributed with the demo?

Also when I launch my compiled version it seems to launch a console window and then a seperate window for the Torque demo to run within. Can this be canged in VC++ 6.0?

My guess is that the size of the executable is due to compiling with Microsoft products:

if (%sizeOfApp < %reasonable){&increaseSizeOfApp;} // standard ms operations

Also it is my guess that this "console" window or what ever it is, is also because of MS VC++.

For consideration please keep in mind that I have very little understanding of C++. I am very capable with VB and many scripting languages (Perl, PHP, etc) and while I know I am stepping into a very difficult language, I hope to at least modify the very few things I need in the TGE to complete my game in Torque Script. Luckily the source mods I need are very well documented here on the forums by other gracious users.

Any words of wisdom however simple or complex would be greatly appreciated. Again, exe size larger and console window in addition to torque game window... how to change?

Thanks in advance!

#1
03/28/2004 (7:39 pm)
Note: I compiled a Release build (the debug build was seven times larger than the demo exe)...

The release build is: 3236 KB while the downloadable demo build is 1002 KB.

I still have the question about executable size but I have solved the problem with the console window, subsytem:windows in the project settings linking options fixed it.

Along with the size question I would like to know if it is difficult and/or if someone can point me in the right direction for using VC dialog windows with the torque window embedded? Not sure if I am asking that properly... I want to use VC++ to create my window (dialog), add controls and have those controls interact with the TGE (or other functionality) with the TGE framed within the same window.


(sorry I just noticed the edit icon here in the forums - will use from now on - if this is not the right forum index, please advise)
#2
03/28/2004 (9:20 pm)
It's unlikely you can do the latter with any efficiency; Torque render to an OpenGL context, whereas the windows UI uses GDI. You're better off using the builtin GUI library.

It's possible the downloadable build was optimized for size over speed, or that an EXE stripper was run on it.
#3
03/28/2004 (9:25 pm)
Thanks Ben. I am content with working entirely in OpenGL. I will adjust the optimizations in an attempt to reduce the file size, I am certain this will work.
#5
03/28/2004 (11:34 pm)
Darek, yep you prabably compile the "debug" build which last time I checked gives you a 8 meg files.
Changed the build to the "release" build
#6
03/29/2004 (4:45 am)
Ben, that is an amazing tool. It did the trick. I compiled to release build, ran the UPX on it and it was down to the exact same size as the TGE Demo distribution. Now I must tell my buddies about UPX!
#7
03/29/2004 (8:44 am)
Yes, Ben, thanx for the upx tip.