1. Mindustry
  2. News

Mindustry News

v7 Progress Report

Introduction


As many have noticed, it has been many months since the last pre-alpha release, and nearly a year since the last stable release. To begin, I will attempt address some common questions about this release, and the status of Mindustry in general.

[h3]Why is this update taking so long?[/h3]

Up until this point, all (pre-classic) Mindustry updates have been incremental additions or changes to existing content. Everything I've made has been designed to fit in with existing blocks on the Serpulo planet campaign.

In v7, this is no longer the case - I am adding an completely new planet - Erekir - with its own unique set of blocks, environment tiles, units, turrets, transportation, etc. Aside from certain items, everything is different - there is no re-used content from Serpulo, not even walls or conveyors.

This is a little bit like making the entire game over again. When it is complete, it will be the biggest single content update in Mindustry history. To give you an idea of the content volume, there are currently 70+ new build-able blocks that have been added when compared to the last pre-alpha, with more than 130 new blocks added total - and I'm still far from done.

In addition, I am making significant changes to many various mechanics (again) - the campaign, unit control, and logic, for instance. Keep reading for more information on these topics.

With all of these factors combined, this update will take much longer than normal to complete. Please be patient.

[h3]When will v7 be released?[/h3]

I really don't know. While I already have a fair bit of content complete, I would estimate that it's only half done, if even that. Many mechanics are still in the "prototype"/"brainstorming" phase.

All I can say is, don't expect it anytime soon.

[h3]When is the next pre-alpha/alpha/beta release?[/h3]

As mentioned above, I'm still early in the process of implementing content/mechanics for Erekir - it is not ready for testing, and will likely not be for a while to come. I would like to have the entire campaign complete before I even release an alpha build.

In short: Again, I don't know.

Erekir Content Preview


Below are some sneak peeks at content I've been working on. This is by no means a comprehensive list. Keep in mind that these units can (and have) changed significantly over the course of development - the final version may be radically different, or removed entirely!

Note: Many of these GIFs are taken from the #dev-previews channel on the Mindustry Discord. Consider following that channel for more frequent updates.

[h2]Units[/h2]

The T1 core, and its corresponding core unit. This unit can repair blocks, but does not have any offensive capability.


Shielded walker unit. Only blocks projectiles from the front. Very much WIP - weapons and legs will likely undergo significant changes prior to release.


Small insect-like unit. No special abilities. Demonstrates a new unit animation system.


Hovercraft. Missiles are technically units that can be targeted, and will follow the player's cursor.


Yes, I'm finally introducing tanks. This further demonstrates the capabilities of the new unit animation system.

A smaller tank variant.

[h2]Blocks[/h2]

As mentioned earlier, Erekir will have a completely different set of blocks from Serpulo. The production/crafting tree is still a work-in-progress, so I will not be showing it here, but here's what some of the distribution systems look like at the moment:

Ducts transporting items to Duct Routers. These routers only accept from one direction, and can double as sorters when an item is selected.


Duct overflow gates. Only accept from one direction.


Duct bridges. No linking or weaving allowed; output only in one direction.


Duct unloaders. Only input and output in one direction.


Beam "drills", connected with new orthogonal power nodes. Note that, while there are still certain ores on the ground in Erekir, beams are the primary way of gathering resources.


Unit Control


As many of you may know, unit control in Mindustry is terrible. As of the latest available version, there are four ways of controlling units, all of them with significant flaws:
  1. Manual control: This is the obvious and most common way of controlling units; while effective, it only allows for controlling exactly one unit. Furthermore, once the unit ceases to be controlled, it resumes its normal AI, making this method useless for moving groups of units anywhere.
  2. Formations: An unfinished, unwieldy and broken system. Not only do units constantly get stuck on terrain when in formation, but they can frequently bump into the main unit. Formations are also lost on commander death, subject to numerous unit type limitations, and feel extremely laggy even on low-ping servers.
  3. Command Centers: Unwieldy, complicated, lacking precision. While they are effective to some degree in performing basic tasks like grouping together units, they are very imprecise (global control), tedious to manage (require building a block), and painfully limited (are unable to order units to attack specific targets).
  4. Logic: A cursed creation. While technically the most powerful unit control method, it is orders of magnitude more complex than anything else in the game. Commanding units with logic either requires copy-pasting schematics you don't understand, or spending hours learning a bespoke programming language with very sparse documentation. Neither of these are acceptable. Even beyond the complexity, logic unit control is incredibly clunky, un-intuitive, and subject to limitations (like lack of proper pathfinding). Players should not need to know how to program to play this game properly.



