Register | Sign in

Home > Touch Control System (TCS) > Touch Control System(TCS): Get Started


Touch Control System(TCS): Get Started




Installing Touch Control System (TCS)

Windows Download

The installer package contains everything needed to develop new content for TCS using the included Module Editor. Setup will require an internet connection to download additional components. Future installer packages will allow for offline and client only installations.

By default, TCS installs to C:\TCS. Within the top-level TCS folder, there are four additional folders labeled Content, Examples, Installers, and Mods.

C:\TCS\Content This is where all of the game content is extracted to when TCS starts.
C:\TCS\Examples This folder contains examples and helper scripts.
C:\TCS\Installers All of the setup packages for 3rd party components remain here.
C:\TCS\Mods Any mods (.TCM files) placed in this folder will be activated on startup.




Running the program

During installation, three shortcuts are created for you in the Start Menu under Hyperplane Interactive for starting TCS, the Console, and the Module Editor.

The shortcut for starting TCS uses two optional command line arguments, config, and console:
C:\TCS\TCS.exe config console

The config argument starts TCS in Config Mode and the console argument starts the Console alongside TCS. A Console instance will close automatically with TCS if started using the command line argument. The TCS shortcut also has the “Run as administrator” option checked. Creating an HTTP endpoint for the Console requires administrator permissions.

Config mode gives you options for selecting the startup Screen and setting custom resolutions.

All alpha releases come with two or more sample Screens.




Using the Console

The Console allows you to connect to TCS while it is running so that you can send commands and view debugging information from anywhere. The Console points to localhost by default. You can specify a different DNS name or IP address using a command line argument:

C:\TCS\TCSConsole.exe 192.168.1.100

Inside the Console, there are several keys that have functions assigned to them:

ESC Stops the console program
[S]ystem Reserved
[C]lear TCS History Tells TCS to clear the Console History
[F]lush Console Clears the cached Console History from the Console
[E]xit TCS Tells TCS to exit
[V]iew Mode Switches between Pages and Scroll Modes
[PgUp] Go up a page
[PgDn] Go down a page
[Home] Go to the first page
[End] Go to the last page




Using the Module Editor

The Module Editor allows you to easily package distributable Module files (.TCM) for Touch Control System. Once a Module is built, all you have to do is place it in the Mods folder and TCS will activate it on startup.

Projects for TCS Modules are stored in Module Project files (.tcmProj) which contain references to the physical paths of all of your content. No embedding occurs in these files. So, when you change a source file, all you need to do is build the module. You won't need to re-import data into the Module Editor.

During the build process, the Module Editor converts 3D geometry and other data into processing friendly formats that can be read by TCS. Some content gets compiled, while other content, like Scripts, are added to a Module untouched. The Module Editor gives you options to update Scripts in a Module without having to build all of the compiled content.




Building the sample project



The Examples folder contains a sample Module Project labeled test_screen.tcmProj. The accompanying test_screen folder contains the 3D models and scripts that make up the Module.

Follow the directions below to build the Module.

  • Start the Module Editor using the Start Menu shortcut:
    Hyperplane Interactive > Module Editor
  • Go to File > Open Mod Project and open
    C:\TCS\Examples\Module Projects\test_screen.tcmProj
  • To run a complete build, go to Tools > Build Module.
    To repackage Scripts into the Module without processing 3D models and everything else, go to Tools > Update Scripts.


Once the Module Editor is finished building, it will attempt to open the file. Compiled TCS Modules are compressed archives that can be opened using most compression software. We recommend associating the .TCM file extension with WinRAR or something similar so that you can easily verify the successful processing of your content upon build completion.




Adding Content

You can add additional content to a Module by going to Tools > Add Content Object or by selecting the Content item in the left hand TreeView, clicking on the link labeled “Click here to add a new Content Object”, and selecting the appropriate Content Object type.

You can add 3D Models, Images, Sounds, Screens, Graphics Shaders, and any type of non-compiled file(s) using the Script object.




Lua Scripts

Lua is a fast and easy-to-learn scripting language that TCS uses for just about everything. Lua scripts run at startup, when you press a button, after events occur, on timers, and continually in repetition during program execution. More information about Lua can be found here: http://www.lua.org/start.html

You can add Lua Scripts and any other type of non-compiled file to a Module by using these directions:

Go to Tools > Add Content Object, select Script, and click Ok.

A new Script object will be added to the left-hand TreeView. Select the new Script object and go to the Build Settings tab.

