Live data from Hacker News

The gold standard of optimization: A look under the hood of RollerCoaster Tycoon

larstofus.com

181–186 of 186 posts

Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon

#181

Warcraft 1 (1994), Warcraft 2 (1995), and StarCraft (1998) all use power-of-2 aligned map sizes (64 blocks, 128 blocks, and 256 blocks) so the shift-factor could be pre-computed to avoid division/multiplication, which was dang slow on those old 386/486 computers. Each map block was 2x2 cells, and each cell, 8x8 pixels. Made rendering background cells and fog-of-war overlays very straightforward assembly language. All…

It's a shame that when a Redditor discovered the source code for the original StarCraft "gold master" on a CD, they sent it back to Blizzard in exchange for some fucking blizzard merch [1] EA a while back released the source code to (most) of the old Command & Conquer games [2] though interestingly left out Tiberian Sun and Red Alert 2, StarCraft's closest competitors at the time. Would've been nice for historical pr…

> peek behind the curtain and see StarCraft's code in a similar fashion

Oh, you wouldn't want to, believe me. You'd be scarred by code like this:

    class CUnit ... {
        #include "header_1.h"
        #include "header_2.h"
        #include "header_3.h"
        #include "header_4.h"
    };
It's remarkable the game functioned as well as it did. See https://www.codeofhonor.com/blog/tough-times-on-the-road-to-...

Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon

#182
post #91

Warcraft 1 (1994), Warcraft 2 (1995), and StarCraft (1998) all use power-of-2 aligned map sizes (64 blocks, 128 blocks, and 256 blocks) so the shift-factor could be pre-computed to avoid division/multiplication, which was dang slow on those old 386/486 computers. Each map block was 2x2 cells, and each cell, 8x8 pixels. Made rendering background cells and fog-of-war overlays very straightforward assembly language. All…

If you worked on Lost Vikings I'd like to thank you for the entertainment during my childhood. Given your background did you ever get involved in the demo scene?

I did work on Lost Vikings; it was the first original game I had occasion to help develop, and it was a standout moment for Blizzard nee Silicon & Synapse: we proved to ourselves that we could make a game from scratch.

I never developed standalone demos -- I was already working so many hours at work there wasn't much left over for, y'know, regular things like having a life.

Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon

#183

Warcraft 1 (1994), Warcraft 2 (1995), and StarCraft (1998) all use power-of-2 aligned map sizes (64 blocks, 128 blocks, and 256 blocks) so the shift-factor could be pre-computed to avoid division/multiplication, which was dang slow on those old 386/486 computers. Each map block was 2x2 cells, and each cell, 8x8 pixels. Made rendering background cells and fog-of-war overlays very straightforward assembly language. All…

Were you at blizzard when they lost their source code server and had no backups? I was there for a short time consulting around the time WC3 was released.

Whoops! I didn't hear about that one, though it was a common occurrence in the earlier days of the game industry. Please share details, if you're able.

On a related note, I worked on Battle Chess, porting it from DOS/Amiga to Windows 3.1, and later to Windows 95 ("MPC Battle Chess"). Every few years a new producer from Interplay would call me and ask for a copy of the source code so they could rebuild it, because they lost their own copies. One of those times it was because they discovered their weekly backup tapes were all blank.

Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon

#184

Earlier quoted context omitted.

It's a shame that when a Redditor discovered the source code for the original StarCraft "gold master" on a CD, they sent it back to Blizzard in exchange for some fucking blizzard merch [1] EA a while back released the source code to (most) of the old Command & Conquer games [2] though interestingly left out Tiberian Sun and Red Alert 2, StarCraft's closest competitors at the time. Would've been nice for historical pr…

> peek behind the curtain and see StarCraft's code in a similar fashion Oh, you wouldn't want to, believe me. You'd be scarred by code like this: class CUnit ... { #include "header_1.h" #include "header_2.h" #include "header_3.h" #include "header_4.h" }; It's remarkable the game functioned as well as it did. See https://www.codeofhonor.com/blog/tough-times-on-the-road-to-...

I've read the blog posts (actually we corresponded about Battle.Net back in 2012!) but I'd love to see StarCraft opened for historical interest :)

PS: Still waiting to hear about the "Westwood's reaction" blog post! :p

Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon

#185

Warcraft 1 (1994), Warcraft 2 (1995), and StarCraft (1998) all use power-of-2 aligned map sizes (64 blocks, 128 blocks, and 256 blocks) so the shift-factor could be pre-computed to avoid division/multiplication, which was dang slow on those old 386/486 computers. Each map block was 2x2 cells, and each cell, 8x8 pixels. Made rendering background cells and fog-of-war overlays very straightforward assembly language. All…

> By way of comparison, Blackthorne for Super Nintendo was all 85816 assembly

Weren't almost all console games up to that era written in assembly? What high level languages were used? I recall hearing many Atari 7800 (?) games were written in Forth? May be mistaken.

Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon

#186

Earlier quoted context omitted.

How many programmers don't know binary?

Everyone who learned web dev or app dev only.

Okay, but are those people unaware that they skipped learning all the fundamentals? I was just surprised that someone would write an article that's supposed to be about a game written in assembly and throw in a line saying that binary arithmetic is a technical obscurity.
Post reply on HN