Posted by Ernestas, V453000, Albert, Rseding on 2019-06-28

Crash site: First state Ernestas, V453000, Albert

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:

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.

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.

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.

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.

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.

Mods do crazy things Rseding

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 bug report 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:

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

The mods:

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

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:

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

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 forum.