StarterGame Overview

The following topics are covered in this overview:

Introduction

StarterGame is a minimal Torque X game example.

Playing StarterGame

This Starter Kit simply creates one object that can be moved around the scene.


Input Controls

The game object can be controlled with the gamepad's left analog stick, or the keyboard's W, A, S and D keys.

 

Code Overview

SplitScreen is broken into three general sections. The sections are as follows:

 

Game Setup / Game Logic

Within the Game class, a .txscene file that was created with the TGBX tool is loaded. This file contains both the material and object definitions for the game.

 

The file "componentSpecs.ed.cs" is used by TGBX and describes custom components that may then be used within TGBX.

Scene Data / Template Definitions

The file levelData.txscene contains a simple material definition, as well as one T2DStaticSprite object with a mounted component.

Components

In the StarterGame starter kit, a single component (MovementComponent) is added to the scene object.

Components

The following section describes each component in StarterGame, including its purpose and usage.

MovementComponent

MovementComponent processes user input, then updates its containing objects Physics velocity.