Sep 6, 2010

Building Starcraft 2 Maps

This time the subject matter is of a, to me, rather different nature. I recently started to dabble in the art of making competetive Starcraft 2 maps and wanted to share some of my failures with you.
My first map was of a horribly wrong scale and contained an unbalanced amount of resources.


Here are the rules for resources:
  • The fixed amount of starting resources are 8 minerals and 2 vespene geysers.
  • A normal expansion contains 6-8 minerals and 2 vespene geysers.
  • A golden expansion contains 6 rich minerals and 2 vespene geysers.
  • Rich vespene is never used
Map sizes (effective):

1v1 : ~120x120
2v2 : ~150x150
3v3 : ~170x170
4v4 : ~190x190

Map expansion count:

1v1 : 3~4 / player
2v2 : 2~3 / player
3v3 : 2~3 / player
4v4 : 2 / player

The grid system uses 8 units for a big grid square (G) and 4 for a small (g).

Building rules:
  • Start locations should be contained on a at least 14 G² (/ player) big plateu.
  • Expansions should have ~6 G² empty space around it.
  • A number of Xel'Naga towers (1-4) can be placed around central positions.
  • LOS (Line Of Sight) blockers should be placed around key locations (e.g. so that micro unit controls can be used more effectively.
  • A fun level has one/several central point(s) to battle over.

Sep 1, 2010

Cross version compiling in AS3

Ever wanted to make a flash application behave differently depending on the plugin version of the user? That type of behaviour requires some planning beforehand and is totally doable.


Method availability could be done like this.

package
{
 public class PluginCapable
 {
  public static function methodAvailable(object:*, methodName:String):Boolean
  {
   try { object[methodName]; return true; }
   catch (error:Error) { }
   
   return false;
  }
 }
}

Say you wanted to check if the user could save locally...

var file:FileReference = new FileReference();
if (PluginCapable.methodAvailable(file, "save")) file["save"](data, "file.txt");
or simply hide the save button or something.