Beta 2 Dedicated server for Linux
by elvince · in Torque 3D Professional · 02/18/2010 (2:30 pm) · 54 replies
Hi,
it has been said that a huge work have been done on this part in Beta1.
Can someone do a quick guide/explanation on how to compile T3D in dedicated server for Linux?
Thanks in advance!
it has been said that a huge work have been done on this part in Beta1.
Can someone do a quick guide/explanation on how to compile T3D in dedicated server for Linux?
Thanks in advance!
About the author
Recent Threads
#22
That's really an excellent news.
This will confort my planned architecture.
Having the opportunity to run a linux server is really something important and will clearly add value to the game engine even if it is supported only by the community (for the moment :D)
When you release your patch if you can add a 'mini' guide on how you succeed to compile the server, this will be very helpfull.
thanks again for your time on this,
09/28/2010 (8:02 pm)
@Bank,That's really an excellent news.
This will confort my planned architecture.
Having the opportunity to run a linux server is really something important and will clearly add value to the game engine even if it is supported only by the community (for the moment :D)
When you release your patch if you can add a 'mini' guide on how you succeed to compile the server, this will be very helpfull.
thanks again for your time on this,
#23
09/30/2010 (11:54 am)
I'll add to everyone else and say this is good news, linux dedicated servers are cheaper and better to use for me :)
#24
I'm on a business trip, so the changes will be released as soon as I get back to the office (hopefully by the end of next week, probably a couple of days more).
10/16/2010 (8:26 pm)
Sorry everyone for the delay, I'm really lacking spare time.I'm on a business trip, so the changes will be released as soon as I get back to the office (hopefully by the end of next week, probably a couple of days more).
#25
In all case 1 week delay will not matter compare the useful functionality you will add.
10/16/2010 (10:49 pm)
Thanks for the update. In all case 1 week delay will not matter compare the useful functionality you will add.
#26
11/13/2010 (12:52 pm)
Hello bank, any news about dedicated linux server ?
#27
http://www.dedicatedlogic.net/_files/T3D11_B3_linux_dedicated.patch
Should be self-explanatory. Within a few days I'll jump back here to answer if there are any questions.
Sorry, need to run, just got back from another trip and need to finish some stuff in coming days.
EDIT / NOTE:
Keep in mind, that the sources (for Windows) should also be patched, or you won't be able to connect.
11/14/2010 (2:35 pm)
Hi everyone. Just got time to upload the patch (git-generated):http://www.dedicatedlogic.net/_files/T3D11_B3_linux_dedicated.patch
Should be self-explanatory. Within a few days I'll jump back here to answer if there are any questions.
Sorry, need to run, just got back from another trip and need to finish some stuff in coming days.
EDIT / NOTE:
Keep in mind, that the sources (for Windows) should also be patched, or you won't be able to connect.
#28
I looked in the patch file and you mostly add "pre processor" were needed and add some specific init for Linux.
I bet if GG is reborned, they will include it.
When you have time, if you can just explain us how you compiled it as I remembered you told to use : GCC 4.1, is there any other restriction? on what linux version are you running (just in case).
Thanks again, I really appreciate this patch!
11/14/2010 (2:47 pm)
That's just awesome.I looked in the patch file and you mostly add "pre processor" were needed and add some specific init for Linux.
I bet if GG is reborned, they will include it.
When you have time, if you can just explain us how you compiled it as I remembered you told to use : GCC 4.1, is there any other restriction? on what linux version are you running (just in case).
Thanks again, I really appreciate this patch!
#30
11/14/2010 (8:28 pm)
Awesome :)
#31
1.
> chmod +x generateProjects.command
> ./generateProjects.command
or:
2.
> sh generateProjects.command
it will generate makefiles.
So, the overall steps:
The main dev pc is OpenSuSE 11.1 (x86) - that's the OS I stick with to host our game.
Haven't tried to run on newer releases (11.2/11.3). Once (about a year ago) I've got it running on Kubuntu - but don't remember on which version.
NOTE:
The main requirements are still the same as with building TGE on Linux.
You need to have installed MESA/SDL/Vorbis/Theora and "nasm" (this one for .asm compilation).
On OpenSUSE its:
That should be enough, if I haven't missed anything.
Another note: in order to get faster compiling, change the "OPTIONS := --jobs=X" where X is the amount of cores on your Linux box. In my patch by default it's set to 4 (using C2Q Q9550 processors on all of our servers). See Tools/projectGenerator/templates/makeSolution.tpl.
Huge thanks goes to the whole Torque team and specially to Rene and Tom - they helped a lot in getting T3D on Linux. Since T3D 1.0 a lot of fixes was applied to engine only to get this working. This is why my "patch" is so small. :) Thanks guys!
11/15/2010 (7:24 am)
In order to "make it working" - after applying patch ofc - you will need to run generateProjects.command:1.
> chmod +x generateProjects.command
> ./generateProjects.command
or:
2.
> sh generateProjects.command
it will generate makefiles.
So, the overall steps:
> cd Templates/Full/ > chmod +x generateProjects.command > ./generateProjects.command > cd Templates/Full/buildFiles/Make_Ded > make debug > make release > cd ../../game > ./Full -dedicated -mission levels/mylevel.mis
The main dev pc is OpenSuSE 11.1 (x86) - that's the OS I stick with to host our game.
Haven't tried to run on newer releases (11.2/11.3). Once (about a year ago) I've got it running on Kubuntu - but don't remember on which version.
NOTE:
The main requirements are still the same as with building TGE on Linux.
You need to have installed MESA/SDL/Vorbis/Theora and "nasm" (this one for .asm compilation).
On OpenSUSE its:
Mesa-devel libtheora-devel libvorbis-devel SDL-devel nasm
That should be enough, if I haven't missed anything.
Another note: in order to get faster compiling, change the "OPTIONS := --jobs=X" where X is the amount of cores on your Linux box. In my patch by default it's set to 4 (using C2Q Q9550 processors on all of our servers). See Tools/projectGenerator/templates/makeSolution.tpl.
Huge thanks goes to the whole Torque team and specially to Rene and Tom - they helped a lot in getting T3D on Linux. Since T3D 1.0 a lot of fixes was applied to engine only to get this working. This is why my "patch" is so small. :) Thanks guys!
#32
all of this doesn't work if you use "My Projects" folder for your projects.
I've changed it to "Projects" and all is working fine.
Keep in mind that you also can't load mission which file name contains spaces (like "Empty Terrain.mis").
11/15/2010 (8:13 am)
Another important note:all of this doesn't work if you use "My Projects" folder for your projects.
I've changed it to "Projects" and all is working fine.
Keep in mind that you also can't load mission which file name contains spaces (like "Empty Terrain.mis").
#33
error: Templates/Full/buildFiles/config/project.linux_ded.conf: No such file or directory
error: Templates/Full/buildFiles/config/torque3D_dedicated.conf: No such file or directory
In beta1 I was able to generate the project.linux_ded.conf but forgot how :( I guess this means reading some php code again.
11/15/2010 (10:27 am)
At the moment I'am fighting the undocumented project generator to get the missing files:error: Templates/Full/buildFiles/config/project.linux_ded.conf: No such file or directory
error: Templates/Full/buildFiles/config/torque3D_dedicated.conf: No such file or directory
In beta1 I was able to generate the project.linux_ded.conf but forgot how :( I guess this means reading some php code again.
#34
The only change needed:
Original:
11/15/2010 (10:35 am)
Thomas: you can take those files from the Full template.The only change needed:
Original:
<?php
// Set the game project name, this is what your game's exe/dll will be called
setGameProjectName("Full");New:<?php
// Set the game project name, this is what your game's exe/dll will be called
setGameProjectName("MyProjectName");Replace "Full" with your project name.
#35
I found a project file which could match in 1.0 beta 5, but not a dedicated file.
Edit: your unpatched .conf files would help ;) the git apply stops there and does not continue.
11/15/2010 (11:06 am)
Thanks for replay, since 1.1 the project.conf file looks like this:<?php
// Set this true to enable hifi networking instead of standard.
// In general ... hifi is designed to better deal with fast
// moving players in close proximity to each other, such as
// a racing game.
$TORQUE_HIFI_NET = false;
// Configure Torque 3D
Torque3D::beginConfig( "win32", "Full" );
// Include Web Deployment module
includeModule( 'webDeploy' );
// Enable for optional minidump debugging support
// addProjectDefine( 'TORQUE_MINIDUMP' );
Torque3D::endConfig();
?>I found a project file which could match in 1.0 beta 5, but not a dedicated file.
Edit: your unpatched .conf files would help ;) the git apply stops there and does not continue.
#36
Those files (dedicated/linux) are not included in the T3D.
You can grab it from here:
Already-patched: T3D11_B3_linux_dedicated_config_files.zip
Original (non-patched): T3D11_B3_linux_dedicated_config_files_not_patched.zip
Remember to change the "Full" to your project's name :)
11/15/2010 (11:19 am)
Oh, sorry, my fault.Those files (dedicated/linux) are not included in the T3D.
You can grab it from here:
Already-patched: T3D11_B3_linux_dedicated_config_files.zip
Original (non-patched): T3D11_B3_linux_dedicated_config_files_not_patched.zip
Remember to change the "Full" to your project's name :)
#37
but:
error: patch failed: Templates/Full/buildFiles/config/project.linux_ded.conf:3
error: Templates/Full/buildFiles/config/project.linux_ded.conf: patch does not apply
error: patch failed: Templates/Full/buildFiles/config/torque3D_dedicated.conf:3
error: Templates/Full/buildFiles/config/torque3D_dedicated.conf: patch does not apply
Are the files the patched files ?
11/15/2010 (11:25 am)
thanks again :Dbut:
error: patch failed: Templates/Full/buildFiles/config/project.linux_ded.conf:3
error: Templates/Full/buildFiles/config/project.linux_ded.conf: patch does not apply
error: patch failed: Templates/Full/buildFiles/config/torque3D_dedicated.conf:3
error: Templates/Full/buildFiles/config/torque3D_dedicated.conf: patch does not apply
Are the files the patched files ?
#38
I've updated my post above to include the original (non-patched) files.
11/15/2010 (11:29 am)
Yeap, those are already-patched ones, so you can ignore the error.I've updated my post above to include the original (non-patched) files.
#39
tom@tigerclaw:/opt/torque/t3d11b3$ git apply T3D11_B3_linux_dedicated.patch
T3D11_B3_linux_dedicated.patch:35: trailing whitespace.
#ifdef LINUX
T3D11_B3_linux_dedicated.patch:36: trailing whitespace.
#include <climits>
T3D11_B3_linux_dedicated.patch:37: trailing whitespace.
#endif
T3D11_B3_linux_dedicated.patch:150: trailing whitespace.
#include "core/module.h"
T3D11_B3_linux_dedicated.patch:153: trailing whitespace.
MODULE_BEGIN( LightMapParams )
warning: squelched 60 whitespace errors
warning: 65 lines add whitespace errors.
:)
11/15/2010 (11:33 am)
Finally with the unpatched files :)tom@tigerclaw:/opt/torque/t3d11b3$ git apply T3D11_B3_linux_dedicated.patch
T3D11_B3_linux_dedicated.patch:35: trailing whitespace.
#ifdef LINUX
T3D11_B3_linux_dedicated.patch:36: trailing whitespace.
#include <climits>
T3D11_B3_linux_dedicated.patch:37: trailing whitespace.
#endif
T3D11_B3_linux_dedicated.patch:150: trailing whitespace.
#include "core/module.h"
T3D11_B3_linux_dedicated.patch:153: trailing whitespace.
MODULE_BEGIN( LightMapParams )
warning: squelched 60 whitespace errors
warning: 65 lines add whitespace errors.
:)
#40
I had some link problems and added "-logg -lvorbis -ltheora" in "Full":
LDLIBS := -lstdc++ -lSDL -lpthread -lrt -logg -lvorbis -ltheora
The client crash after connecting (Failed to create resource: [levels/empty.mis.decals] ?!) , but that is another story.
11/15/2010 (3:11 pm)
Success compile, link and run :)I had some link problems and added "-logg -lvorbis -ltheora" in "Full":
LDLIBS := -lstdc++ -lSDL -lpthread -lrt -logg -lvorbis -ltheora
The client crash after connecting (Failed to create resource: [levels/empty.mis.decals] ?!) , but that is another story.
Torque 3D Owner Ronny Bangsund
Torque Cheerleaders