Something had to be done. Thus, I have made the following changes:

  • Formations have been removed completely.
  • Command centers have been removed.
  • No logic blocks are available on Erekir. EDIT: Based on feedback, I will definitely be keeping it on Serpulo.
  • A new RTS-like unit control system has been introduced.


I've been hinting at adding them for a while, but after experimenting with the mechanics, I am confident that RTS controls are the best way forward.

Here's how this looks in-game, so far:



Now, I know that this raises numerous questions, such as:

  • How will this affect PvP?
  • Will units have sub-commands ("fire at will", "patrol"), like some other RTS games do?
  • Will builder/repair/miner units be controllable as well, and if so, how?
  • How will build assistance work without formations?
  • Does this mean that fog of war will be introduced as well?
  • How does the player switch between building with their unit, and commanding?


I will not be answering these questions, as I don't have a good answer to most of them - and even if I did, my answers could change over the course of development. All I will say is that, at the moment, I am trying to keep things as simple as possible. In my testing, even the current bare-bones RTS control system is worlds better than anything the game had previously.

Logic "World Processors" / "Map Scripting"


This is a relatively minor feature I've been developing for use in campaign maps. Essentially, they are processors for scripting maps. These can only be placed or interacted with in the editor, and are for map-makers only.

World processors can currently do the following things; I may add more functionality as necessary:

  • Spawn units.
  • Set blocks.
  • Get blocks/buildings at any location.
  • Create explosions.
  • Show the player notifications or mission objectives.
  • Pan and zoom the camera, for cutscenes.
  • Sense any block info without linking to it.
  • Set a limited amount of game rules, such as lighting, build speed and waves.


World processors are meant to be placed in a corner of the map; while they are blocks with teams, they cannot be accessed, shot, broken or hovered outside of the editor. Note that they are simply logic processors with special instructions - this is not a new language or scripting system.

Below is a simple demonstration of a "cutscene" implemented with a world processor. Note that the trigger is a button for simplicity, but in most cases, you would have the trigger be something else out of the player's direct control.



Some examples of what can be done with world processors:

  • Display a special objective for the player, e.g. "destroy building X", sense when the block is destroyed, and perform actions based on that event.
  • Spawn custom waves in any location based on time, or any other variables.
  • Activate enemy base functionality only when the player has achieved a certain objective, like surviving X amount of waves.
  • Day-night cycles in custom maps.
  • "Defense" objectives wherein the player core is destroyed if they fail to prevent a different block from being destroyed.


Internal/Modding API Changes


In addition to all of the above, I've also been working on improving the modding API, fixing inconsistencies, and adding more features for modders to utilize. Unfortunately, this also comes with the downside of breaking the overwhelming majority of older mods - after discussing this with the community, I've come to the conclusion that this is the only way forward.

Here are some examples of changes I've made so far - everything is still subject to change. If you're not a modder, feel free to skip this section.

[h3]Weapon/Unit/Turret Animation System[/h3]

Turrets, units, and weapons now support animation parts. These can rotate or move individually depending on their progress value, which is usually the weapon warmup or reload.

Close-up of the tank shooting animation:

Code (minus the blades, which are defined in a loop):


[h3]Weapons, Turrets and Units[/h3]

Weapons and turrets have long suffered from an inconsistent feature set and API. I've attempted to improve the situation by implementing a unified system for bullet patterns and shooting behavior.

