Meet the Torque2D Packaging Utility.
by Justin DuJardin · 01/18/2006 (6:47 am) · 10 comments
Hey all, it's been a while since I've been able to post a blog and I like to blame it on the fact that I've been away from the tools/tech side for a while.
But that's neither here nor there really since recently I've moved back on to T2D tech and with the release of Alpha3 imminent I figured it was time to post a bit about a new goody that will be showing it's face for the first time in the Alpha3 release.
The Packaging Utility
**Important Preface**
Because the building of anything worth it's weight takes several iterations to be all that it can be, and because we know that left to our own perfectionist devices we would be delayed on releasing anything for quite some time; we bit the bullet to make sure that this new Alpha included the ever so elusive packaging utility.
That said, we would ask that you keep in mind that it is not perfect... yet, but it works, oh yes, it works!
**End Important Preface**
The task of removing items for getting a build out that you can send to testers has historically been kind of a pain in the rump thanks to the no script EULA that is needed for T2D. However that is a thing of the past with the new Torque2d packaging utility.
For those of you not familiar with the Torque2d EULA, it states that you cannot redistribute uncompiled versions of script files in your game, so you would normally have to create some sort of batch script or manually copy over only the dso's and other game assets to a different directory, plus exclude all the tools mods from that directory. Can you see how this would be a bit of a pain!?
Just when you think you can't take it anymore, in steps the Packaging Utility to save your time and sanity for more important things like... games! the packaging utility takes your game and exports the files necessary to run into a seperate directory that you can then zip up and redistribute, without all the headache normally involved in the process.
The Interface
The main packaging interface is failry basic, consisting of a few simple buttons and a selection list or two.

On this screen you'll notice on the top left is a list of games to package. This list is generated from the mod paths specified so you won't see directories that you may have a game in unless you're running that game!
Here's the scenario, we're going to package up the fishdemo application so we can show off our cool underwater world to our friends that we've created in T2D harnessing its great power to aid in the achievement of our evil plans for world domination through the use of non-interactive 2d games!
...ahem... never mind that, i mean, yeah...
So to get started we need to click the fishdemo as our "Game To Package" and then select it as our "Main Game Mod" in the drop down list. It should be noted that with this option you can include many mini game mod directories in one packaging run, perhaps with a main mod that gives you a menu of games to choose from?!
You'll also notice that there is not listed the packaging utility mod or any of the other editors, those are automatically excluded by the utility, everything is all right, there's no need to panic!
So we've got that selected and now we need to specify an output directory for the package. I picked fishDemoPackage because as everyone around the office knows, and I'm sure a few of you have caught on to, I'm THAT creative!
So now we're set to go, what to do next?! Well, this part makes the other configuration stuff look like a day of back breaking labor at the salt mines. So go ahead and get your pads and pens ready for a notes session, you've got to... click, yeah click, the "Analyze Game" button. After all that hard work sit back and take a sip of your latte and relax.
When you do you'll notice that the game appears to stall up a bit (You really shouldn't package games in debug mode it's kinda slow) but you'll see text like the below start flashing across the progress bar while it analyzes your game.
So maybe you're wondering contemplatively to yourself at this point, Is this thing looking INSIDE my script files to find references to textures and stuff? You're darned tootin' it is and While it's not by any means infallable, it has done a pretty good job of weeding out unnecessary art and sound effects in testing!
So while you sit back and sip your latte revelling in the fact that you're about to, no doubt, FINALLY get this packaged up for your, once again no doubt, oh so eager testers, you can watch T2D do the grunt work for you!
Once it's all done up it will present you with some feedback.

This is the fun part, now you've got a list of files that the packaging utility has determined to be necessary for your package. At this point you can look over what it has included in the build (the ones that are checked up top) and what has been pruned (due to 0 references to it), what is unknown (the packaging utility didn't know what to do) and what has been ignored (it got weeded out by file extension or some other means.)
Read over this list carefully because the utility may have missed something, for example if you had textures for random effects when a... fish farted, or something equally as ridiculous, named something like fart1.png fart2.png fart3.png and you were doing something like this
After you've double checked your build items, click the "Build Selected" button and you're done. You'll notice a new dialog shows up.

