Tuesday 26 November 2013

TORCS Adaptive Real-Time Tracks

Since my last post I've managed to get a prototype of the track generation system up and running. It currently generates and loads an entirely new model file for each segment that is added to the track, running through TORCS' existing track generation functions. These functions have all been exported to a static library, and the client has access to these functions to enable what you see in the video below.


As can be seen, this is not the most efficient method for track generation at run-time within TORCS. It does however prove that it is possible without drastic changes to the existing framework. Possible optimizations would be to only generate a single track segment's AC3D file, and somehow merge this with the existing file. However, it is not yet clear where the computationally expensive part of this process is. It may be that removing and re-attaching the node containing the track from the scene graph is expensive, or it may be the track generation itself. This needs to be further explored before deciding on how it could be optimized.

Monday 18 November 2013

ScareJam!

Artist: Brooke Hayes (Blog, Twitter)

Back in October, I competed alongside an artist in the ScareJam at the University of Lincoln. This was an interesting experience as it's the first time I've done any rapid development, particularly focussed on programming, alone. I decided to use XNA and C#, as I have a lot of experience with this framework and can develop quite rapidly within it. The ScareJam was focussed on creating scary games, and the additional game mechanics were "Loss" and "Important Sounds". We came up with "Lost and Sound", a title with a subtle nod towards the game mechanics! Lost and Sound is a game in which you must go into an abandoned hospital in search of your lost daughter, as she's been kidnapped by the ghost that haunts it! Most of the game mechanics are intended for the player to discover alone, and the game is intended to be somewhat of a mystery. I will let you explore the rest for yourself! To play the game you'll need a wired Xbox 360 gamepad, and the XNA 4.0 redistributables which can be found here.

Download Lost&Sound.

TORCS Adaptive

For my final year project at the University of Lincoln, I am currently modifying TORCS (The Open Source Racing Car Simulator) to generate tracks at runtime. It is then intended that these tracks will adapt to the skill of the player, depending on several performance measures. The project is currently in it's very early stages, but some simple run-time track generation has been implemented alongside some telemetric functionality, though these values are not yet used in any kind of performance measure. The following videos show some of the current features.


This video shows telemetry printing data to the console at runtime about the current car. The car here is one of the 'robots' that come with TORCS, which are compiled AI drivers written in C++.


This video shows a single track segment that has been generated completely at runtime. TORCS stores all of it's 3D models, including tracks, in AC3D files. Here, a segment has been generated at runtime and an AC3D file generated for it all during the runtime of the application. The next step is to find a way to update the existing AC3D file with new segment data each time a new segment is added.

The project's Github page can be found here, and more information can be found on it's wiki.