Game Development Community

Tutorial for setting up the Development Environment?

by Hamarabi · in Torque Game Engine · 02/25/2006 (12:38 pm) · 11 replies

Is someone willing to write a tutorial for setting up all of the development packages needed in order to compile the HEAD from CVS on Ubuntu Linux? The "Getting Started" page that GG provided is quite general and does not include steps in order to get those extra packages working, such as Eclipse, Java, SDL, Mesa3d, OpenAL, etc.

Recently, I decided I wanted to learn Linux and I have found it alot of fun to work with (I love working with the commandline); however, I only have a vague idea which packages I need and how to get them functioning properly, in order to work with TGE. I have already setup a LAMP stack on my Ubuntu Linux Box and it is working flawlessly. I have chosen this type of game server for various reasons.

I have always used windows and I consider myself a semi-expert. I use Visual C++ 6.0 for that OS and have never had a single problem with compiling TGE. Linux and Eclipse / GCC are a different story. I have yet to be able to get TGE to compile on that OS.

If I plan to use Eclipse / GCC, what packages do I need in order to get that working, besides java? What are the procedures to take in order to setup the entire devlopment environment with COMMAND LINE instructions (ie., sudo apt-get install yadayada or download this and cd /directory ./Config, make, make install, etc.)? Maybe a few explanations of those procedures would be helpful as well.

One last thought: TBE appears to be abbandoned, so advice for using that may not help much.

ASSUMPTIONS:
Assume a fresh install of Ubuntu Linux running a LAMP (Linux Apache MySQL PHP) Stack.

A vigorously thorough format containing each step (leave nothing out):
SDL:
download it here http://whatever.com
cd /whereverSDLfileIS
whatever commands in terminal i need
more commands in terminal
if i can do it with apt-get: apt-get install whatever?
etc.

OpenAL:
download it here http://whatever
cd /whatever
whatever commands in terminal i need
if i can do it with apt-get: apt-get install whatever?
etc.

Continue with this sort of format until the development environtment is built and TGE is ready to compile.

INSTRUCTIONS for compiling TGE with this setup:
terminal commands
more terminal commands
etc.


I believe there are a great many people that would consider this the Greatest Resource available with regard to Linux and TGE. I think this sort of document should also be included with the TGE download and also be available somewhere (Easily Found!)on the GG website.

Think of how greatful people would be that are just starting out with Linux and TGE! Fame, Fortune, Praise, Worship, Gratitude! Well, maybe not Fortune! But, you get the idea. LOL

Thanks so much, for taking the time to read this. Cheers!

Hamarabi

#1
03/01/2006 (4:13 pm)
Yea i'd love this to, i've been trying a bit on linux.. maybe i should look deeper.. but it was asking for packages i couldnt even find o.O
#2
03/01/2006 (7:28 pm)
I just recently set it up on the latest debian unstable.

I just used apt-cache search to find the various packages I needed.

What can't you find that you need?

-Jerry
PS: The machine I'm using is an ancient PII/233 I salvaged from my pile of parts. The video card isn't supported by any flavor of X so I won't be much help on setting up X/GL/etc for linux.
#3
03/02/2006 (8:25 am)
Well, I have attempted several times to compile TGE on my Linux Box. I have even re-installed Ubuntu Linux (Ubuntu 5.10 Breezy Badger) a few times. I installed SDL, OpenAL, Mesa3d, GNU make, g++ , and NASM Assembler version 0.98, and when I go to compile the head version of TGE I get a million errors every attempt.

I have heard from several people that the head version of TGE will compile right out of the box on Ubuntu Linux, but I have not had any success. The fact that others have been able to compile TGE on Ubuntu Linux with no problems, tells me that I have not set up the development environment properly.

For a Linux Guru, I would think that a tutorial like this would only take them a few minutes to write up, a half hour at the most for formatting and clerical corrections, depending on if they have done it so many times that the procedures are instinct. :)

My Linux Box Specs:
AMD Athlon XP 2200+
KV266 Motherboard
G-Force FX 5200 Video Card
1 GB PC2100 266mhz DDRAM
Thermaltake 430W Power Supply

With that in mind, I think I need a tutorial on setting up the "Development Environment" properly. In other words, thorough instructions on installing each of those packages, so that the Head version of TGE will compile with no errors.

I hope someone will be kind enough enough to share their knowledge on this subject.