This means:

  • Turrets and units can now have an arbitrary amount of bullet barrels.
  • Units now support duo-like double-shot patterns.
  • Swarmer and Cyclone turrets now correctly have 3 true barrels instead of randomly spewing bullets everywhere.
  • Java/JS mods can easily define complex bullet patterns for their turrets without creating subclasses of Turret or Weapon.


As an example, here's what the new Swarmer bullet pattern looks like:

'shoot' is a field of each Weapon and Turret that defines its bullet pattern. This defines a 3-barrel shot pattern.

Result:

It is also possible to chain together shot patterns, to make things like this (demonstration only!):


Bullets can be created with custom movement callbacks. This pattern, for example, creates two bullets that move in a helix:


[h3]Consumption & Generators[/h3]

The block consumption system has been rewritten to allow for:
  • Multi-liquid consumption
  • Multiple consumers of the same type, e.g. two ConsumeItems
  • Filter/efficiency consumption that does not depend on specific block type

Most old generator classes - SingleTypeGenerator, BurnerGenerator, ItemLiquidGenerator and DecayGenerator - have been replaced with a single class, ConsumeGenerator. As an example, here's what the new definition for the combustion generator looks like:



[h3]Drawing[/h3]

The DrawBlock system has been expanded to support more block types, including generators, pumps and turrets.

This means that it is no longer necessary to extend these classes for custom drawing behavior. All drawing-specific GenericCrafter subclasses (Smelter, Cultivator, ...) have been removed. In addition, all DrawBlock subclasses have been made modular.

For example, this is how a smelter draw implementation can be defined on a GenericCrafter (or generator):

Build 127: v7 Pre-Alpha Now Available

Build 127, the first pre-alpha release of v7, is now available on the v7-testing Steam branch.

To opt in, right click Mindustry in your Steam library, then click Properties -> Betas -> Select v7-testing in the drop-down box.

Note that this is a highly incomplete version of v7. Most content planned for v7 is unfinished, and will not be included in this release!

Ideally, this version should be more stable than 126, but without a release, I cannot say for certain.
The current "stable" version (126.2) contains severe bugs & balancing problems that have been addressed in this release. Due to these issues, I may have to split the v7 update into two different parts; whether or not such a split release happens at all depends on how long it takes me to finish the "interplanetary" v7 content.

Consult the Mindustry Trello for more information on plans for the full v7 release.

Changelog


  • Countless bugfixes
  • Countless unit & turret balancing tweaks
  • Optimized fire visuals
  • Made mass driver output speed more FPS-independent
  • Made phase bridges overdriveable & more reliable at lower FPS values
  • Reorganized core items & guardian bar UI
  • Added red outline for guardian units
  • Added more options to editor filters
  • Added editor filter copy-paste buttons
  • Added display of current status effects to Ui
  • Added 5 new support naval units
  • Added payload void & source for sandbox
  • Added a payload mass driver equivalent
  • Added polygonal core protection rule
  • Added core-capture rule for PvP/attack maps
  • Added one experimental core-capture PvP map
  • Added lights for most effects & bullets
  • Added new T2 repair point
  • Added controls to deposit current unit into payload block directly
  • Added schematic tags
  • Added client-side "ghost building" sync when playing multiplayer
  • Campaign: Reorganized sector icon selector, added support for content sector icons
  • Updated packaged Java version to 16
  • Made units unstackable in most situations
  • Mods: Support for loading classes from other JARs as dependencies
  • Mods: various API changes, see https://mindustrygame.github.io/wiki/modding/7-migrationv7/ for details
  • Logic: Added inverse trig operations
  • Logic: Added content ID lookup & wait instructions
  • Lots of other stuff I probably missed

