We finished a week that was a perfect storm of tragedy and sickness hit the team this week so most of the team have been out of the office. Still, we were able to push some key areas but the bigger changes tend to get left to the side until all hands are back on deck.
Intermittent Stuttering
Last month we had some major progress on key areas, such as dramatically increasing rendering distance for terrain and how terrain is generated. Great stuff! But as we increase the amount of work the game does - it increases the amount of memory used and in particular the turnover of that memory.
As we are using Unity, and specifically C#, this memory is managed by the game engine itself. As you no longer need information this memory is cleaned up. This process is called "garbage collection", and when this occurs if too much has to be cleaned up at one time - you get stuttering.
This is most noticeable as a stutter or frame-skip every few seconds (or more of less regularly). There are many areas where we have favoured easy to read and understand code over well performing and memory managing code - because it dramatically increases the speed of development. But a few of these key areas are so bad they have to be cleaned up.
We identified jetpacks, and terrain generation, as the two major problems we can easily deal with to reduce stuttering. Jetpacks had some solutions this week, so you might notice improvements if you had stuttering. Rest assured, we'll be continuing our work on that next week and beyond. Garbage collection is a problem we will tackle through the entire length of the project, and probably beyond.
Scenarios
You may have noticed a new Scenarios button on the main menu. Scenarios as they currently exist, are a more structured way to play the game. They're not intended to replace the current survival mode, but instead use the existing systems to let people focus on particular areas of the game, or play through stories authored by you and your fellow Stationeers. Instead of generating a new world, scenarios take place in a pre-authored one, like loading a saved game. From there the player is given a set of tasks, much like the tutorial. Once these tasks are completed, you can progress onto the next mission stage.
One feature of this system that's not immediately obvious, is that these stages and tasks can be authored by players, applied to their own saved world and uploaded to the Steam Workshop. We expect to be constantly expanding this system to introduce new task types, actions that can be triggered by certain tasks and random events etc - so if you have something in mind you would like to add to expand a scenario you're working on, swing by the #suggestions channel in Discord and tag @Heightmare.
Currently, the first official scenario 'Escape From Mars' is only available via the Steam Workshop - but once the last few bugs are ironed out it'll get added to the base game. Once this happens, the workshop version will serve as an example for how you can author your own.
Auto-Rotate Everything*
Auto-rotate support has to be manually added to every structure in the game we want it to apply to. Luckily, we're reaching the end of this piece of work and barring a few outliers, you should be able to use the auto-rotate tool (C by default) to place almost anything in the game.
New Plants
To give you some early-game food growing options that weren't dependent on sunlight, we've added Mushrooms to the game. They'll give you roughly the same nutrition as an uncooked potato, but recipes will be added in time. Rice and Pumpkins both require light, but have varying growth speeds and nutrition values.
Version 0.1.1586.7476
- Added Autorotate support to almost 50 structures, meaning it now supports almost all of the structures currently in the game.
- Improved Autorotate to work with grid objects that have rotation restrictions.
- Optimization Identified Jetpacks as the cause of a lot of memory allocations and made several improvements.
- Added Scenario Menu. No official scenarios are included yet, but support for workshop scenarios has been enabled. This will be better detailed in the next patch and documentation on how to build your own scenario will be provided in the #modding channel in Discord when it's ready. The Scenario button will be disabled if no valid scenarios are detected in your enabled mods.
- Added Pumpkin. Provides a lot of nutrition but grows slowly. Can be turned into Pumpkin Pie with other ingredients.
- Added Rice. Grows fast but does not provide much nutrition. Will be used in future recipes.
- Added mushrooms. Do not require sunlight to grow, but take much longer than other plants to mature. Gives roughly the same nutrition as an uncooked potato.
- Fixed AreaPowerControl consuming power but not adding that power to the inserted battery if it was powered off.
- Fixed Log and Pow logic math functions were using Input2 twice, instead of Input1, Input2. Should now be using both inputs correctly.
- Fixed credits button taking you to the scenarios menu.
- Fixed Index Out Of Range error caused by GetPercentageString if a status update percentage went over 200.
- Fixed ConsoleMonitor Autorotate bug.