Skip Navigation LinksAzure Developers Guide > Azure Scenario Applications > Red Dog Racing – Game Services in Azure

Training Courses

All course material is in English, and courses are delivered in English. Feel free to contact me for further information.

Red Dog Racing – Game Services in Azure

Red Dog Racing is a sample application that demonstrates how Azure services can be used in an on-line gaming scenario. The aim of the project is to take an existing sample game, and adapt the game to use the core Azure services to implement high-score tables, game telemetry and game state storage.

Red Dog Racing started out as a simple proof of concept application to show how Azure Table Storage could be used to store lap time data and provide a simple high score table. The scenario has been extended over time to implement driver and game telemetry services, and storage of replay data to display ghost cars for other players.

The current implementation uses the following Azure services:

Azure Table Storage

Table Storage is used to store the lap time data for players. Each time a lap is completed, the data for that lap will be stored as an entity in one or more Table Storage tables. These tables will be used to provide high-score details for the game, and also the best lap times for the various tracks in the game.

Table Storage is also used to store telemetry data for the laps that are driven in the game. As with real motor sports, such as Formula 1, the use of telemetry is valuable in understanding what makes one driver faster than another and can be helpful in improving lap times. Red Dog Racing uses a telemetry system that borrows from the professional telemetry systems used by race teams.


Azure Blob Storage

Blob storage is used to store the replay data that is generated by the game as players drive around the track. The replay data contains the car position and direction, sampled many times a second as the player drives a lap. Once the lap is completed, the replay data is uploaded to blob storage as a binary file. The game can then use the replay data for the best laps to display ghost cars in the game for other players to race against. This adds a great competitive nature to the game.

Blob storage is also used to store the Click-Once deployment files which will allow the game to be installed and played by players over the internet.


Azure Web Sites

An Azure Website for the game displays the overall standings for the players, and also the best tiles set on the various tracks in the game. This allows players at different locations to see their times, and how they are competing with the other players. The website also hosts a number of Web API services that are used by the game and by the website to retrieve lap time and telemetry date.


Azure Worker Roles

Worker roles are used to process the telemetry and timing data and insert the data into Table Storage. Using worker roles allows the application to handle a large volume of telemetry data, and provides a scalability when the load exceeds the current number of running instances.



Azure Service Bus – Brokered Messaging

Topics and Subscriptions in Service Bus Brokered Messaging are used to transmit the lap time data from the game to the worker roles that process this data and insert it in the high-score tables. As this data is scoring data rather than telemetry date, and the lap time data is sessionful, with all the timing data for a single lap in one session, it makes sense to use Brokered Messaging.

Topics and subscriptions are also used to send push notification messages to drivers when a new lap time is set, and when a driver wins an achievement.


Azure Service Bus – Event Hubs

Telemetry data is often used by racing teams to analyze the performance of their cars and drivers. Red Dog Racing uses Event Hubs in the Azure service bus to transmit telemetry data to the beck-end services hosted in Microsoft Azure. Event hubs are designed to handle extremely high throughputs, sometimes hundreds of thousands or millions of messages per second. Red Dog Racing will never generate anywhere near that volume of telemetry data, however as Event Hubs are scalable the costs associated with using them in a low volume scenario will be minimal.


Azure Stream Analytics

Azure Stream Analytics are used to process the telemetry data streams and issue achievements, in the form of speeding tickets, for drivers who reach a specified average speed over a specified duration. Using Stream Analytics in this way could be considered overkill in a driving game, but it is a fun way to demonstrate the use of the technology in a telemetry analysis scenario.

Like Event Hubs, Stream Analytics can scale to millions of messages per second, and will be used at a small fraction of this sample in the gaming scenario.



Speaking Engagements