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; } // This attribute is used to identify the room type // When starting a room, you can specify room type - it corresponds to this value. // Note that the Game class is the base class for room code – it takes a Type which is the type...