Click to close

Swarm RTS v0.3.2

What is it about?

Swarm RTS is a simplistic real-time strategy game. The goal is to capture flags and crush the opponent into the ground.

Basics

Two factions, Blue and Red, are competing in the game. The playing field consists of 4 to 8 flags which can be captured by either faction. A captured flag spawns new units for the faction by which it has been captured.

The game ends when all units of the opponent have been destroyed.

You can either play against one CPU AI opponent or watch two CPU AIs battle it out.

Flags

Both factions start with one captured flag, the headquarter, on opposite ends of the field. All other flags are neutral and are waiting to be captured. A flag is captured when units are in close proximity to the flag.

Fully captured flags (100%) spawn new units periodically until they have been neutralized (0%). They start spawing units as soon they have been fully captured again. If the capture/influence circle around the flag has the colour of the faction, it produces units.

The headquarter is like a regular flag except that it spawns twice as many units and is a little harder to capture. At the beginning of a game, the headquarters spawn a certain amount of starting units.

Units that are near a fully captured flags of their own faction take 25% less damage.

Units

There are two different units: Fighters and Destroyers.

Fighters are displayed as small rectangles, Destroyers as slightly bigger triangles. Both can move and shoot in any direction. Destroyers are stronger and have heavier attack weapons than Fighters but move slower and evade less attacks. Both unit types capture flags with the same speed. A small fraction of spawned units are Destoyers. The player cannot influence which a kind of unit a flag spawns next.

Controls

The left mouse button is used to select, the right mouse button issues commands.

As in many other RTS games, a selection rectangle can be made by pressing the left mouse button and dragging the mouse over the playing field. A right click will order all units inside the rectangle to move to the location of the mouse pointer. The selection can be removed by a left-click.

The game also features a waypoint system: Press the left mouse button and do not move the mouse. A circle appears which will grow until the button is released. The waypoint destination can be set by a right-click. A move command will be given permanently to all idle (non-moving, non-attacking, non-capturing) units within the circle. Waypoints can also be cancelled: Remove any selection (left-click) and right-click inside waypoint circle.

The game can be paused any time by clicking the button in the bottom right corner or by pressing the 'P' key on the keyboard. During a pause, waypoints can be created and removed and multiple rectangle selection commands can be issued.

Credits

The game is purely written in JavaScript and is using the HTML5 Canvas element for its graphics. No third-party libraries are used. The game was tested in Chrome 39, Firefox 34, and Internet Explorer 11. Much older browser versions will definitely not work.

Copyright 2014, Martin Huber, mjh.at

Planned features

  • Gameplay balancing
  • Make AI more intelligent
  • Graphical enhancements
  • More unit types?
  • Changelog

    v0.3.2 - 2014-12-28

  • Attack visualization has a little bit more variance in it.
  • Slightly changed AI behaviour.
  • v0.3.1 - 2014-12-28

  • Fixed a bug in the flag capture calculation logic.
  • Made it possible to issue multiple rectangle selection commands while game is paused.
  • Starting units are shown inside the capture area of the HQ before the game begins.
  • v0.3.0 - 2014-12-28

  • Made all game state updates independent from the frame rate. Instead of making all game decisions based on the "tick", the actual passed time between two game state updates is taken. By using requestAnimationFrame instead if setInterval, a huge performance boost is achieved.
  • This change also led to minor unit and flag balancing changes.
  • Graphical enhancements: up to 60 FPS and parallax scrolling for the stars in the background ;)
  • v0.2.4 - 2014-12-27

  • Performance enhancements.
  • v0.2.3 - 2014-12-27

  • Changed destination allocation algorithm.
  • Changed pause key to space bar (instead of 'P').
  • v0.2.2 - 2014-12-26

  • Unit movement does no longer give a penalty to the attack damage, but...
  • Units near fully captured flags of the own faction block 25% of damage. That should make comebacks easier.
  • AI decision making enhanced: no more blind attacking when game is balanced; even in defensive mode, the AI tries to take opportunies.
  • Invalid player control options are no longer offered in the pause menu.
  • Pause/unpause possible by pressing the 'P' key.
  • Graphical enhancements: Flag capture/influence radius is shown; flags now look like actual flags ;)
  • v0.2.1 - 2014-12-26

  • First release.