Live data from Hacker News

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

old.reddit.com

101–110 of 113 posts

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

#101
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…

I think Katmai was Pentium III

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

#103
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…

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,…

P4 ALU (or at least significant parts of it) was double pumped... so parts of a 2GHz P4 were actually running as fast as 4Ghz even back then...

Shifts were bad however, I think they left out the barrel shifter for some ungodly reason.

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

#104
post #65

For those interested, the competitive AoE2 scene is alive and well with one of its biggest tournaments, NAC5, going on now, an in-person LAN in Berlin. https://liquipedia.net/ageofempires/Nili%27s_Apartment_Cup/5 https://www.twitch.tv/nili_aoe https://www.youtube.com/channel/UCXeY7zz-1LsyZdnpFbffdqA

Looking forward to going to this live on Saturday!

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

#105
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…

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,…

This! I would spend hours unwrapping loops etc, optimizing register use and then profile my amazing x86 version only to find the compiler had found a better route. But you're right -- on the times when you code came out 2X, 5X, 10X quicker than the compiler.. that was what you lived for :)

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

#106
I wrote a good chunk of the graphics code for this commercial isometric game in like 1996:

https://www.youtube.com/watch?v=t2kdKB18c7I&t=332s

We were just coming out of the age of assembler. The background blitting is all assembler, but the characters are Direct3D. When I put the 3D engine in there it was a 3D software renderer I had written when I was 13 in C++ and x86 and I just pasted it into the game engine, but I think we took the software renderer out and just used Direct3D's renderer. GPUs were just coming onto the market, and I think the hope was that it would get a boost from a GPU, although I don't remember ever testing it on one. (I do remember going to gaming expos and the card manufacturers would just hand out GPUs to every dev that went to their booths...)

AMA.

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

#107
post #67

Earlier quoted context omitted.

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.

It's the structure/topology. Discord has a million deserted "servers" with redundant general channels. Peak IRC had a dozen or so large networks that often bundled a lot of e.g. adjacent FOSS projects. The chances of running into someone interesting a la the article anecdote was just higher. Discord is a massive net negative for chatting on the internet because of this flaw imho.

This wasn't my experience with IRC. Our channel only ever had thirty people tops before being swallowed by discord. It's got the same discovery/accessibility issues that the Windows vs Linux issue has. Want Windows/Discord? Google Windows/Discord, first result, done. Want Linux/IRC? Weeeell, first you're going to have to find a distro/client. There's no singular trusted expert and everyone disagrees on what's best, so you better pick one and pray it was the right choice. Oh, you'll also have to configure it a bit, or a lot if you chose the wrong one.

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

#108
post #101
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…

I think Katmai was Pentium III

Oh righ! I messed it up, Pentiums were much earlier. Thanks for the correction!

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

#109
post #67

Earlier quoted context omitted.

It's the structure/topology. Discord has a million deserted "servers" with redundant general channels. Peak IRC had a dozen or so large networks that often bundled a lot of e.g. adjacent FOSS projects. The chances of running into someone interesting a la the article anecdote was just higher. Discord is a massive net negative for chatting on the internet because of this flaw imho.

This wasn't my experience with IRC. Our channel only ever had thirty people tops before being swallowed by discord. It's got the same discovery/accessibility issues that the Windows vs Linux issue has. Want Windows/Discord? Google Windows/Discord, first result, done. Want Linux/IRC? Weeeell, first you're going to have to find a distro/client. There's no singular trusted expert and everyone disagrees on what's best, s…

> This wasn't my experience with IRC.

The thing is, my experience is different, but of course similarly anecdotal. I essentially got my entire professional network and career on IRC, and that includes contacts all over the modern tech stack and adjacent interests, being on just two IRC "servers". And I could connect many other people in the same way.

On Discord, there seem to be just more barriers against this. Getting someone into a new place doesn't just require hopping into a new channel with a single /join command, but an entire new "server" with a new crowd. There's more inhibition against that.

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

#110
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…

Isn't that a pretty common tactic? Write everything in C and then at some point in the dev cycle start identifying functions/features that can be asm'd for performance reasons?
Post reply on HN