Live data from Hacker News

Original Age of Empires 2 dev talks about its usage of assembly code

old.reddit.com

21–30 of 113 posts

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#21
post #4

I worked on port of a Konami game from PSX to PC, that was 1999-2000 - the code (C) had lots of #ifdefs like where inline assembly was placed, and the original "C" code was kept. It seemed all done by one specific programmer, and what really saved us (in porting) the game was the originallly kept "C" code. My mips knowledge was never as good as x86. So yes, it was the norm back then. My second job (1998), was working…

You worked on the port of Metal Gear Solid?! OH MY GOD THIS IS SO COOL! Edit: Looking it up you might have worked on a larger amount of games than I thought. Very awesome nonetheless. https://www.mobygames.com/game/company:99/from:1998/platform...

Thanks!!! Yes it was MGS - the deal was with our studio to do the port from PSX -> PC and since Microsoft was the publisher, part of the deal was for Konami to port Age Of Empires (1? 2?) to PSX.

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#22
post #20

Earlier quoted context omitted.

It was always so disappointing, spending hours coding up a tightly wound assembly language version of some inner loop that uses half the instructions generated by the C++ compiler, only to find that your slaved-over version is actually 5% slower . But OTOH... the thrill when it actually was faster! This was back in the Pentium 4 era, where there were deep pipelines and oddities like some simple ALU instructions (ADD,…

> uses half the instructions generated by the C++ compiler is there a tool that could profile/predict ahead of time, so that one does not attempt to hand write assembly before knowing for sure it will beat the compiled version?

For small pieces of code I would try to use a superoptimizer like souper.

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#23
post #10
post #8

Earlier quoted context omitted.

We've gained many. Chatting in a discord is similar to this.

And IRC was even better at it.

I don't think so. I know everybody loves to say that IRC is better than [insert commercial chat application] but in this particular use case discord is superior to irc imo because of the voice/video chat features and greater convenience.

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#24
post #11
post #7

> A key speedup technique AoE used was realized during discussions I had with iD software programmer and optimization guru Michael Abrash over lunch at Tia's Mexican Restaurant in Mesquite, TX. How many freeform interactions like this did we lose because of the Internet's illusion of being connected?

NEVER FORGET WHAT THEY HAVE TAKEN FROM US. WE WERE ONCE A CULTURE. NOW WE ARE LOST, FOREVER. WHITHER OUR SENSE OF BEAUTY. (etc., etc., insert architecture pics to taste) C'mon dude. The opportunity for people to talk to one another about this stuff is unimaginably better than it was back then. Like, here we are, right now, me telling you you're full of shit. What are the chances of us being able to do that in 1999? (…

[flagged]

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#25
post #7

> A key speedup technique AoE used was realized during discussions I had with iD software programmer and optimization guru Michael Abrash over lunch at Tia's Mexican Restaurant in Mesquite, TX. How many freeform interactions like this did we lose because of the Internet's illusion of being connected?

Don't people still have lunch?

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#26
post #7

> A key speedup technique AoE used was realized during discussions I had with iD software programmer and optimization guru Michael Abrash over lunch at Tia's Mexican Restaurant in Mesquite, TX. How many freeform interactions like this did we lose because of the Internet's illusion of being connected?

[dead]

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#27
post #4

I worked on port of a Konami game from PSX to PC, that was 1999-2000 - the code (C) had lots of #ifdefs like where inline assembly was placed, and the original "C" code was kept. It seemed all done by one specific programmer, and what really saved us (in porting) the game was the originallly kept "C" code. My mips knowledge was never as good as x86. So yes, it was the norm back then. My second job (1998), was working…

Another Flipcode user!

I missed that other game forums of similar vintage are now gone.

The way to being able to do Assembly in Borland products, and to lesser extent on VC++, was great.

I always feel like vomiting when looking at the mess UNIX compilers have come up for it, instead of inferring how registers are being used, and the whole string concatenation stuff.

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#28
post #5
post #2

>The use of assembly in the drawing core resulting in a ~10x sprite drawing speed improvement over the C++ Wow that's a chunky improvement over an already fast lang

This was in 1999. C++ compilers have come a long ways since then. While there are still opportunities for hand-written asm to go and order of magnitude faster than C++, they're mostly around manual vectorization where the auto-vectorizer fails.

Yes, younger devs grown up on the myth of C and C++ being always fast, have missed the days when inline Assembly was a higher count than pure C and C++ code.

I have seen applications for MS-DOS, effectively using C as a Macro Assembler, only the data structures and high level logic was C as if Macro Assembler macros.

Re: Original Age of Empires 2 dev talks about its usage of assembly code

#30
post #11
post #7

> A key speedup technique AoE used was realized during discussions I had with iD software programmer and optimization guru Michael Abrash over lunch at Tia's Mexican Restaurant in Mesquite, TX. How many freeform interactions like this did we lose because of the Internet's illusion of being connected?

NEVER FORGET WHAT THEY HAVE TAKEN FROM US. WE WERE ONCE A CULTURE. NOW WE ARE LOST, FOREVER. WHITHER OUR SENSE OF BEAUTY. (etc., etc., insert architecture pics to taste) C'mon dude. The opportunity for people to talk to one another about this stuff is unimaginably better than it was back then. Like, here we are, right now, me telling you you're full of shit. What are the chances of us being able to do that in 1999? (…

Do you want to have lunch at Tia's in Mesquite, Texas?
Post reply on HN