News for hackers. Stuff that matters.
Re:Someone dropped the source code for Far Cry 1 on archive.org by wmanley on Saturday July 01, 2023 @06:34AM (#36548654)
I don’t know about quake, but in quake 2 it consisted of a big list of:

    else if (strcmp(cmd, “somecmd”) == 0)
        somecmd()
I remember reading it at the time and being inspired by the simplicity of it. It didn’t need to be more complicated than it was, and so Carmack didn’t make it more complicated. That was in stark contrast to a lot of the object oriented c++ design stuff that I was also reading at the time.

So much of the quake 2 game source was like that. Beautifully straightforward code.

Re:Someone dropped the source code for Far Cry 1 on archive.org by hyperthesis on Saturday July 01, 2023 @07:25AM (#36548955)
Linear time is fine for small n, and console commands aren't time critical anyway.

People famous for optimization also know where it matters. Optimization obscures.

Re:Someone dropped the source code for Far Cry 1 on archive.org by wmanley on Saturday July 01, 2023 @07:44AM (#36549074)