Skip to content

Roadmap

makamys edited this page Aug 24, 2021 · 3 revisions

Brain dump of future plans. There's no guarantee any of this will be implemented.

General

Port to new versions

The mod could be ported to 1.16.5 and such. It's very unlikely I'll do this myself. If this is done, the code should be refactored to make as few references to Minecraft classes as possible, referencing abstractions instead. This way code can be shared between game versions. See ATextFormatting as an example.

The question with this approach is how performant it would be. Blocks, for example, would need to be wrapped in instances a hypothetical ABlock class, which would probably increase the amount of object allocations significantly. Maybe it's not a concern though; the only way to be sure would be to try it and profile it!

Mods I know that use abstractions like this to share code between multiple platforms:

Document the soundpack format

This is long overdue... But it would probably make more sense to do this after the below overhaul.

Sound engine improvements

Make soundpack JSONs nicer to work with

When writing Zen, I had to copypaste a lot of code and setting up the conditions was a pain due to the unwieldy system MAtmos uses. It would be nice if the database format was revamped to be less verbose and easier to work with.

An example

Here's the "sea" machine rewritten in a proposed new syntax (using HJSON, now we can use comments!)

set: {
	// No conditions needed, you can define the condition inline. But you can still reference conditions.
	largeWaterL: scan_large_p1k.water > 60 && _RAYCAST_SCAN_OUTDOORS && !_FLOOD_SCAN_DEEP_INDOORS
	// You can reference other sets too!
	largeWater: largeWaterL || scan_small_p1k.water > 100 || (scan_raycast.water > 72 && scan_raycast_w.water > 2500)
	air20L: scan_large_p1k.air > 200
	sea: scan_large_p1k.water > 100 && air20L
	underwater: ply_general.under_water == 1 || (scan_raycast_above.water > 0 && (scan_large_above.water > 15000 || scan_small.water > 200))
}

machine: {
	generic: {
		fadein: 2.0
		fadeout: 2.0
	}
	
	sea: {
		extends: generic
		condition: sea && largeWater && !underwater
		stream: [
			{
				path: matmos_hl/loop/water_large.ogg
				vol: 0.08
				pitch: 1.0
				looping: true
				pause: false
			}
		]
	}
}

This is 30 lines. The same thing in the currently implemented format took ~112 lines!

Analog machines

Right now the conditions for machines are binary. If a machine is set to play if more than 100 water blocks are detected, it won't play if there are 99 blocks, and it will play at full volume if there are 100. The soundscape could be made more dynamic if this worked in an analog way instead. For example, the minimum required value could be set to 50, and the maximum to 100. Then the machine would play at 100% volume if there are 100 blocks, 50% if there are 75, and so on.

It's a question how to make this work with machines that have multiple conditions, though. We'd have to use some kind of analog logic where AND takes the minimum of two conditions, and OR takes the maximum, probably.

Support a way to add sounds for machines?

Like IE multiblocks (see #13). I don't think the engine has a good way to do this currently.

See Electrical Age for a mod that does machine sounds nicely (though it has issues; if you have many machines running like in the autominer room in this map, sounds can cut off because there are so many of them playing.