Build 126.2 Released

  • Fixed bridges being planned without unlock in campaign
  • Fixed player moving slower on servers with status effects
  • Fixed player not respecting formation speed on servers
  • Fixed separators consuming power when idle
  • Fixed logic blocks not saving buildings on reload
  • Fixed rare door placement crash
  • Fixed logic units being able to take/remove items from any team block
  • Improved power node link preview
  • Reduced Nova range slightly
  • Added list of status effects to core database
  • Added status effect display to bullets (icons contributed by @sk7725)
  • Added block info keybind
  • Added bullet stats for continuous laser turrets (e.g. Meltdown)
  • Made bridges autolink when dragging multiple lines
  • Disabled logic unit building for servers by default
  • Internals: Removed all code for disposing resources on exit; this should be handled by the OS now
  • Logic: Made `dead` sensor return 1 for `null`, to simplify validity checks
  • Logic: New text parser; supports defining and jumping to labels with `name:` instead of numbers
  • Logic: Added support for negative draw coordinates
  • Logic: Disabled packets for config; may desync, but will help reduce lag
  • Campaign: Various tweaks to make background simulation more accurate

Build 126 Released

  • Various minor bugfixes
  • Made water extractor use metaglass for building, to be consistent with pumps
  • Added automatic conveyor/conduit bridging over obstacles
  • Added 'defender' AI for Oct; follows nearby units
  • Cores can now replace most transport blocks; turrets can now replace each other
  • Improved bridge & power node linking previews
  • Buffed Segment & Vela
  • Added logicUnitBuild rule; Sandbox server owners are advised to disable logic building with `rules add logicUnitBuild false`.
  • Logic: Changed default unit control state to be 'idle', not 'stop'
  • Logic: Made config / unit building instructions accept buildings as configuration to copy their config. This allows for self-replicating processors.
  • Logic: Added sensors for `dead`, `controller`, `size`, `boosting`
  • Logic: Made `controlled` return ctrlProcessor/ctrlPlayer/ctrlFormation/0 depending on controller type
  • Logic: Deprecated "commanded"; use `controlled` instead! This sensor will be removed in a future release.
  • Logic: More hints

Build 125 Released

  • Fixed enemy power nodes getting linked w/ allied ones, leading to buggy power behavior
  • Fixed chat not working when paused
  • Fixed 128+ cores on map breaking servers
  • Fixed editor breaking building links on resize
  • Fixed onscreen green lines occurring for specific GPUs/drivers
  • Made turrets/units take enemy hitbox size into account when targeting
  • Made builder/repair AI flee from enemies when idle
  • Made data export zip include folder entries and strip absolute file paths this may fix some issues with external archive programs
  • Added rules for unit cap control [Contributed by @TranquillyUnpleasant]
  • Added new splash damage algorithm should lead to faster & more accurate explosions, but may require balancing
  • Added log file for data-loading events should assist with fixing the data wipe bug
  • Mods: Fixed trailing commas in hjson files being parsed as part of unquoted strings
  • Mods: Many various bugfixes for json effects
  • Logic: Added tooltips to most instructions/operators
  • Logic: Added `===` operator for exact comparisons, e.g. null checks
  • Logic: Made 'invalid' operations such as sensing null blocks or 0/0 return null instead of 0
  • Logic: Fixed units disappearing when moving to infinite position
  • Logic: Added sensor for force projector heat


For Build 125.1:

  • Fixed player health bar glitching out at negative health
  • Fixed large power nodes sometimes not connecting to placed blocks
  • Made unit payloads draw with correct cell colors
  • Made all mods automatically get disabled upon client startup crash can be disabled in settings
  • Decreased impact reactor explosion radius
  • Decreased projectile building splash damage for smaller radii
  • Decreased splash damage radius for many various projectiles
  • Logic: Added tooltips for draw operations
  • Logic: Made invalid sensors for units return `null`
  • Mods: Stricter null checks for JSON mod objects
  • Mods: Added support for `abilities:` and `requirements:` in JSON unit definitions
  • Mods: Added support for `DrawBlock` parameters in JSON
  • Mods: Added support for FQCNs and modded class types in JSON