Starter.Racing - TGE Demo port.

Scripts and code that enhance the gameplay functionality of the engine.
5 posts Page 1 of 1
Posts: 35
Joined: Sun Sep 04, 2016 11:54 pm
by kent » Sat Oct 01, 2016 9:49 pm

This is a slightly enhanced port of the original TGE 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.

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.

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.
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.
Last edited by kent on Sat Oct 01, 2016 10:02 pm, edited 2 times in total.
Posts: 35
Joined: Sun Sep 04, 2016 11:54 pm
by kent » Sat Oct 01, 2016 9:57 pm
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.
Steering Committee
Steering Committee
Posts: 642
Joined: Tue Feb 03, 2015 9:49 pm
by JeffR » Sun Oct 02, 2016 10:04 am
Very cool man! Looking forward to this :)
Posts: 390
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sun Oct 02, 2016 2:32 pm
:o Thank you kent ;)
Jason Campbell
Posts: 138
Joined: Fri Feb 13, 2015 2:51 am
by Jason Campbell » Wed Dec 14, 2016 3:04 am
That's great! Thank you!
5 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest