Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Add compat with "Pollution of the Realms" for gas mechanics on "Air quality Module" card from Miscellaneous Project #33

Open
gatoborrachon opened this issue Mar 9, 2021 · 11 comments
Labels
enhancement New feature or request

Comments

@gatoborrachon
Copy link

gatoborrachon commented Mar 9, 2021

Is your feature request related to a problem? Please describe.
First of all, i would like to hear if you like the idea i will show you here, i just wanted to tell you this in case you never considered before (or you never heard about that mod, that's why i named this issue as a Suggestion).

While i was re-reading the different projects you had, i randomly remembered a mod called Glenn's Gases, the most complete version is on 1.7 (with some machines to store, move and use the gas) but it has a Beta on 1.12 (sadly, without the machines).

Describe the solution you'd like
The card i re-readed was about Air Quality (specifically, the "Coal veins can explode" feature) and as i said, i remembered that old mod.

It is based on an API called Gases Framework, i admit that i never played with it before (the 1.7 version, the 1.12 seems to be functional but i can't really tell you, there are no videos about the 1.12 version), but i would like to show you some videos about it, and if you like it you can consider adding some compat (it is like an alternative to Pollution of the Realms, but it doesn't has any pollution-related mechanic, or at least in the 1.12 version)

Describe alternatives you've considered
In case you don't like it, you can implement it as you had in mind.

Additional context
The videos:

https://www.youtube.com/watch?v=g02vbpVqP38

https://www.youtube.com/watch?v=5H7r-n_mfdw

@gatoborrachon gatoborrachon added the enhancement New feature or request label Mar 9, 2021
@gatoborrachon
Copy link
Author

gatoborrachon commented Mar 9, 2021

EDIT: mmm, it seems that the 1.12 version has no documentation (i can't even find the source code), i will ask to the author of that mod and see if he will give us that info

EDIT 2: i found this repo (for 1.12): https://github.com/trentv4/GlennsGases
but i don't see activity since a year, i already openen an issue on that repo, lets wait

EDIT 3: it seems that the mod is dead, sorry, tell me if i need to close this issue or if you will give it an oportunity to that codebase:

The mod has been discontinued. If you want to fork it and update, feel free! I believe I left the codebase in excellent shape.

trentv4/GlennsGases#6

@Enginecrafter77
Copy link
Owner

Whoa. Well, thanks for the suggestion anyways. That "air quality" thing there was just an idea suggested by someone before, but I think there are more important things to work on right now (e.g. the heat mechanics rework). Unfortunately, I can't find time to actually work on this project lately, hence the lack of activity. That being said, I will try to look into this when the time comes.

@gatoborrachon
Copy link
Author

gatoborrachon commented Mar 11, 2021

ok no worries, i will let this open, but as i said, sadly the mod is dead, and i guess that you don't want to invest your time onto another project.
close this as soon as you see that it will not worth the effort

@woegarden
Copy link

woegarden commented Apr 20, 2021

https://www.curseforge.com/minecraft/mc-mods/pollution-of-the-realms

suggested alternative?

edit: just something to look into

@gatoborrachon
Copy link
Author

suggested alternative?

well, it could be a better option since the mod from my suggestion is dead, it is not as realistic as Gases Framework but if Enginecrafter77 is ok with it, i guess all it's fine

also, i just want to add that recently the HBM's Nuclear Tech Mod for 1.7.10 implemented its own Gases (like chlorine, as far as i know), so when that is ported to 1.12, why not adding compat with it too? (once you implement the "Air quality Module")

@Enginecrafter77
Copy link
Owner

Well I have checked out Pollution of Realms, and although I didn't really try it out in a real installation it seems pretty much complete to me. I mean, I don't want to seem like dodging work (ugh I really need to find some time for this project again), but Pollution of Realms seems to just fill this gap so I don't really see the need to reinvent the wheel in this mod. That being said, if I would be to re-implement the "Air quality module" some day, it would probably come at the bottom of the TODO list. Maybe some compat with PoR would be fine, but I somehow fail to see what compat should be made there.

@gatoborrachon
Copy link
Author

ok, let me change the name of the issue

@gatoborrachon gatoborrachon changed the title [Suggestion] Use Gases Framework for gas mechanics on "Air quality Module" card from Miscellaneous Project [Suggestion] Add compat with "Pollution of the Realms" for gas mechanics on "Air quality Module" card from Miscellaneous Project Apr 23, 2021
@woegarden
Copy link

will shoot ideas when i think of them and edit this comment. thanks so much for listening to player input, means a lot.

@woegarden
Copy link

https://www.curseforge.com/minecraft/mc-mods/environmental-rads

something to note, seems very early in development, might reach out

@gatoborrachon
Copy link
Author

gatoborrachon commented Apr 27, 2021

if we talk about Radiation systems, HBM's Nuclear Tech Mod has the most polished one

Proof:

Drillgon:

Threw together a proof of concept for this idea. It doesn't persist or do chunk loading yet, but it seems to be pretty fast and appears to work.

radsystem1.mp4
radsystem0.mp4

Drillgon:

It could always be multithreaded to be faster, too.

Drillgon:

Alright, chunk loading and persistence is pretty much done. I'll add this radiation system as a config option in the next 1.12 update.


Someone else:

If a player entered that box with the barrels, will there be far higher radiation levels waiting for them in there?

Drillgon:

Yeah, but not super high. It's still artificially limited by NTM's limit system (75 for these barrels), but it will go up to that in there, and the radiation doesn't just spread out like it usually does.


Someone else:

how exactly did you do this, with the 16x16x16 thing you mentioned?

Drillgon:

I read about a flood fill visibility system the MCPE devs used to reduce overdraw, and thought I could apply it to this. When a radiation resistant block is placed, the 16x16x16 sub chunk is marked to be recreated. At the end of the server tick, it flood fills the chunk creating pockets that are completely surrounded by radiation resistant blocks. If there are no areas completely surrounded, the whole thing is treated as a pocket. Each pocket has the indices of pockets it's connected to in other chunks (also found when doing the chunk flood fill). If there isn't a radiation chunk there, it adds -1 as an index and only loads it when it bleeds radiation into it so it doesn't get cascading radiation chunk generation. So there's a whole data structure where I have a map of worlds to world radiation data, which has a map of chunk positions to chunk radiation data, which has an array of 16 high sub chunks, which each have an array of pockets and, if there is more than one pocket, a 16x16x16 array representing each block in the sub chunk that contains references to the pocket at each block (this isn't necessary for chunks with only one pocket because each block will point to the same pocket, which probably saves a lot of memory because most chunks only have 1 pocket).

It only updates the chunks that actively have radiation in them and are loaded, so it's actually not that hard on the CPU most of the time from what I've tested so far. The most intensive thing is the flood fill, and that's only done when it needs to be. I still haven't done large scale testing with it yet though. Imagine if this was a custom air block, that would be horrible for both mod compatibility and performance since each air block would need updating.

unknsown

@gatoborrachon
Copy link
Author

Well, after thinking this a bit, the main reason why something like Air Quality would be implemented in Survival Inc. is to affect the healt of the player, and since Pollution of the Realms already adds negative effects to polluted areas, why Survival Inc. should implement something in its side?

pollution doesn't affect Body Heat, Wetness or Hydration in an intuitive/practical way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants