8

Total newbie question, but what language was used by blizzard to create the Starcraft II gameplay? I've been playing it for the last couple of days, and I'm constantly astonished by the complexity and the performance of the game. Is it an in-house language, or do they use some flavour of a known language?

yossi.ittach
  • 199
  • 1
  • 2
  • 6
  • 5
    From the FAQ (http://gamedev.stackexchange.com/faq#dontask): "You should only ask practical, answerable questions based on actual problems that you face." – Trevor Powell Dec 24 '11 at 23:16

3 Answers3

11

The Map Editor is where 'Galaxy' is coming from (Galaxy Editor). It's a data driven editor which allows you to put together actions from English statements which really opens up an insane amount of possibilities. For example, attaching Thor cannons to a hydralisk is easy cheesy.

  • Create a Hydralisk object and modify attributes on it to give it the abilities you desire
  • Trigger - 'Create 1 Hydralisk for player 1 using default facing'

Take a look at this video tutorial that show off the trigger editor. Here are some good tutorials to get you started.

The game itself was written in C/C++.

David McGraw
  • 4,071
  • 2
  • 31
  • 38
  • 1
    Just to note: the Galaxy editor requires no programming experience, and generates scripts for you. The scripts themselves are written in a custom C-based scripting language called Galaxy; I don't know of any examples of something that needs to be written in Galaxy (ie. which can't be done from the editor), but it is possible to write Galaxy scripts if you wanted. – BlueRaja - Danny Pflughoeft Sep 07 '10 at 19:21
8

I assume you meant scripting language? (since programming language-wise, I'd be very surprised if they didn't use C++...)

A quick Google-ing turned this up:

"StarCraft II uses an entirely new scripting language, which we’ve called Galaxy. This language is very similar to C, and anyone familiar with programming in C will have no trouble picking it up. "

Riley Adams
  • 1,064
  • 1
  • 7
  • 11
  • 8
    No offense to anyone, but is Galaxy a bad-bad-case of "The Not Invented Here Syndrome"? Just sayin'. :-) – JustBoo Aug 08 '10 at 15:17
  • @JustBoo - do you have a reference to something demonstrating that Galaxy is essentially identical to an existing language? If not, it might just be that Blizzard needed something that wasn't already on offer. – Kylotan Aug 08 '10 at 17:51
  • 2
    When the product is successful, it's not called NIH, it's called a "competitive advantage". –  Aug 08 '10 at 20:39
  • @Boo: They created this language because it's easy and designer friendly: Look at this tutorial, for instance: http://forums.sc2mapster.com/development/tutorials/5365-trigger-terrain-make-lava-water-raise-and-lower/ Timer - Destroy Lava Timer Window Sound - Play Alert_BaseUnderAttackKlaxon for (All players) (at 100.0% volume, skip the first 0.0 seconds) That's the language. Very English - too verbose for a coder, but works well in an editor I guess. – jacmoe Aug 08 '10 at 20:41
  • I would use Lisp to create a language like that - it's well suited to domain specific languages. – jacmoe Aug 08 '10 at 20:42
  • 1
    @jacmoe Galaxy does not look like your example. That is their Trigger UI which generates Galaxy on your behalf (Similar to the WC3/JASS story). – Jonathan Dickinson Aug 16 '10 at 14:21
  • @Justboo: Many game engines - including Tribes', Quakes', and the Torque engine - use a custom scripting language. Usually it's just for AI, but in case of Torque and Starcraft 2, it's for the entire game. This is done to make the engine more flexible (entire separate games can be created as Starcraft 2 maps!) – BlueRaja - Danny Pflughoeft Sep 07 '10 at 19:24
  • @JustBoo, its in no way "not invented here syndrom". As BlueRaja also describes many games use their own scripting language. There are no general scripting language out there that perfectly suits games. Even Lua have some somewhat serious memory fragmentation problems and the Lua language itself doesn't fit well with how the SC2 editor works. – Peter Ølsted Dec 24 '11 at 18:15
4

The actual game itself uses a combination of C, C++ and XML (for metadata).

The scripting language used called 'Galaxy'. It's a C-based language built into the game engine.
It's used in the campaign and in custom maps.

Alexander
  • 158
  • 5