Skip to content

Instantly share code, notes, and snippets.

@AtomicBlom
Last active August 28, 2015 12:00
Show Gist options
  • Save AtomicBlom/7390e804a5d0eb41eb9a to your computer and use it in GitHub Desktop.
Save AtomicBlom/7390e804a5d0eb41eb9a to your computer and use it in GitHub Desktop.
Steam TODO

Basic Concepts

  • Steam prefers going up before it goes across and is finally forced downwards.
  • Condensate (water) prefers falling down, then filling sideways, before it is forced upwards.
  • If there are more than one exit for water to go upwards, it should try to go upwards evenly in all the pipes
  • If steam is pushing down more forcefully on one exit, the water will prefer other exits

In order to meet these concepts, we:

  1. Calculate the topology of the Steam Transports
  2. Where there are parts of the topology that are horizontal, and are filled with water, we calculate the volume of water in all adjoining blocks that are full (including up and down)
  3. We can then calculate the ideal distribution of water.
  4. Adjust the distribution of water according to steam pressure in the exit pipes.

TODO

  • Create API for steam (A set of interfaces that describes the steam transport, the same API that SteamNSteel uses will be available to other mods)
  • Implement Tile Entities using API (A minimal concept of tile entities in C#)
  • Implement the SteamTransport class (This is the class that tracks the current contents of a tile entity)
    • Saving of SteamTransport
    • SteamTransport connections can be disabled on sides
  • Implement the SteamTransportRegistry class (This tracks instances of SteamTransport, independent of the blocks/tileentities they are for)
    • Register a SteamTransport
      • Calculate which topologies need to change
    • Unregister a SteamTransport
      • Calculate which topologies need to change
  • Implement the JobManager
    • Implement the background thread queue (Used for anything that can be backgrounded)
    • Implement the mincraft tick queue (Used for world writes)
  • Implement Steam Transport Jobs
    • Recalculate Topology Job
    • Aggregate Topology condensate state Job
      • Calculate Condensate Sections (Break up the topology into sections of contiguous condensate)
      • Calculate Condensate volume (Calculate how much water is in a section)
      • Calculate downward pressure on Condensate exits (How much steam is pushing down on the condensate)
      • Calculate the ideal levels of condensate
    • Transfer Contents Job
      • Transfer Steam Up
      • Transfer Steam Across
      • Transfer Steam Down
      • Transfer Condensate Down
      • Transfer Condensate Across
      • Transfer Condensate Up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment