Game Development Community

Solution: Alternate Chapter 6 and TGE 1.4

by Darrel Cusey · in Torque Game Engine · 01/09/2006 (4:36 pm) · 3 replies

Wooohooo! I finally got Alternate Chapter 6 working under Torque Game Engine 1.4. Looks like you need to have the TGE SDK version 1.4 to get this all working now.

Just to be clear, I wanted to get the Master Server code working ("Internet Master Server"). The directions below are for getting the Master Server code ("Alternate Chapter 6", also refererred to as "Internet Master Server") working. I've repeated this process 3 times now from scratch and it works perfect every time.


Here's how I did it:

1) copied over c:\emaga5 to c:\emaga6
2) downloaded the ALT_CH6.pdf from http://cerdipity.no-ip.com/book/ALT_CH6.html
3) copied the code changes/adds directly from the pdf

Be careful when copying code from the pdf -- it will put in line breaks in places you don't want them (like in long quoted strings)

4) copied the book_ch6.mis and book_ch6.ter from the cd to C:\emaga6\control\data\maps
5) made the following additional changes to control/client/client.cs:

5a) Change this under LaunchGame():

createServer("SinglePlayer", "control/data/maps/book_ch5.mis");

...to this...

createServer("MultiPlayer", "control/data/maps/book_ch6.mis");

5b) Change this under ShowMenuScreen():

Canvas.setContent( MenuScreen );

...to this...

Canvas.setContent( masterscreen );

6. made the following additional changes to /control/client/misc/masterscreen.cs

Change this line:

QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0,0,0);

...to this...

QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0);


7. Run these commands in a command prompt (this updates your tge to version 1.4 -- you need the Indie License to have the SDK):

rename c:\emaga6\tge.exe c:\emaga6\tge_backup.exe
copy c:\Torque\SDK\example\torqueDemo.exe c:\emaga6
rename c:\emaga6\torqueDemo.exe c:\emaga6\tge.exe

8. To make sure _everything_ compiles correctly, run these commands in a command prompt:

cd c:\emaga6
del /s *.dso
del /s prefs.cs
del /s config.cs
del /s config.cs.dso
del /s prefs.cs.dso

9. Now startup your dedicated server with this command:

C:\emaga6\tge.exe -dedicated -mission control/data/maps/book_ch6.mis

10. You should now get heartbeat and info requests now from the GG Master Server that look like this:

Sending heartbeat to master server [IP:216.116.32.49:28002]
Received info request from a master server [IP:216.116.32.49:28002].

11. Now just double-click on c:\emaga6\tge.exe to start up the client. After you click once, it'll go directly into the Query Master screen. Put in your name in "Player Name". Click "Query Master". It will show the server running on your computer. Click Join Server.

#1
01/09/2006 (5:11 pm)
Also, make sure your firewall is _not_ blocking (or _is_ port-forwarding) ports 28000 and 28002. If you are running a Windows Firewall, make sure you click "unblock" for "tge.exe" when prompted.
#2
01/11/2006 (2:01 pm)
Thank you.
#3
06/17/2009 (4:58 pm)
Can somone please email me the pdf, i can't find any working links! Thanks. My email is Nickkrushinski@yahoo.com