On the first line, Lua File, enter the path to one or more Lua scripts or other files.




3D Models

The Basic Models tutorial that will guide you through the process of creating a basic 3D model in 3ds Max. Certain steps are needed to ensure that models are processed correctly in the Module Editor.

Once you have a properly formatted 3D Model, you can add it to the Module Editor by following these directions:

  • Go to Tools > Add Content Object, select 3D Model, and click Ok.
  • A new Model object will be added to the left-hand TreeView. Select the new Model object and go to the Build Settings tab.
  • On the first line, Input File, enter the path to a 3D Model (.FBX file).
  • On the second line, Model Shader File, you can optionally specify the path to a HLSL Graphics Shader (.FX file).

The Examples folder contains two sample Graphics Shader files:

NormalMapping.fx

This is a very basic 3D Graphics Shader. This file (or a very similar one) is used if you don’t specify one in the Module Editor.

c500.fx

This Graphics Shader has some additional customizations for shifting UVW coordinates, changing colors, and depth of field.


If you open either of the example Shaders, you’ll see a couple comment lines near the top with variables in between them:

// tcs start

float Glow_Amount = 0;

// tcs end


Float variables declared between the comment lines can be set in Lua by using a Model’s CustomProperties table.

A Lua example using the above Glow_Amount variable would look like this:

model.CustomProperties[“Glow_Amount”] = 0.6


The other Build Settings in the Module Editor for a 3D Model allow for overriding Model Textures and Channel Names, and including additional sets of geometry and Keyframe animations.




Screens

TCS gives you a separate 3D universe for every Screen you make. These Screen universes contain Controls that are made using 2D and 3D content. Controls and their visual representations can be manipulated through a variety of means and can be used as a control surface for virtually anything.

A 3D file containing dummy objects is used to set up and position Controls. This is referred to as a Master Screen Model. It can use Keyframe animations just like normal 3D models and needs to be processed in the same way, except that it doesn’t need a Model Shader since the dummy objects are only used for position data and are never drawn.

In the example Module Project, there is a screen model object and a test_screen object.

The screen model object is the Master Screen File that contains the dummy objects. You can import the referenced tcs_screen.fbx into 3ds Max and create new Controls by adding new Meshes that have names starting with “control”.

The test_screen Content Object only has four lines under the Build Settings tab. The first line, Screen Model Name, needs to be the filename of the Master Screen Model, without the .FBX file extension. The other three lines are used to specify Start, Update, and End Lua scripts, again without a file extension. Any Lua scripts referenced need to be added to the Module using a Script object. It is usually easier to keep all of the scripts for a Module in one folder so you can multi-select and add all of the files at once without using separate Script objects.

The name of the Screen object is important; it is what gets listed in Config Mode and must contain no spaces.

Once you have the name of a dummy object, you can load a 3D Model into it using Lua. The example Module Project has a Start script for test_screen. In there you’ll find a line that looks like this:

setup:SetControlModel("control_ramp","gauge-ramp")

Setup functions are only available in Start scripts are are used for pre-initialization settings. In the example Screen Master Model, there is a Mesh named control_ramp. The above line tells the Screen to load gauge-ramp.fbx into the control_ramp dummy object.

touch_down and touch_up Lua scripts are automatically assigned to Controls when included in a Module. If you were to create a text file named control_ramp_touch_down.lua, and include it in the example project, it would automatically run anytime control_ramp received a touch_down event with mouse or touch panel input.

When adding new content to a Screen, it is best to use names that are very specific to your Module. Modules are enabled when placed in the Mods folder and their contents are extracted to the Content folder when TCS starts. If you were to enable two Modules that both had a file in them named “control_button01_touch_down.lua”, you will only end up with one file: the one most recently extracted. The benefit of this is that you can easily put the same control in multiple Modules.




Adding a new Screen to a Module

  • Add a Screen Master Model to the Module Editor using a new Model Content Object, as outlined above in the 3D Model section. Multiple Screens can use the same Master Screen Model.
  • Go to Tools > Add Content Object, select Screen and click Ok.
  • A new Screen Content Object will be added to the left-hand TreeView. Select the new Screen object and go to the Object tab.
  • Specify a name for the screen. This name must contain no spaces.
  • Go to the Build Settings tab. In the “Screen Model Name:” field, enter the name of the previously added Screen Master Model, without the file extension.
  • On the second, third, and fourth lines, you can specify optional Start, Update, and End Scripts.


< TCS Home