Live data from Hacker News

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

old.reddit.com

71–80 of 113 posts

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

#71
A few years ago I wrote a naive SLP drawing routine and it was very slow, and left me wondering what exactly they did to make it usable in AOE2. So this makes a lot of sense to me.

Fun little format to mess with if you find the docs for it - surprisingly not that difficult to implement (there used to be a wiki with the spec on it, might be gone now?)

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

#72
post #10

Earlier quoted context omitted.

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.

You mean, like Jabber did 10 years ago using 10x less resources?

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

#73
post #41

Earlier quoted context omitted.

Compilers beat hand written Assembly for the general use cases. Now beating special use cases, like using vector instructions to parallel process video decoding streams is another matter. It is no accident that after all the efforts improving Java and .NET JITs for auto-vectorization across various vendors, both platforms now expose SIMD intrinsics as well.

The choices and resulting codegen are fairly different. Only one of them works "properly" as of today. Though I'm open to be proven wrong once Panama vectors get stable in the Java land.

They will only be out of preview when Valhala ships, as per roadmap.

Then there is the whole issue when will they reach other implementations beyond OpenJDK, specially a very important alternative implementation running on many phones across the globe.

Nevertheless the need to explicitly being allowed to write vector code is there.

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

#74

Earlier quoted context omitted.

Don't people still have lunch?

They do. Over their desks, while working or in a video call.

We get a 1 hour lunch break required by law and yet people still do this willingly.

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

#75

Earlier quoted context omitted.

There was Intel VTune, which I heard was good, though I haven't used it myself. One difficulty is that there are many non-obvious and hard-to-predict factors that interact to produce pipeline stalls. Instructions had specified throughputs and latencies (throughout being the number of cycles before another independent instruction of that type could be initiated; latency being the number of cycles before its output cou…

VTune still exists and is free since a few years. Neat thing with VTune is that it has support for a few runtimes, so it understands for example CPython internals to the point that stack-traces can be a mixture of languages. That's something only becoming available just now outside of VTune, like Python 3.12 has some hooks for Linux perf. A purely pen-and-paper tool was IACA; you simply inserted some macros around a…

Note that there's also the open-source uiCA [0], which similarly predicts scheduling and overall throughput for a basic block. Their benchmarks claim it to be more accurate than IACA and other tools for newer Intel CPUs, but I wouldn't be qualified to judge those claims.

[0] https://uops.info/uiCA.html

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

#76
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?

I think we've lost some and gained other. People may say that Discord and similar will compensate, greatly, as the number of interactions can grow a lot. On the other hand, I don't think the experience is comparable to fully focusing on the person you're eating in person with.

Discord is a poor replacement. I think it allows a lot of broad connections without depth which sounds good on the surface but unfortunately real insights require a bit of digging but the conversation has already moved ahead in the chatroom. That's why old school forums were actually a better kind of a discussion board but discord being free and not requiring technical setup won.

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

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

> mipmapping and texture swizzling

Imagine reading this as a layman

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

#78
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? (…

The fact that it was hard to get information meant the ones which did break out were infinitely better. The ones you could discuss things were very into the things you were discussing.

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

#80

Earlier quoted context omitted.

Well, in certain online games the balancing can't just stay static. But update sizes really are quite insane. One Baldur's Gate 3 update had 100GB and of course that required 100GB additional free space. At that point it was easier to just reinstall the whole game.

The balancing in AoE2:DE can't stay static either - and the pathing seems to have a different bug every other patch. Still a fun game though.

The difference in quality of the game designers who worked on the original AoE2 versus AoE2:DE is pretty apparent. I think what is most annoying to me is how much harder it is to parse the visual information of "what kind of unit am I fighting" now that the graphics are "better".
Post reply on HN