Jump to content

Starter.Racing - TGE Demo port.


kent

Recommended Posts

Starter.Racing


This is a slightly enhanced port of the original TGE starter.racing demo. Based on the resource as packaged in TGE 1.52.


Primarily a script resource, this includes one engine source file to fix potentially game-crashing bugs in guiSpeedometer.cpp found in T3D versions 3.9 and lower. To use the resource in stock T3D without rebuilding, the GuiSpeedometerHud control should be removed from /art/gui/playGui.gui before trying to play the game.


A precompiled version with the GuiSpeedometerHud bug fixes can be found in the ./game subdirectory.


Gameplay

This is a simple multiplayer racer using typical Torque keyboard/mouse controls featuring a *very* basic demo level. The game begins and waits for network players to join. The race will start after a set wait period elapses or when a player triggers race start (depending on settings). Players drive through series of checkpoints (defined by trigger objects) to complete a determined number of laps. When a player enters the final trigger the race is complete. A simple scoreboard of race wins is displayed for a set time and then new round will begin. If multiple levels have been defined, the game will cycle through them when progressing through rounds.


If the game is not set to autoStart, racing rounds must be started with the ctrl-s keyboard command.


Usage

The game is controlled by a handful of global variables set in /sripts/server/game.cs as follows:

  • $Game::DefaultPlayerDataBlock - Datablock to define vehicles in race.

    $Game::laps - Number of laps per race

    $Game::autoStart - If true, the race starts automatically after $Game::WaitTime seconds. If false, each race is started with a keyboard command (ctrl+s)

    $Game::WaitTime - How long to wait for players to enter the game before starting a race (if autoStart=true).

    $Game::EndGamePause - How long to display the scoreboard after a race is complete.

Checkpoints are laid out using standard trigger objects defined with the following fields:

  • datablock - must be "CheckpointTrigger".

    checkpoint - Integer defining the order checkpoints should be entered.

    isLast - Boolean defining which checkpoint ends the race.

Installation

Files can be downloaded in a zip file. Source can be browsed on Gihub.


This resource is based on T3D 3.8 and project manager 2.2. To install, create a new project using the empty template. Copy all files into the project directory and regenerate the project.

Edited by kent
Link to comment
Share on other sites

Finally got this cleaned up enough to post as a resource. It has been nominally tested it in multi-player and everything basically seems to work aside from an issue with the scoreboard on the remote client.


Hopefully there will be an update with a decent demo level to play soonish. Currently the game defaults to racing the old-school tge buggy, but the level is honestly a bit more fun with the cheetah.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...