SSK - A Brief Overview
From RGWiki
Contents |
SSK Synopsis
SSK (add-on) Tools
As of January, 2010, the Super Starter Kit (SSK) for TGB contains these tools (all accessible from the Roaming Gamer Menu in the top toolbar.):
- Behavior Generator - A tool for generating behavior code on-the-fly. As-is, this tool is currently capable of generating over 7000 fully-functional behaviors. Additionally, you can easily add your own behavior recipes to the tool to increase this number.
- Datablock Manager - A tool for renaming, duplicating, and deleting any datablocks currently stored in the managed datablock feature of TGB.
- Datablock Generator (to managed datablocks) - A tool for generating a datablock (from the currently selected object) directly into the managed datablock feature of TGB.
- Datablock Generator (to clipboard) - A tool for generating a datablock (from the currently selected object) directly into the clipboard.
- Builder Script Generator (to clipboard) - A tool for generating a builder script (from the currently selected object) directly into the clipboard. A builder script can exactly re-create an object and place it in the scenegraph at a specified position.
- Behavior Usage Analyzer - A basic tool to determine what behaviors are currently being used by all objects in the current scene. The results of this analysis are put into the clipboard in .csv format (for easy use with a spreadsheet application.)
- SSK Game Design Questionnaire - This tool is used to quickly prototype a game idea. Filled in questionnaires can be saved, loaded, generated to report, and generated to code. The generated code can later be pasted into an existing file in the supplied SSK starter game to quick config objects in the editor. This sounds complicated, but it takes a many hour long process and turns it into something that take about 15 minutes.
Other SSK Features
- Built-in GUIs, Counters, and Meters - A number of easy-to-use and easy-to-configure pre-made GUIS, counters, and meters are included in the kit to simplify the creation of a professional looking prototype demo.
- Roaming Gamer (RGQC) Quick Configuration System - Although it has a long name, this feature is design to do something quite simple. It makes is possible to create complicated interactions simply be describing them once and then assigning those attributes to objects by using names. No more figuring out complicated collision bit masks, no more writing code for damage, energy, etc. Simply use the aforementioned SSK Game Design Questionnaire (optional), fill in the quick config rules file, attach a single behavior to your objects, and select that objects type name. Note: You can update the rules file at any time and all previously edited objects will be automatically updated the next time a level is loaded or the game is run.
- Torque Script Tool Kit (TSTK) - TSTK is integral to SSK and adds all of its goodness to the mix.
- More... - There many small additions and changes that you may not even notice, including script changes to store last level loaded details, fixes/tweaks to the editors to make them behave more nicely, etc.
SSK (add-on) Tools
The Behavior Generator
The primary purpose of this add-on tool is to reduce the amount of coding that is required to write behaviors and to allow you to easily re-use behaviors when you need them.
Simple Behavior Categories
If you want to keep things very simple, you can break behaviors down into two basic categories:
- Event-Action - An event occurs and the behavior responds with a specific action.
- Other - The behavior does something useful and doesn't follow the 'Event-Action' pattern.
Behavior Atoms
Again, keeping things simple, you can break the code for these behaviors into three categories:
- Events - This part of the event-action behavior is the code necessary to detect either one (or more) of the behavior callbacks and/or a device input(s).
- Action - This part of the event-action behavior is the code necessary to response to the event and is typically a series of calls to the standard scene object methods.
- Full - This is all of the code needed to implement the 'other' behavior described. This is basically a behavior that would be nice to re-use and can't really be divided into smaller parts.
Together, the above three categories represent what I like to call Behavior Atoms.
(As of today, I have written and released 48 event atoms, 145 action atoms, and 77 full-behavior atoms. These atoms all come installed in SSK, and if you want to learn more about them, you can go the the Atom Packs page.)
Generating From Atoms
The behavior generator operates on these atoms, allowing you to combine one event and one action atom of your choice to produce a complete behavior, OR by selecting any full behavior (packaged as an atom) and generating it.
If you want to learn to use this tool, go here. If you want to learn about atoms and the atom creator, go to the Atom Packs page.
Datablock Manager & Datablock Generation Tools
In TGB, there is a feature called a datablock. Datablocks are small pieces of code that can be loaded once and then used to initialize settings for multiple game objects.
Normally, you write these datablocks yourself and then place them in your game scripts. Alternately, you can place them in the "~/game/managed/datablock.cs" file. By doing this, you create what is called a Managed Datablock. These managed datablocks are loaded automatically. However, TGB doesn't provide any mechanism for deleting, duplicating, or renaming them. It also doesn't provide a way to create them based on the attributes of some game object you have modified. SSK provides these missing features.
SSK allows you to select a game object in the editor and to directly generate a datablock definition which is immediately written to the datablock.cs file and made available for use in the editor. SSK also provides an add-on tool that allows you to rename, delete, and/or duplicate an existing datablock.
Datablock Generator (to the Clipboard)
In addition to generating datablocks directly into the managed datablock system, you can generate datablock code and have it pasted into the copy buffer, allowing you to paste the result into a text editor of your choice.
Builder Script Generator
In addition to adding the ability to generate datablocks from objects in a game scene, SSK provides the ability to select an object in the editor and generate a script for duplicating that object. I call these Builder Scripts. The generator can handle simple and complex objects. That is, if you generate a builder script for an object which has other objects mounted to it, the generator will detect this and parse down the mounting tree, generating a script to recreate the parent object, all of its children, and to correctly re-mount the children.
Behavior Usage Analyzer
A debug feature designed to scan the current scene under edit and to determine which behaviors are used as well as how often.
Once you've finished this analysis, simply paste the result into a text file and save it with the extension, .csv. Ex: "results.csv". Now, you can open the file in Excel or another spreadsheet app and view the results in an easy to read format.
Behavior Usage Analysis Text
untitled.t2d,1,GameAsteroidsmulti,01 - Game Movements (Key/Joy/Con; Multibind),Game: Asteroids (multi)
untitled.t2d,1,copyWorldLimitFromCamera,03 - Scene & Camera,Copy World Limit From Camera
untitled.t2d,1,WraponWorldLimit,03 - Scene & Camera,Wrap on World Limit
untitled.t2d,1,limitedSeekerRGQC,02 - Movement (Automatic),Limited Seeker (RGQC)
untitled.t2d,1,ModifiedCodeJar,00 - Rapid Prototyping / Coding,Modified Code Jar
untitled.t2d,1,onKeyUpReloadCurrentLevel,00 - Rapid Prototyping / Level Management,onKeyUp() -> reloadCurrentLevel
Behavior Usage Analysis in Open Office Calc
- Level name.
- Number of times behavior is used.
- Behavior name.
- Behavior friendly name.
- Behavior description.
Quick Configuration Questionnaire
This description is not yet written.
Other SSK Features
Built-in GUIs, Counters, and Meters
Additional pre-defined GUIs (Splash, Main Menu, and Play GUI), as well as optional Play GUI frames, counters, and meters.
Roaming Gamer (RGQC) Quick Configuration System
In short, this system takes a small amount of input and then automatically configures collision, damage, responses, etc for any objects designated as using the RGQC system. (Note: Although most of the code for this is in TSTK, it is best used with SSK.)









