Live data from Hacker News

Far Cry 1.34 source code (2006)

archive.org

91–100 of 547 posts

Re: Far Cry 1.34 source code (2006)

#91

Earlier quoted context omitted.

The example sounds like a quite basic insight into algorithmic complexity or complexity of lookup operation of data structures. A linked list is fine, if you need or want to go through the entries sequentially anyway, but if you need random access, then you probably want something different. I can tell that without ever having looked at something like Quake's console commands implementation. However, it might have be…

> it might have been the case, that there were not that many commands anyway, so that the linked list did not noticably slow things down. Also, unlike the game code itself which has to finish running its work in time for every frame, it probably doesn’t matter if running a command from the Quake terminal takes a little bit extra time. Would anyone notice or care about a difference in the amount of time it takes to ru…

> Also, unlike the game code itself which has to finish running its work in time for every frame, it probably doesn’t matter if running a command from the Quake terminal takes a little bit extra time.

Except we did, because back then, the console command loop was part of the work done every frame - so your lookup still had to fit in the budget, or the player would see frames being skipped. Which, if memory serves me, happened as far as Quake 3.

Here's another important insight about how games were written back then: they were single-threaded. Rightfully or not, the cost of context switching was seen as too big, so everything was run in a single thread - maybe with an event loop (what kids these days call "async") thrown in for convenience, especially around UI. The games that did use threads, would use a small amount of them to offload some work that wasn't strictly frame-bound, or when outside main gameplay (e.g. in menu). I actually can't think of any game from that era, which would run multiple threads during main gameplay.

And sure, you can adapt the console with your linked list lookup to run on the event loop ("async"), so it would e.g. do a fixed number of search steps, then yield, and resume next frame. But the code for that would get much, much more complex than replacing a linked list with an array, even if you then also replaced linear scan with binary search.

So one other thing about games back then: things were much simpler, and skipping frames wasn't that big of a deal-breaker. Multiplayer wasn't so popular, there was nothing you could honestly call physics code - which would explode if you skipped frame without compensating, etc. And players were used to getting anything from 6 to 60 FPS, depending on hardware they owned. These days, a game console blocking main gameplay thread and causing frame skips, would be unthinkable.

Re: Far Cry 1.34 source code (2006)

#92

Let's see how many antipatterns: - Multiple inheritance - Over-abstraction - Excessive identifier prefixing and suffixing - Use of friend - Use of bit fields instead of bools - Inconsistent mixture of custom and built-in int types - Direct storage of pointers instead of reference-counted containers - Custom (and likely broken) _smart_ptr - Cancerous coding style that adds too many lines - Functions with 7+ arguments…

Half of listed antipatterns are completely valid strategies in some situations.

Re: Far Cry 1.34 source code (2006)

#94

Let's see how many antipatterns: - Multiple inheritance - Over-abstraction - Excessive identifier prefixing and suffixing - Use of friend - Use of bit fields instead of bools - Inconsistent mixture of custom and built-in int types - Direct storage of pointers instead of reference-counted containers - Custom (and likely broken) _smart_ptr - Cancerous coding style that adds too many lines - Functions with 7+ arguments…

How did this negatively affect the project?

Re: Far Cry 1.34 source code (2006)

#95

Let's see how many antipatterns: - Multiple inheritance - Over-abstraction - Excessive identifier prefixing and suffixing - Use of friend - Use of bit fields instead of bools - Inconsistent mixture of custom and built-in int types - Direct storage of pointers instead of reference-counted containers - Custom (and likely broken) _smart_ptr - Cancerous coding style that adds too many lines - Functions with 7+ arguments…

Nothing wrong with bitfields.

Re: Far Cry 1.34 source code (2006)

#96
post #55
post #31

Earlier quoted context omitted.

As an aside, have you played red alert lately. Holy crap. I tried a while back and it's like people have just been studying that game non stop since I was a kid. I got owned. But year totally agree. I sort of think that with a smart OS license for game IP you could put a lot of stuff into the public domain and it would flourish in really interesting ways like fan fiction.

Same thing with Heroes III - they talk about “breaks” and chains and things on multiplayer and it just blows me away.

I though I was good at starcraft before going to Battlenet, and I though I learned I wasn't.

But last year I went to play HOMM3 online, and I imagined I could at least teach the kids a trick or two.

I was so wrong.

Re: Far Cry 1.34 source code (2006)

#98
post #55

Earlier quoted context omitted.

Same thing with Heroes III - they talk about “breaks” and chains and things on multiplayer and it just blows me away.

I though I was good at starcraft before going to Battlenet, and I though I learned I wasn't. But last year I went to play HOMM3 online, and I imagined I could at least teach the kids a trick or two. I was so wrong.

It's literally a completely different game from "normal" HOMM3 now, really.

It's interesting watching playthroughs, and seeing the tricks used, but it's not quite the game I played 20 years ago.

I did pick up some positioning tricks and tips.

Re: Far Cry 1.34 source code (2006)

#99
post #12

I remember when Far Cry came out. Around the time, Doom 3 and Half-Life 2 were the most anticipated games for quite a while, mostly because they promised graphics far ahead of anything released so far. But as they were delayed multiple times, Far Cry stole a lot of their thunder when it came out months before them, with similarly impressive graphics. We don't see technically ambitious PC exclusive games like this any…

> We don't see technically ambitious PC exclusive games like this anymore

You should consider A Plague Tale: Requiem. Even without ray-tracing, it is by far one of the most beautiful games I've played in a long time (since The Witcher 3, at least). Not to mention it has a sucker-punch of a story and a phenomenal soundtrack.

Re: Far Cry 1.34 source code (2006)

#100

Let's see how many antipatterns: - Multiple inheritance - Over-abstraction - Excessive identifier prefixing and suffixing - Use of friend - Use of bit fields instead of bools - Inconsistent mixture of custom and built-in int types - Direct storage of pointers instead of reference-counted containers - Custom (and likely broken) _smart_ptr - Cancerous coding style that adds too many lines - Functions with 7+ arguments…

Who cares? Clearly the gamers, reviewers, etc don't care.

Only pontificating armchair field marshals giving their take of 'anti-patterns' in game engines built decades ago.

That game made millions. Went on to release multiple sequels after the first and still made millions.

Is your game engine making millions?

Post reply on HN