Game Development Community

Splitting TGE into a set of shared libraries

by Joel Reymont · in Torque Game Engine · 01/27/2005 (11:41 am) · 11 replies

I just built myself a Mac OSX framework version of TGE and noticed that the resulting library is 62Mb in size. I'm delivering a poker game that should, compressed into an installation package, take no more than 6-7Mb.

I only need 2D sprites, events and the like. I don't have a need for fog, terrains or a built-in GUI editor. I'm looking to deliver on Mac OSX and Windows initially.

Is there a way a sensible way to split TGE into a set of libraries to that I can link against the ones I need?

Thanks in advance!

#1
01/27/2005 (11:49 am)
If you compile for release the size should reduce to about 7mb or so.

By the way, why use a 3d engine if you don't need 3d objects. If you only need 2D sprites try Java 2D or SDL. It will give you the cross platform needs.
#2
01/27/2005 (11:58 am)
Thanks Joe, I'll try that. The short story on the 3D engine thing is that I'll be using the upcoming Torque 2D. The longer story is that TGE has GUI controls that draw to OpenGL (or DirectX I think) and the network layer.
#3
01/27/2005 (12:01 pm)
Quote:If you only need 2D sprites try Java 2D or SDL.
While I absolutely agree to this - I think there is a Torque2D in the works.

[EDIT]I just take too long to type :-).
#4
01/27/2005 (2:40 pm)
If you're just making a 2D poker game torque is definitely not the way to go. It's going to be using a ton of CPU resources that it doesn't need to be for a non-action-based game.
#5
01/27/2005 (3:15 pm)
Poker can be 3D, take a look at http://www.pokerroom.com/. I want OpenGL, GUI controls that draw on OpenGL and a solid network library to build a scalable server. Torque gives me all this. I can start in 2D and move into 3D later on.
#6
01/27/2005 (4:28 pm)
I've gotten Torque down to under 1MB executable size if you rip out interiors, terrain, threespace etc. At that point you have only GUI and Scripting...which is perfect for T2D :P
#7
01/27/2005 (5:03 pm)
Pat, is it enough to just delete the directories from, say, the Mac OSX project or is the process more involved? Any hints on how I can repeat your achievement? What you did is what I need exactly!
#8
01/27/2005 (5:19 pm)
Just rip it out, man. :)

There's nothing really magic, just delete files with functionality you don't need, and fix up the broken includes and references. A day or two of hacking at worst. For a good start try blasting interior and ts. Note that a lot of stuff in game wants that, so you'll end up removing a lot of things from in there, too.

Worst case you'll have to start over or put some stuff back in. :)

This is probably something we'll eventually want to write some docs about, but it's not as high a priority as, say, having terrain done for GDC. ;)
#9
01/27/2005 (5:26 pm)
Terrain Done, by GDC, just another reason why I am siked to go this year
#10
01/28/2005 (7:08 am)
I tried ripping out the unneeded parts and failed miserably. I tried to delete things that did not make sense in 2D like fog, water, terrain, vehicles, rain, etc.. This pulled with it "basic shapes", world editor, etc.

I think it might be a better idea for me to wait for Torque 2D. If I rip out everything that I set to rip out than that's what I'll end up with anyway. At least it seems to. I'm still waiting for someone to tell me if T2D will be a standalone engine or if it will require TGE.

Apart from this I thought I'll change the problem and think of what I'm building as a future 3D poker that just has to be 2D in its first release. So by using TGE (2D? 3D?) right now I'll be laying the foundation of the future virtual casino, with interiors, rooms and the works :-).
#11
01/28/2005 (7:23 am)
Torque 2D will be amazing ! Enough said... :) lol should throw some of melv's fancy particle effects in your poker game when it releases