This dialog will show you the status of your package and when it's done will open up your internet browser to view the automtically generated build log.
At this point you can close down T2D and broswe on over to your new package directory, (in this case recall it was fishDemoPackage.)

And with that, you're all done and ready to go, just zip up the new package directory, get it to your testers and wait for the emails, praising your innovative genius, to start flyin' in!
The End?
Well, after a whole bunch of hoopla we've finally built our package and our game is a hit, having made us millions of dollars in the gaming space on our beloved interweb, so what's left?
The blame shifting : If anything goes wrong I would like to state that the official designated blame master for mishaps is one Pat Wilson, who ever so generously wrote all the back breaking script analysis and build list code that makes this goody go. Yeah really, it's all his fault!
I think that's about 3 longer than I intended this to be, from brief to concise to overly verbose in 3.2 seconds, wouldn't that just figure?
See you all in alpha3 and keep those awesome demos and games coming, it gives me good reason to play games instead of work :)
-Justin
Edit
Ok so I can't go without mentioning this little beauty too, for those users needing some more customization in their packages.

Here we have the options page, accessed via the options button on the main screen. With this little bugger you list file extensions and directory names to be excluded from the build and analyzation process!
These are very exciting times they are, and it will only get better from here on out as far as packaging goes, Mac and Linux functionality are coming as soon as possible!
But that's neither here nor there really since recently I've moved back on to T2D tech and with the release of Alpha3 imminent I figured it was time to post a bit about a new goody that will be showing it's face for the first time in the Alpha3 release.
The Packaging Utility
**Important Preface**
Because the building of anything worth it's weight takes several iterations to be all that it can be, and because we know that left to our own perfectionist devices we would be delayed on releasing anything for quite some time; we bit the bullet to make sure that this new Alpha included the ever so elusive packaging utility.
That said, we would ask that you keep in mind that it is not perfect... yet, but it works, oh yes, it works!
**End Important Preface**
The task of removing items for getting a build out that you can send to testers has historically been kind of a pain in the rump thanks to the no script EULA that is needed for T2D. However that is a thing of the past with the new Torque2d packaging utility.
For those of you not familiar with the Torque2d EULA, it states that you cannot redistribute uncompiled versions of script files in your game, so you would normally have to create some sort of batch script or manually copy over only the dso's and other game assets to a different directory, plus exclude all the tools mods from that directory. Can you see how this would be a bit of a pain!?
Just when you think you can't take it anymore, in steps the Packaging Utility to save your time and sanity for more important things like... games! the packaging utility takes your game and exports the files necessary to run into a seperate directory that you can then zip up and redistribute, without all the headache normally involved in the process.
The Interface
The main packaging interface is failry basic, consisting of a few simple buttons and a selection list or two.

On this screen you'll notice on the top left is a list of games to package. This list is generated from the mod paths specified so you won't see directories that you may have a game in unless you're running that game!
Here's the scenario, we're going to package up the fishdemo application so we can show off our cool underwater world to our friends that we've created in T2D harnessing its great power to aid in the achievement of our evil plans for world domination through the use of non-interactive 2d games!
...ahem... never mind that, i mean, yeah...
So to get started we need to click the fishdemo as our "Game To Package" and then select it as our "Main Game Mod" in the drop down list. It should be noted that with this option you can include many mini game mod directories in one packaging run, perhaps with a main mod that gives you a menu of games to choose from?!
You'll also notice that there is not listed the packaging utility mod or any of the other editors, those are automatically excluded by the utility, everything is all right, there's no need to panic!
So we've got that selected and now we need to specify an output directory for the package. I picked fishDemoPackage because as everyone around the office knows, and I'm sure a few of you have caught on to, I'm THAT creative!
So now we're set to go, what to do next?! Well, this part makes the other configuration stuff look like a day of back breaking labor at the salt mines. So go ahead and get your pads and pens ready for a notes session, you've got to... click, yeah click, the "Analyze Game" button. After all that hard work sit back and take a sip of your latte and relax.
When you do you'll notice that the game appears to stall up a bit (You really shouldn't package games in debug mode it's kinda slow) but you'll see text like the below start flashing across the progress bar while it analyzes your game.
So maybe you're wondering contemplatively to yourself at this point, Is this thing looking INSIDE my script files to find references to textures and stuff? You're darned tootin' it is and While it's not by any means infallable, it has done a pretty good job of weeding out unnecessary art and sound effects in testing!
So while you sit back and sip your latte revelling in the fact that you're about to, no doubt, FINALLY get this packaged up for your, once again no doubt, oh so eager testers, you can watch T2D do the grunt work for you!
Once it's all done up it will present you with some feedback.

