Friday Facts #301 - Crash site: First state
Author: Klonan,
published 5 years ago,
[i]Read this post on our [url=https://factorio.com/blog/post/fff-301]website[/url][/i]
[h1]Crash site: First state[/h1]
For many weeks now the GFX department has been focused on preparing replacements for the placeholder graphics of the campaign crash site. The subject as usual is not that easy because we had to first solve the main concept of the crash site.
It happens that those new entities belong to the Factorio universe, but they come from a different reality than the usual DIY/diesel punk of the game. So we had to invent a new way to design machines that look like Factorio but that are not too familiar.
Here a proof of concept of the look:
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/b3ea1858dbb1d45f446e41da79e1009d3cae737f.png[/img]
The concept is that the big (medium) spaceship broke into pieces as it crash landed, and lost many components that the player, during the introduction, will repair and use for his own profit.
The look of the spaceship remnants are a little bit based on the designs of the 60’s/70’s pulp Sci-Fi. Fortunately we can keep the look of Factorio due the accident, which allows us to destroy and dirty up the machines show many inner mechanical details.
It is also part of the concept that all the machines that the player builds, are based on an existing technology from his home planet. So the machines that we see in the regular game are like 'cheap' versions of the original ones.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/5b9f03e1b252ae3424c07a5694c2d033b8b47e8c.gif[/img]
For the lab, we keep the dome shape and the beams inside in order to keep consistency with the regular laboratory. So slowly the player gets used to the meaning of the shapes.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/afde837e3d4e0e83e0aa820ea8b8c3e9a60ecdb8.gif[/img]
The generator is similar to a substation -more or less-, connectable like a pole but it also produces electricity. Sometimes we really have to invent.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/abe36a1bea112be2c029757d1bdca55d6b641eb4.gif[/img]
This works like an assembling machine. The design is more based in the (yet unshown) redesign of the assembling machines, rather than on the actual 'classic' ones.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/265af7d3d48e5bf39f14822cc36ecabe0c788dbc.png[/img]
These cylinders are like chests. We decided to make them cylindrical instead of a box for this difference in technology level that we are speaking about. The player will recognize them for the shape, color, and they also always have a number printed. You don’t really want to know the meaning of the numbers.
All this new content is a work in progress, and we made these new entities first for the testing of the campaign. Based on feedback with testers we will have the chance to tweak and adapt whatever is necessary. In the case of the introduction, the positioning of the entities can have a large impact on the flow of the gameplay. Once we are more sure of the final placement, we can see how all the pieces will fit together.
The next round for the crash site is the main crashed spaceship, and some other assets that converts the scene into a full composition, more proper for the introduction of the game.
[h1]Mods do crazy things[/h1]
I've heard it many times and said it myself: "It's only ..., there aren't a lot of them in the base game so it should be fine." And then mods come along and bring a slap of reality: if a mod *can* do something a mod *will* do something.
The other week I got a [url=https://forums.factorio.com/72200]bug report[/url] that the game was using a large amount of memory and took an excessive amount of time to exit. After reading over the bug report I had my theories as to why it might be happening but first I needed to reproduce it. A few failed attempts later I got the correct set of mods and mod settings to make it happen. To my surprise (well not really - it happens almost every time with these things now) - it wasn't what I thought it was going to be.
Sprites.
Not the video-texture kind but the internal wrapper class we use to store information about the video-texture. The game was creating an insane amount of them due to what the mod was doing. Specifically: the mod was making a lot of variations of each biter, spitter, worm, biter nest, and spitter nest. Normally that's not a problem - the game can do that easily. The problem came from how worms work. Worms have multiple directions with multiple animations for each direction. The end result is each base game worm creates 7668 sprites. ... "It's only 7668 sprites per worm, there aren't a lot of them in the base game so it should be fine." The base game has 4 worms: small, medium, large, behemoth. This mod was asking the game to make 3020.
The base game:[list][*]188'056 sprites on the main menu[*]1.281 seconds from launch to the main menu[*]245 MB idling on the main menu[*]0.1 seconds to exit[/list]
The mods:[list][*]41'071'478 sprites on the main menu[*]47.395 seconds from launch to the main menu[*]15'791 MB idling on the main menu[*]47.5 seconds to exit[/list]
Many ideas and attempts later (plus fixing all the broken stuff introduced by those changes with the assistance of Oxyd) I had reduced the time complexity of making and destroying the sprites by a significant amount and found that some just weren't needed.
The result:[list][*]23'681'677 sprites on the main menu[*]37.444 seconds from launch to the main menu[*]5'484 MB idling on the main menu[*]2.9 seconds to exit[/list]
A significant improvement on every measurement. I always love working on these kinds of problems because they almost always involve a lot of thinking and experiments.
As always, let us know what you think on our [url=https://forums.factorio.com/72653]forum[/url].