A reworked, realistic, and simple oxygen system (no, really!)

Does this sound like a good oxygen system?


  • Total voters
    5

Aviin

Member
Apr 7, 2013
14
2
3
48
Let me start by saying I know very little about coding in Java. Queue groaning sounds here as everyone thinks to themselves, "Easy for this guy to give us an idea when he has no clue about how to code it!" Here's the thing, though; this is something I could ALMOST code myself right now, and I really mean ALMOST, even with my meager Java skills. What I do NOT know is how taxing this would be on the Minecraft engine (more on that later; I suspect it is a non-issue, honestly). At any rate, this is my concept of an entirely reworked oxygen system that I think might be simpler in the end (from a player's perspective, certainly, and likely from a coding standpoint, too!).

First, let me establish the block functionality that would be needed to be implemented (nothing too complex):

- The oxygen distributor block needs to simply spawn GC breathable air blocks in any block 0 (vanilla "air", i.e. the stuff that kills you in GC dimensions) immediately adjacent to it. This system would entirely eliminate the oxygen sealer block. Perhaps set a threshold of some kind that says it needs to have x amount of oxygen being fed to it by a collector before it'll kick out breathable air block.

- The existing GC breathable air block is made to spread in the same way that grass spreads to dirt, but in this case, breathable air spreads to vanilla air (block 0). It also needs to, on creation, check for open sky above it. If sky is seen, it instead becomes the next block on this list ("Vacuum" block)

- And here is the key to it all: A new GC block that works in all ways like block 0 does in GC dimensions except that it spreads to breathable air at a very fast rate (much faster than breathable air block would spread to block 0). It would also need to have a decay functionality that causes it to decay after a medium-ish rate to block 0 (x number of seconds go by and it becomes block 0). For the sake of this description, I'll call it Vacuum block.

Now imagine this system in action...

We build a sealed room on the moon and get a distributor running in there. It pumps out air that spreads throughout the room and after a bit of time, the entire room is filled with oxygen (breathable air block will spread to replace block 0, remember, in this reworked system).

Now let's walk over to one of the outer walls and break it open. The air starts spreading out onto the surface. But wait, sky is overhead! The Vacuum block rushes in, obliterating the breathable air. The room has decompressed.

After a bit of time (that amount of time being based on how quickly the Vacuum block were made to decay to block 0), and our distributor would start working again (once the vacuum around it has decayed to block 0, breathable air would begin spreading again).

You would end up with a room that, unless sealed, would keep burping out all it's air. It's not quite the smooth continuous loss an unsealed room would create in a "real" setting, but the effect would be close, especially if the spreading chances are fairly high for the breathable air and vacuum (vacuum always being higher so it can overwhelm the distributor and clear the room of an atmosphere).

This has the HUGE advantage of being able to easily fill an entire structure with breathable air. One distributor could do it, but more of them dumping more oxygen into the system would be faster (more breathable air "seed" locations), which makes sense. It also eliminates the competing systems that exist now (sealers versus distributors).

The problem, as I said, comes in how taxing the breathable air spread would be on the engine. Grass never seems to cause me any noticeable lag at all when spreading, so I suspect that as long as the spread chance isn't too insanely high (too many blocks changing too rapidly), it would have minimal impact on performance.

As I said, this is ALMOST something I could pull off coding myself (I'd need to learn a bit about Forge first) and I really think it would work GREAT.

I would LOVE to hear what you guys think of this.
 
  • Like
Reactions: cur25

paper_beemo

Member
Mar 24, 2013
30
5
8
no need because its scripted a different way on the moon is air everywhere

This is the code in lua -- Kinda i know
Code:
while true do
local player = game:findFirstChild(LocalPlayer)
if player.D == 21 then
zzz = GetAirbubbles()
if not player(Cancolding) = zzz then
player.Health = player.Health - 1
pls not zzz is a script somewhere in the mod the () calls it
this is not from the source or is not thats why i done it in lua
 

Aviin

Member
Apr 7, 2013
14
2
3
48
Yes, vanilla air (block 0) is everywhere on the moon. GC breathable air is a different block ID aleady. On the moon, vanilla air is damaging to you if you are in it. The breathable air block as GC is right this second works just like vanilla air. As I said, I propose that the breathable air block spread to block 0 (vanilla "air") in most circumstances (as outlined in my first post). By creating a new vacuum block that spreads onto GC breathable air when sky is above any newly created breathable air block, you create a way to DESTROY those air blocks. If done in a way like I laid out above, you get a dynamic system that causes air to be wiped out by hull breaches AND you get a way to "fill up" structures with air (because it spreads to block 0). By having the intermediary vacuum block that eats air but decays, the base state (block zero, which in GC dimensions represents the baseline vacuum state) gets restored and self-resets, opening back up the space to be able to be filled again with oxygen. No boundry checks for sealers, no weird uncontained air bubbles, etc.
 

paper_beemo

Member
Mar 24, 2013
30
5
8
so just invert the air on the moon ur saying... hmm seems harder maybe make it more transparent.
 

cur25

Member
Mar 13, 2013
25
5
3
37
I really like this, but I think there are 2 issues.
What if you have a roof completely covering your GC breathable air, but without walls? There would be any open sky detected so no GC breathable air block would be changed into the Vacuum block, which means the GC breathable air block just stays.
I think it's also pretty taxing to let blocks continually check for other blocks above them.

What about a system where when GC breathable air touches block 'o', the GC breathable air turns into a vacuum block (similar to how when water touches lava it becomes cobble/obsidian). Keep in mind I don't know how to code, so this might be a terrible idea.
 

Jake

Member
Mar 11, 2013
58
3
8
29
well the thing with the roof covering it is that eventually it would find its way to the edge of just a roof, and then cause the effect that was described.
 

Dladak

Member
Apr 20, 2013
9
0
1
33
And if you just want to revamp the actual system:

- add a more efficient collector. Like 20 times more. Also this collector does not make leaves decay
- add an oxygen pipe capable of withstanding massive ammounts of oxygen (it's basically the same one, but bigger)
- add a sealer capable of sealing larger rooms

And then the current system would be peachy:
- oxygen farms are possible
- if a leak occurs somewhere, it will de-seal the room and any rooms connected by something else than airlocks. With several BUD switches and torches you could actually make a leak detection system to automatically close the airlocks.
 

Jordan

Member
Apr 19, 2013
10
0
1
36
I have an idea and you can just make it simpler like o2 collecters dont eat up tree leafs blocks on trees but just collects the o2 so you never ran not of o2 and the distributor in open spaces still make that bubble thing but cost a lot more o2 but in seal space makes air though out and cost less o2 and sealer work as a tool to seal the air in. in case you put a hole in the wall or something so you dont loss all your o2 because it take time for collecters to get fill with o2
 

Share this page