Obstacles In the Development Path
by Anders Dahnielson · 12/29/2005 (4:17 pm) · 1 comments
Ok, since I bought my TGE license I haven't created anything yet. Well, I did once a long, long time ago almost managed to build TGE on Linux with the autotools (autoconf, automake, libtool, etc.) but screwed it all up by copying the wrong files when updating the tree to a later TGE version (I think I copied HEAD files when the autotool tree was based on TGE 1.2).
But this will hopefully change now when I together with a friend decided to make a game our "Project 2006". Especially with me bragging about how much easier it will be to make a finished game with TGE than sail another movie project into port.
So I pulled the latest TGE 1.4 from CVS and held my breatch while waiting for it to compile on my Gentoo GNU/Linux box. And it did!
But I soon bumped into an obstacle when trying to walk through the GettinStarted.pdf. I became very confused over the issue where the editors saved my files. Then I found out by accident that it all gets saved in a hidden dir in my home dir ~/.garagegames/torqueDemo/. I asked myself: Varför? Warum? Why?
Why isn't it saved in my games data dir? And how can I change this behaviour? The helpful answer found in the forum was the need to run with the -nohomedir option on the commanline. Now everything will be saved in the regular game/mod file hierarchy (note this is a GNU/Linux only TGE behaviour) including the "compiled" script dso files.
However, everything wasn't fine. First, all files, textures and other files, was listed in a flat namespace making it a veeery long scrollist in the file dialog. Second, running with the -nohomedir option would save the mission files et al. in the example dir (or whatever dir I ran the binary from) but in something like a home/anders/Torque-CVS/example/GameOne/... subdir in the example... Argh!!
This turned out to be caused by the same bug in the Linux specific parts of TGE codebase. For what Todd "zaz" Koeckeritz already had submited a patch.
After I aplied the patch everything was working much better. The new file dialog finaly made sense and stuff where no longer saved in some insane subdir hierarchies but in the proper places, the places you actually picked in the dialogs... Yes this is still an AAA game engine we're talking about. ;-)
Well, now when that's finaly working I'm off to create a bare bone framework (creating something similar to the MinApp tutorials) to build my prototype on.
But this will hopefully change now when I together with a friend decided to make a game our "Project 2006". Especially with me bragging about how much easier it will be to make a finished game with TGE than sail another movie project into port.
So I pulled the latest TGE 1.4 from CVS and held my breatch while waiting for it to compile on my Gentoo GNU/Linux box. And it did!
But I soon bumped into an obstacle when trying to walk through the GettinStarted.pdf. I became very confused over the issue where the editors saved my files. Then I found out by accident that it all gets saved in a hidden dir in my home dir ~/.garagegames/torqueDemo/. I asked myself: Varför? Warum? Why?
Why isn't it saved in my games data dir? And how can I change this behaviour? The helpful answer found in the forum was the need to run with the -nohomedir option on the commanline. Now everything will be saved in the regular game/mod file hierarchy (note this is a GNU/Linux only TGE behaviour) including the "compiled" script dso files.
However, everything wasn't fine. First, all files, textures and other files, was listed in a flat namespace making it a veeery long scrollist in the file dialog. Second, running with the -nohomedir option would save the mission files et al. in the example dir (or whatever dir I ran the binary from) but in something like a home/anders/Torque-CVS/example/GameOne/... subdir in the example... Argh!!
This turned out to be caused by the same bug in the Linux specific parts of TGE codebase. For what Todd "zaz" Koeckeritz already had submited a patch.
Quote:
Had a bear of a time with the new file dialog. In fact I thought it was completely broken, but when I went to debug the problem, it turned out to be an issue with the use of dirent on certain file systems during the recursion in recurseDumpDirectories() and hasSubDirectory(). This is because they rely on dirent->d_type to be useful, which isn't guaranteed on all file system types. Once I fixed this problem the file dialog works much better.
After I aplied the patch everything was working much better. The new file dialog finaly made sense and stuff where no longer saved in some insane subdir hierarchies but in the proper places, the places you actually picked in the dialogs... Yes this is still an AAA game engine we're talking about. ;-)
Well, now when that's finaly working I'm off to create a bare bone framework (creating something similar to the MinApp tutorials) to build my prototype on.
About the author
Bought his Torque Game Engine license in April 2004 and then pursued to not make very much with it.

Torque Owner Anders Dahnielson
And here's the patch (yes it's kinda overkill) to do it...
Index: mk/conf.UNIX.mk =================================================================== RCS file: /cvs/torque/torque/mk/conf.UNIX.mk,v retrieving revision 2.7 diff -u -w -r2.7 conf.UNIX.mk --- mk/conf.UNIX.mk 2005/12/22 03:09:27 2.7 +++ mk/conf.UNIX.mk 2005/12/30 12:19:10 @@ -38,7 +38,7 @@ # -fno-exceptions is safe to use (if your code doesn't use exceptions), # but it is disabled by default # -fno-check-new is not tested -CFLAGS.GENERAL = -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 \ +CFLAGS.GENERAL = -I/usr/X11R6/include/ -MD -march=i586 \ `freetype-config --cflags` -mcpu=i686 -ffast-math -pipe #-w -fno-exceptions -fno-check-new