Creating a simple RTS prototype

Using the knowledge we've gained about Player.IO and applying the concepts from the previous chapter, we're going to create a simple RTS style game.

The player will own five bots. Each of these bots can be commanded to move, or attack another bot. The number of bots killed and lost will be recorded (and persisted to the database for a leaderboard).

Upon losing all five bots the player is kicked out of the game to the main menu.

The server-side code

We'll start by modifying the server code as follows:

using System; using System.Collections.Generic; using System.Text; using System.Collections; using PlayerIO.GameLibrary; using System.Drawing; namespace BotWarsGame { public class Player : BasePlayer { public string Name; ...

Get Unity Multiplayer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.