Game Development Community

How do I compile the engine source?

by Mark Evans · in Torque Game Engine Advanced · 07/15/2009 (12:05 am) · 16 replies

K so I have the source but how do I compile It? Like what do i open in VC2005? Im so confused

#1
07/15/2009 (1:52 am)
In the buildFiles directory of whatever game example or project you wish to compile you will find a folder for VS2005 or VS2008. Inside the relevant folder you simply double-click the SLN file (solution file) and that will open the project up inside of Visual Studio. From there you would select your build type from the menu (release, debug, etc) and then click Build Solution.

Once you make further changes to any of the source code files you would have to re-compile again. Depending on the extent of your changes you may have to do a "clean" operation and then rebuild for it to properly work.

I'm almost certain that the documentation covered this.
#2
07/15/2009 (2:39 am)
But it says I need to compile the source code in the documentation and I don't know how..
#3
07/15/2009 (2:52 am)
There are instructions in the documentation that says something like: "Getting Started in Windows".

It takes you step-by-step through setting up the compiler, opening the source code, and then compiling it.

Unfortunately if you can't follow that step, you may struggle with C++ and TGEA completely. My suggestion is to follow the Getting Started thread in the documentation ... it shows you everything.
#4
07/15/2009 (3:28 am)
No.. It doesn't have that help..
#5
07/15/2009 (4:09 am)
Getting started (online docs).

Offline instructions are in Documentation Overview --> Getting Started (under Engine Reference on the left).
#6
07/15/2009 (4:15 am)
Stop linking me to that, I've said that doesn't show me what to do 3 times.. You need to LEARN TO READ..
#7
07/15/2009 (4:44 am)
Quote:You need to LEARN TO READ..
k

img33.imageshack.us/img33/4046/fuckhead.jpg
#8
07/15/2009 (4:44 am)
Mark,

in your other thred, you refer to Visual Basic 2008/2005 setup. Did you install Visual C++ 2008? If you have this installed, then it should work just as described in the docs. You can basically double click and open the files with visual studio 2008 (C++) and then in the compile menu just select compile. If i remember correctly, there is even a batch file that compiles all the projects.
But just to get started, it's not necessary to compile, in the examples folder there are already compiled games (exe's). So just to mess around with Torque Scripts, the whole source compile steps are not necessary.
#9
07/15/2009 (4:44 am)
Actually, it does. If you'll follow the link and then scroll down the page where it says:

Loading a Project

It tells you precisely what to do. These guys are only trying to help. Please don't be rude.
#10
07/15/2009 (4:53 am)
Alright I'll look this over.. and sorry for being rude I'm in a really bad mood.
#11
07/15/2009 (5:19 am)
Im trying to compile the source code, not the stronghold.sln like it shows in the help thing..., Like i goto engine/source and theres nothing to open
#12
07/15/2009 (6:37 am)
The source code for the engine gets built as part of any individual project (Stronghold, Template, MyProject). There isn't a separate 'TGEA' solution.
#13
07/15/2009 (6:50 am)
I'd recommend not cutting yourself off from the community that is trying to help you. We all have bad days, but we also try to be professional even on those days. I don't get to have a bad day in the support queue. That doesn't mean that I don't have them; it just means that I don't get to infect the people who are asking me questions with my day. And bad days and the attitudes that go with them are infectious. If someone is rude to me, it is very, very easy to be rude back or to wash my hands of them.

Look in Game Examples. You will find the solutions in the various example folders under BuildFiles. For example:

\GameExamples\Stronghold\buildFiles\VisualStudio 2005

Open the solution that it notes. Note that it includes the source code for the engine as well as the stronghold demo. You can also use the template one, which is basically the T3D solution since it includes a number of features to play with out of the box.
\Projects\Template\buildFiles\VisualStudio 2005

I would recommend copying and renaming it according to your project, but you can definitely make use of it.
#14
07/15/2009 (6:51 am)
Quote:Im trying to compile the source code, not the stronghold.sln like it shows in the help thing..., Like i goto engine/source and theres nothing to open

I am actually tempted not to help you because you have been rude ... but anyway.

The stronghold mission has the source in it ... you will use the stronghold mission as a basis for your game ... especially if you are learning the engine. :)
#15
07/15/2009 (7:21 am)
Alright, thanks alot quinton.
#16
07/15/2009 (9:50 am)
Mark, just to clarify, I bought TGEA not too long ago, and like you I was originally expecting to have to compile the source as a stand alone kind of tool or similar, but thats simply not how it works, and in hindsight I feel kinda dumb :D

The source is simply that, a source set of C++ files and libraries used in projects to construct any given projects exe file. Each project needs access to the source files in order to compile its exe file (like stronghold.exe).

So if your starting a new project you'll need a nice new directory containing your source. Then when you start your project in VS 200x, you include these source files in the project.

Note: This is all done for you by the way in the game examples (under the VS build files directories), thats why the guys above are telling you about the Stronghold example.

So, try this: open the stronghold.sln in VS and then build the project (this will create/recreate the stronghold.exe file for you). Thats all there is to it, making changes to the source (ie changing the C++ code inside the VS project) will require you to re-compile the source to create a new stronghold.exe!

Once you get your head around this it will all begin to make sence.

Best of Luck!