Earlier quoted context omitted.
https://xkcd.com/2501/
How many programmers don't know binary?
The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
171–180 of 186 posts
Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
#172Warcraft 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…
Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
#173Earlier quoted context omitted.
Back then a lot of people started with assembly because that was the only way to make games quick enough. Throughout the years they accumulated tons of experience and routines and tools. Not saying that it was not a huge feat, but it’s definitely a lot harder to start from scratch nowadays, even for the same platform.
One thing I really don't understand would be the ergonomics of game dev. I mean, I guess it's just an isometric drawing library, and routines for each object (though this obviously isn't OOP game Dev). But like, for example, he talks about simulating the physics of the roller coasters. I get that, and I think I could figure that out in assembly. But, in my head, connecting the dots from simulating the physics to draw…
I happened to glance over Linux device driver 3e yesterday, and just programming GPIO is ghastly complicated — the programmer needs to request a region, use specific memory in/out functions to write/read, and then release the region, all for just reading and writing some bytes — no real business about.
Not saying that was not a significant feat, but I think it’s almost impossible for anyone to do so nowadays — even with C it is a very good amount of knowledge to write an engine without libraries.
Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
#174Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
#175Earlier quoted context omitted.
> > What language was RollerCoaster Tycoon programmed in? > It's 99% written in x86 assembler/machine code (yes, really!), with a small amount of C code used to interface to MS Windows and DirectX. https://www.chrissawyergames.com/faq3.htm
Wow. It reminds me of those guys who run a marathon carrying a fridge. Impressive, but ...
Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
#176Earlier 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…
I don't think [1] is 100% accurate.
Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
#177Earlier 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…
This entire reddit thread aged really poorly now that Blizzard is a shell of its former self. If anything, the attitude in that thread is what paved Blizzard's decline: complete disrespect for its origin. The StarCraft source code is something that must be kept behind closed walls, under tight control by Blizzard, even though the original people working on the game at Blizzard have already left and there is nothing t…
Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
#178Earlier quoted context omitted.
Wow. It reminds me of those guys who run a marathon carrying a fridge. Impressive, but ...
Yeah but imagine that if it was writte in anything else it would never had made it to the shelves with the processor power back then.
Re: The gold standard of optimization: A look under the hood of RollerCoaster Tycoon
#179What language is this article talking where compilers don't optimize multiplication and division by powers of two? Even for division of signed integers, current compilers emit inline code that handles positive and negative values separately, still avoiding the division instruction (unless when optimizing for size, of course).
Well, Sawyer started writing Transport Tycoon in 1992, when free or affordable C compilers were not as widely available. Turbo C was never known for optimizations. GCC 1.40 was good enough for Linus, but I guess Chris was already a good assembly programmer.
0: 55 push %bp
1: 8b ec mov %sp,%bp
3: 8b 46 04 mov 0x4(%bp),%ax
6: c1 e0 02 shl $0x2,%ax
9: eb 00 jmp 0xb
b: 5d pop %bp
c: c3 ret
That's for: int
main (int argc, char **argv)
{
return argc * 4;
}
And disassembled with contemporary binutils (not sure if Turbo C++ came with a disassembler.)