Live data from Hacker News

Far Cry 1.34 source code (2006)

archive.org

71–80 of 547 posts

Re: Far Cry 1.34 source code (2006)

#71
post #46
post #7

Earlier quoted context omitted.

It‘s still interesting to see how certain challenges have been solved back in the day. Or as a case study in what _not_ to do today. For example, Quake‘s ingame console commands were stored in a linked list. I believe looking up a command was a linear search through that list. You wouldn‘t do it like that today.

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…

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: Far Cry 1.34 source code (2006)

#72

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…

Good today is better than perfect tomorrow.

Re: Far Cry 1.34 source code (2006)

#73

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…

> - Direct storage of pointers instead of reference-counted containers

Overuse of reference counting is an anti-pattern and a performance killer.

Re: Far Cry 1.34 source code (2006)

#74
post #15

maybe someone is trying to cause trouble for archive.org by putting such clearly violating content on there

It doesn’t really matter at this point. It is out there and the Internet never forgets.

What will come next, if it ever comes, it will be a game a whack-a-mole that the copyright owners have no chance of winning.

Re: Far Cry 1.34 source code (2006)

#75
post #45
post #27

Earlier quoted context omitted.

Elder scrolls games are very moddable and people have made total conversions and map extensions. That didn't prevent the sales of newer TES games based on slightly improved engines and slightly better assets (fan-made assets are often still ahead of the official ones, but it takes years of refinement to get to that point).

That and things like Counter Strike / Day of Defeat that started as mods had a large number of maps back in the day. 99% of them were shit and weird experiments. The ones that did rise to the top eventually got incorporated into newer versions, and indeed became games in their own right. DOTA as well, started as a mod for Warcraft 3 and eventually spawned a franchise. Trying to capture ALL the value (in this case the…

Ayyy, Day of Defeat was peak early 2000's FPS.

Re: Far Cry 1.34 source code (2006)

#76

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…

Sounds like a real world project that focused on shipping a good game rather than have perfect code. There is a reason perfectionist devs do not run big projects. They focus on minutiae rather than the big picture. Even in my own experiences, one of my most successful projects (eventually acquired by Amazon) was a quickly written hacked together project that solved a big issue well. Over time it became better enginee…

Or maybe, just maybe, 'good practices' simply changed over the span of literally 20 years?

Naah, it must simply be those 'perfection vs practicality' dichotomy again.

...Not to mention that your point is the definition of survivor ship bias. Maybe the devs actually were super mad at themselves how the codebase looked cause it slowed down their development. Maybe they initially had 3 more times the ammount of anti-patterns, but they reduced them. Or maybe that's how their roll, but the fact that this code shipped is almost insignificant when it comes to judging its quality. We could spin infinite ammount of examples where bad code works, where good code fails, where bad code fails and were good code works. How about we actually talk about arguments instead, though?

Re: Far Cry 1.34 source code (2006)

#77
I remember there is a bug with the hang glider that if you move down and up you gain momentum

Back in the day far cry 1 was ultra realistic graphics.

The game was fun to play, the most annoying thing is if you throw a rock or grenade where they can see if your stealth meter in instantly goes to zero and they start shooting you.

I played it a lot, hehe.

Re: Far Cry 1.34 source code (2006)

#78
post #2

I wish companies would just opensource really old engines for educational purposes. Maybe take game assets resize everything to 1/10th so that it looks like sht but can still be used as placeholder. Would boost the pipeline of talent for the entire industry

I guess this is legally unfeasible. Take a look at the splash screens next time you're loading a game - especially AAA but also smaller ones too. There will beone page with a bunch of logos. Havok physics is the one that comes to mind but there's loads more. Each of these is a plugin with proprietary code. They would need to be stripped out before the code could be released, which would probably be a lot of work. And…

I'd be fine if they put up their code with the proprietary parts removed. They can just include a FIXME stating that the physics engine/video player etc. is missing. If the community picks up the code, they can just replace the missing parts.

Re: Far Cry 1.34 source code (2006)

#79

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…

If anything, this is a perfect example of how little these things actually matter in the real world. This game alone sold over 2.5 million units and kickstarted one of the most popular franchises in gaming today.

I always have a feeling this type of comment must be necessarily written by someone who hasn't shipped anything of substance in the industry. It's trivial to point out irrelevant minutiae like this as opposed to having an in-depth discussion about the merits of the terrain rendering system or, you know, literally any of the hard problems the game is solving and that actually contribute to making it a technical success.

Re: Far Cry 1.34 source code (2006)

#80
post #45

Earlier quoted context omitted.

That and things like Counter Strike / Day of Defeat that started as mods had a large number of maps back in the day. 99% of them were shit and weird experiments. The ones that did rise to the top eventually got incorporated into newer versions, and indeed became games in their own right. DOTA as well, started as a mod for Warcraft 3 and eventually spawned a franchise. Trying to capture ALL the value (in this case the…

dayz and the arma series aswell they would not have sold nearly the amount of copies without it, it also ended up as a standalone however controversial it might be.

For sure I bought like 5 copies of A2 for friends just so we could play DayZ mod together.
Post reply on HN