Hamarabi
#4
03/02/2006 (3:31 pm)
The head CVS compiles clean on my linux box (lots of warnings, but no errors).
Although sometimes I do have to create a directory manually (gui/containers).

Have you done the configure before the make?

make -f mk/configure.mk OS=LINUX COMPILER=GCC4 BUILD=DEBUG DIR.OBJ=out
make

Post the error your getting and I'll see if I can point you in the right direction.

As for a tutorial.. I've been down that road before and it's not as simple to do as it seems like it should be. :)
I know I don't remember what all packages I had to install to get things working right.
I just compiled and when something was missing used apt to get it.

-Jerry
#5
03/02/2006 (7:42 pm)
@Hamarabi

did you see my write up about mandy92 at this post?

http://www.garagegames.com/mg/forums/result.thread.php?qt=37189
#6
03/02/2006 (7:49 pm)
# modify dirtree where .dso files are stored - for dedicated on same system as client:
torque/engine/platformX86UNIX/platformX86UNIX.h
vim p*X.h

// to run it...
sh runtorque.sh debug


# run dedicated server:
./torqueDemod_DEBUG.bin -dedicated -game starter.fps -mission starter.fps/data/missions/stronghold.mis

# clean compiles scripts aka .dso:
find ~/.garagegames/ -iname "*.dso" -exec rm -vf {} \;

or another way:
rm -vfr ~/.garagegames


################3#building:
// maybe GCC4 ? - check your compiler with g++ --version

make -f mk/configure.mk OS=LINUX COMPILER=GCC3 BUILD=DEBUG
make clean
make dedicated
make clean
make
make tools

#cvs pull:
cvs -z3 -d :pserver:your-user-name@cvs.garagegames.com:/cvs/torque login
// it will just drop back to the commandl line after you put your password - then run next command:

cvs -z3 -d :pserver:your-user-name@cvs.garagegames.com:/cvs/torque checkout -r HEAD torque


and don't forget to pimp your world editor...

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9795
#7
03/04/2006 (9:05 am)
I have compiled torque on ubuntu and I do it in this way

Linux version ubuntu 5.10. The install has been done with synaptic.

I installed :
gcc (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
NASM version 0.98.38 compiled on Jun 27 2005
Concurrent Versions System (CVS) 1.12.9 (client/server)
libxft-dev 2.1.7
libsdl1.2-dev


I have created a directory in my home.
mkdir cvs
cd ~/csv

In this directory I have downlaoded the csv :
cvs -z3 -d :pserver:your-user-name@cvs.garagegames.com:/cvs/torque login
cvs -z3 -d :pserver:your-user-name@cvs.garagegames.com:/cvs/torque checkout -r HEAD torque

I compile in : cd ~/cvs/torque
make -f mk/configure.mk OS=LINUX COMPILER=GCC3 BUILD=DEBUG

make -f mk/configure.mk OS=LINUX COMPILER=GCC3 BUILD=DEBUG
make clean
make dedicated
make clean
make
make tools

It works => I got a binary of 23 MO instead of 3.9 MO : is it normal ?
#8
03/04/2006 (9:11 am)
The large file is because of debugging symbols.
If you want to make it smaller..

strip -s torqueDemo_DEBUG.bin -o torqueDemo_DEBUG.strip.bin

Of course if you try to debug it you won't be able to see line numbers, etc.

-Jerry
#9
03/13/2006 (10:51 am)
I have put up a guide for installing torque on Ubuntu.

Most all of the packages I listed are one's that I have installed on my system, so there may be extra packages in the listing than what are required. If there is anything missing, or you know that one of the packages listed aren't required, let me know and I will put in/take it out.

My guide can be found at:
http://web.ics.purdue.edu/~ljbuesch/cms/?q=node/5

I don't think that any of the packages described needed the Universal repository, but if they do, then I'll put up how to activate that in the guide also.

Any comments are appreciated.

-Logan
#10
03/13/2006 (11:08 am)
You will need universeal and multiverse to install Kdevelope if you wish to use it

I also do not recall installing Mesa, did install Nvidia drivers seeing that the ones from the nvidia site do not compile/install for me.


-Ron
#11
04/27/2006 (1:00 pm)
Thanks a ton Logan, that did the trick! I got it to compile and run smoothly! I appreciate your efforts :)

Someone should sticky that or put it where people can find it easily :)

Hamarabi