Yes Factorio is complex. No it's not more complex than a Witcher/Skyrim/Cyberpunk/whatever big budget game you can think of.
When i say complex, I talk about code, architecture, gameplay mechanics. Not play time...
Yes Factorio is complex. No it's not more complex than a Witcher/Skyrim/Cyberpunk/whatever big budget game you can think of.
When i say complex, I talk about code, architecture, gameplay mechanics. Not play time...
Compare this to average bug ridden AAA game that has half of game mechanics falling apart in visible ways in single player spawning and despawning stuff randomly in failed hopes of keeping an illusion that the systems are sort of working!
A lot of triple A studios are havening trouble of implementing inventory game mechanics without introducing few item duplication glitches. Guys who are building Factorio are on another level they really made implementing game mechanics their core priority. For triple As their core priority is how to budget for making tons of assets and cramming them into the game.
I imagine Grand Theft Auto doesn't simulate any cars that are more than slightly farther than the render distance.
I've seen videos showing that Cyberpunk 2077 will even not simulate things just because they left your view. People and cars will just disappear after you turn around for a second.
In comparison collision detection and AI need to rely on a lot of trickery (and thus bugs) because naïve approaches explode in complexity.
Plus, each item on a conveyor belt has collision as well - they can tell when they run up against each other and will stop. Inserters can't put items on a full belt, but if there's a space they will sneak the item in (moving items around it if necessary).
Compare [0] to [1]. Being 2D makes factorio many many times simpler than an equivalent 3d game.
None of that has any bearing on the quality of the game,it's an excellent game, and a great technical product to boot.
[0] https://developer.mozilla.org/en-US/docs/Games/Techniques/2D...
It's a damned shame nobody's written some kind of amalgamation of libraries, let's call it an engine, so every game developers out there doesn't have to write the same collision code a thousand times. /s
It's bugging me away how many folks are confusing pretty 3D graphics with technically complex and efficient simulations (such as piped fluids) on billions of objects.
- User interaction/controls are much simpler in 2d than 3d. In 2d, inputs are (mostly) mapped to a fixed axis, in 3d, those inputs are relative to your perspective which often changes. This leads to awkward situations like Gimbal Lock, and other issues similar to it that can leave a user confused about what their input is going to do
- Implementing gameplay features is generally simpler in 2d than in 3d. A simple example of firing a weapon is straightforward in 2d, in 3d you have issues like where does the projectile start, (from the camera or the player?), how does that interact with animations/the player model itself? Those issues are practically non-existant in 2d, but can ruin a 3d game.
- Anything that deals with rotations in 2d is an order of magnitude more complicated in 3d.
Taking it farther, factorio isn't a "general purpose" sim, it's constrained to a grid with very little in the way of external forces to be considered continuously. There's no gravity, the player walking on a belt doesn't interrupt production, etc. Factorio (to it's credit) leans into this from a gameplay perspective.
> It's a damned shame nobody's written some kind of amalgamation of libraries, let's call it an engine, so every game developers out there doesn't have to write the same collision code a thousand times. /s
Factorio isn't using one of those "engines" you speak of. They've been pretty vocal about how they've hand rolled the game and the engine underneath it.
> It's bugging me away how many folks are confusing pretty 3D graphics with technically complex and efficient simulations (such as piped fluids) on billions of objects.
Actually, I didn't mention graphics, you did. _You're_ the person who is "confusing pretty 3d graphics". At the most fundamental level, simulating an extra dimension adds 50% more of a cost, but in reality the algorithms change and become orders of magnitude more complicated. Collision detection is a textbook example of this, hence me using it in the parent post.
Factorio is a technically impressive game, there is no doubt about that. But it's likely that if factorio was implemented in 3d it either wouldn't exist, or would be a substantially less polished experience (see Satisfactory for the closest example).
There are absolutely optimizations that can be made to process items that aren't visible on the screen. Everything is deterministic, cyclical and can be represented as a graph. Given the initial number of resource at a node in the graph, and a time duration, you can calculate exactly where each resource will be at any time.
Think about the sheer scale of a 10 rocket per minute megabase. The amount of inserters, robots, belts, factories, the pollution involved, the number of biters attacking the base constantly… The number of entities on such a base is enormous, yet they still manage to compute it all in real time at 60 ticks per seconds. That feat of engineering is just as impressive as a 3D physics engine — perhaps even a 3D rendering engine.
(Of course, a AAA game is more than just a physics/rendering engine.)
(Also, there is a saying that it takes a genius to do something in a simple way. So even if the resulting code might be simple, arriving to that point can be actually pretty complex endeavor.)
Really, most of the budget of AAA is spent on art and level design. They have sophisticated tech, but often it is not on an unreachable level.
In Factorio, you have a very large number of active objects with very dense, complex, time-critical and deterministic interactions. In most other games, you have relatively few active entities. The game gives you the illusion of a rich living world, but a lot of the graphical bits floating around can't actually be interacted with. The physics system is a complex bit of math but is fairly isolated from the rest of the engine and has relatively few entities to process. If it gets things "wrong" in minor ways, the player is unlikely to tell.
Also, many AAA game physics and graphics engines work the same enough that engines can even be reused. There's a relatively small amount of bespoke system design. It's just following the same well-tread paths. Factorio's gameplay has enough novelty that the engine has to solve challenging somewhat unique problems.
Source: Senior software engineer at EA for eight years and wrote a best-selling book on software architecture for games.
But Factorio is like a pinball machine with MILLIONS of balls in play at the same time, and it perfectly and efficiently tracks each and every one of them.
There is one sad aspect to Factorio: There is only one character: you. Alone. On a planet. All by yourself. Destroying the environment. But once you get over that depressing aspect, it's great fun! ;)
I think this is maybe true, but it's not a fair comparison. The real comparison is how much effort would go into making factorio with all of its polish in a 3d world rather than a 2d world.
Factorio's technical impressiveness (?) Comes from how well it's designed and implemented. The limitations that it imposes are part of the reason it runs so well, and also what make it such a great game.
> The physics system is a complex bit of math but is fairly isolated from the rest of the engine and has relatively few entities to process. If it gets things "wrong" in minor ways, the player is unlikely to tell.
The difference between doing the above for physics and graphics is orders of magnitude in how expensive they are, and how complicated they are to implement. You're right that most people don't notice when they go slightly wrong, but they often go catastrophicly wrong. (Much more often in 3d than in 2d). Factorio skirts around this by not running a general purpose physics sim for the game logic, and constraining the problem space (which to me is even more impressive than getting a 3d physics engine right)
It's a great game, but quite different than Factorio in many ways, and much simpler along certain dimensions, with less abstraction and meta-programming: no drones, no blueprints, etc.
The fact that Factorio is based on a two-dimensional grid vastly simplifies it and makes it more like a precise programming language or spreadsheet, than a free-form 3d graphics editor. I do love them both, though.
Don't get me wrong: 3D adds a lot of cool stuff, like the ability to make layers and build vertically way up into the sky. And you have much more freedom about where you place objects. But that makes it practically impossible to implement the kind of precise grid-based blueprints and drone construction and logistics system that Factorio has.
To its credit, Satisfactory would be practically unusable if it weren't for the wonderfully easy-to-use well designed construction tools, that make it a snap to route and connect conveyer belts and pipes in 3D. But that's a much messier user interface problem that the precise grid of tightly constrained tiles that Factorio uses. But it does live up to its name: building and connecting 3D conveyor belts and especially pipes is quite satisfying!
Here's a great example of how you can abuse the fantastic degree of freedom that Satisfactory provides -- but that freedom comes at a cost of user interface complexity and the lack of higher level automation and abstraction -- the features that make Factorio such addictive "programmer crack".
I Produced so Much Nuclear Waste the World Is Ruined Forever - Satisfactory
https://www.youtube.com/watch?v=Oh2oF-eZTD8&ab_channel=Let%2...
The Satisfactory developers must have been equally horrified and gratified to see how people abused their beautiful game in unintended ways, but they responded by optimizing it a lot so it still runs smoothly. But the scale of Factorio's world is still much larger than Satisfactory, even though it's more constrained.
And another thing about Satisfactory is that the world is hand designed and breathtakingly rich and beautiful, unlike Factorio's procedurally generated world (which has beautiful 2D graphics, but no human touch). But that makes it even more tragic that the goal is to cut down all the trees, peel up all the glowing slugs, and ruin the bucolic countryside with mega-factories belching out pollution and waste.
More about Satisfactory:
https://news.ycombinator.com/item?id=24156912
>Satisfactory is like a 3D version of Factorio, which lets you build huge multi-layer mega factories up into the sky. But it's not as deep and sophisticated as Factorio, and doesn't have drones or blueprints. (That would be a lot more difficult to accomplish in free-form 3D, than with Factorio's 2D tile grid.) It's kind of like the giant simple Legos for younger kids, as opposed to Factorio that's more like Lego Technic.
>Satisfactory is well worth playing if you yearn for a 3D version of Factorio, but I still keep going back to Factorio, which is more like "Dwarf Fortress" in its depth and sophistication. Satisfactory's world is breathtakingly beautiful, lovingly hand-crafted by artists instead of procedurally generated, which makes it all the more satisfying to despoil and ruin with huge mega-factories belching out smoke and radiation.
Than Skyrim, easily. Crowd mechanics in Witcher/Cyberpunk give me a pause, but still probably more complex than those.
Popular "simulation" games like Factorio, Rimworld, Dwarf Fortress and Kerbal Space Program are deceptively heavy.
https://store.steampowered.com/app/644930/They_Are_Billions/
It's easy to deal with a few zombies, since they're very slow and stupid, but as you get more and more of them all over the place, and then huge swarming waves of them, it's insanely challenging!
I love this game, but it's incredibly difficult, even on the easiest setting.
They Are Billions Gameplay - Zombie Defense Post Apocalyptic City Building
https://www.youtube.com/watch?v=DmVx_OMojSY&ab_channel=Splat...
It's fun to use cheats and sandbox mode to play around with the swarming simulation in extreme situations:
1 TRILLION ZOMBIES - They Are Billions
https://www.youtube.com/watch?v=xeczMg3lMdQ&ab_channel=Sergi...
Check out the dynamics of how the waves of different kinds of zombies interact:
It unleashes and mixes layers of different kinds of zombies with different abilities and attacks. (@ 43:00)
The lighter ranged spell casting zombies are maintaining a distance, but then holes form in their layer, and phalanxes of darker hand-to-hand melee zombies squirt through and fill in the gap. (@ 45:00)
At 1:18:30 he admits that it's obvious the zombie waves will never end, so he lets them win!
It reminds me of slime mold hunting an oat flake.
https://www.youtube.com/watch?v=elqwn7k2Wwk&ab_channel=Journ...
I'd love to play SimSlimeMold.