This is the fun part, now you've got a list of files that the packaging utility has determined to be necessary for your package. At this point you can look over what it has included in the build (the ones that are checked up top) and what has been pruned (due to 0 references to it), what is unknown (the packaging utility didn't know what to do) and what has been ignored (it got weeded out by file extension or some other means.)
Read over this list carefully because the utility may have missed something, for example if you had textures for random effects when a... fish farted, or something equally as ridiculous, named something like fart1.png fart2.png fart3.png and you were doing something like this
%imagePath = "fart" @ getRandom(3) @ ".png";as the utility doesn't know how to deal with these cases. So once again, it's important to double check :)
After you've double checked your build items, click the "Build Selected" button and you're done. You'll notice a new dialog shows up.

This dialog will show you the status of your package and when it's done will open up your internet browser to view the automtically generated build log.
At this point you can close down T2D and broswe on over to your new package directory, (in this case recall it was fishDemoPackage.)

And with that, you're all done and ready to go, just zip up the new package directory, get it to your testers and wait for the emails, praising your innovative genius, to start flyin' in!
The End?
Well, after a whole bunch of hoopla we've finally built our package and our game is a hit, having made us millions of dollars in the gaming space on our beloved interweb, so what's left?
The blame shifting : If anything goes wrong I would like to state that the official designated blame master for mishaps is one Pat Wilson, who ever so generously wrote all the back breaking script analysis and build list code that makes this goody go. Yeah really, it's all his fault!
I think that's about 3 longer than I intended this to be, from brief to concise to overly verbose in 3.2 seconds, wouldn't that just figure?
See you all in alpha3 and keep those awesome demos and games coming, it gives me good reason to play games instead of work :)
-Justin
Edit
Ok so I can't go without mentioning this little beauty too, for those users needing some more customization in their packages.

Here we have the options page, accessed via the options button on the main screen. With this little bugger you list file extensions and directory names to be excluded from the build and analyzation process!
These are very exciting times they are, and it will only get better from here on out as far as packaging goes, Mac and Linux functionality are coming as soon as possible!
#2
01/18/2006 (8:18 am)
Looks handy, thx.
#3
01/18/2006 (11:59 am)
The packaging utility rocks!
#4
01/18/2006 (2:27 pm)
nice work justin!
#5
01/18/2006 (2:55 pm)
Awesome! I was wondering when this would be coming about. For me though, that last mention about the linux functionality coming soon is what I'm going to be waiting for... especially where the .dso's are usually in another directory. :-)
#6
01/19/2006 (5:54 pm)
good work justin. I can't wait to try this ! :)
#8
What about an option, that puts all files with a certain extension (.dso would be a good bet) into a zip file automagically?
01/19/2006 (10:21 pm)
Looks cool.What about an option, that puts all files with a certain extension (.dso would be a good bet) into a zip file automagically?
#9
02/15/2006 (12:39 am)
Congrats on the new T2D man!
#10
02/24/2006 (10:14 pm)
Late to this party... but got a question. Will this utility make it over to TGE and TSE at some point?
Torque Owner Philip Mansfield
Can't wait to get Alpha 3 and try it out!