RealFluids

Discussion in 'WIP and Development Status' started by mindless728, Feb 22, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    mindless728

    it doesn't make any files until after there are changes to the block data and after either the cache is full or the server stops
     
  2. Offline

    Maeyanie

    I ran into the same thing once. And it's strange, because looking at the code, there's really no way it can possibly fail. I added some debugging code to BlockStorage, recompiled it, and then it suddenly started to work, despite the fact I hadn't really changed anything. Was very weird.
     
  3. Offline

    mindless728

    well considering i can't even get this to happen in my testing (fresh downloads of everything), i find it very weird

    Status update: programming of the new version is coming slowly as i have been moderating on a server and writing some private plugins (and updating others), its for a good friend of mine so its ok, though it is looking like i might be able to get each fluid its own thread (as each fluid type will get its own PluginBlockStorage object)

    What should I add?: this is quite obvious, other than working buckets (which is sucking due to inventory issues), what else do you guys that have been following this want, the new version should allow for custom fluid types easier and allow me to merge ClassicFluids and RealFluids quite nicely (1 less plugin to update.....yes!)

    Bugs?: Wondering if you have found any huge bugs that need to be addressed (other than the quite horrible performance IMO), also minor bugs would be nice, as with the recode i might be referencing what might be broken code to save some time

    What I plan on adding: A new flow type which looks for local minimas and has fluids flow in that direction (would come after calculating down flow and before spread flow), this will also make it look cleaner
     
  4. Offline

    Maeyanie

    Some sort of rainfall/evaporation system would be nice.

    When the client modding API comes out, it might also be worth looking into whether or not the partial-blocks-disappearing problem is fixable. Having blocks look full until they vanish completely is a bit strange.

    Some sort of system for dealing with pressure is needed for FluidPumps too, though you've mentioned that already. Liquids don't compress too well.

    Having blocks (or a config-file-selectable list of blocks) put in water displace it instead of eating it would also be a nice touch.

    For buckets, if the durability doesn't work, in a pinch you could also use the data byte to approximate how full it is. Wouldn't be able to store a completely accurate value, but accurate to within 1/256th of a bucket's size might be good enough.

    It might be worth investigating an "infinite water" system like FiniteLiquids uses to help with performance. Not having to process water levels in the ocean would save a lot of CPU and memory. Especially when someone puts a black wool in it. :p From what I understand, it considers any time there's 800+ water blocks connected as being "infinite" and doesn't bother tracking levels for it.

    About the only semi-bug I have noticed is that when you take away enough water off the surface of a small lake, the remaining blocks like to race back and forth across that layer for a bit until they even out. Though this would be better solved by showing partial blocks, if that option opens up.
     
    smickles likes this.
  5. Offline

    mindless728

    i have been thinking about putting that in

    this right here is why i haven't put in the rainfall gathering as when it would gather it would create whole blocks of water, which IMO looks very weird to me as well

    i have been toying with this idea for a while and thinking of a good rough approximation of pressure based on 1) the height of the water above a flow block and 2) when water is compressed into a container. The place holding data is already in the BlockData that i will be storing in case i decide to add it later, as changing the BlockData object would destroy old people's BlockStorage data

    good idea, will keep this in mind, I am thinking that the default config would be sand and gravel as they "drop" into the spot via gravity in game

    On one hand i love this idea of saving cpu time, but i might change the implementation. Finite fluids spreads the ocean, i might have it just fill in areas

    partial blocks would save my ass on this one i think as well. The biggest bug i see is when water spread flows it evaporates backwards to the source

    EDIT: i was just thinking about the ocean being infinite, a way to track this easily is to have water that is their naturally have no damage value (default) and water placed by a user to have a damage value (say 1), when a block is broken next to a block with no damage value fluid it checks to see if it is big enough to be an ocean (say 1000 blocks) if it isn't it changes them all to non-ocean (with damage value 1)
     
    fysics and smickles like this.
  6. Offline

    Maeyanie

    Yeah, I agree, it would. Maybe having rain fill up partial blocks to their capacity would be useful in the meantime though. Or, while it would be more work, having full blocks appear only at the low points, where the rain "gathers enough." But, partial blocks would definitely help out in a lot of ways, hopefully the modding API is good enough for that.
     
  7. Offline

    smickles

    Would this indicate that the problem lies with which version of bukkit (not craftbukkit) BlockStorage and/or RealFluids is compiled with?
     
  8. Offline

    mindless728

    i hope so as i don't want to mod the client myself as it looks like a giant pain in the ass and i don't have time for that

    i wouldn't think so as Bukkit is just an API and really doesn't have any code (functions are pretty much empty), so the only issue would be if the API has a function that CraftBukkit doesn't have which can cause an exception, but it doesn't look like one is being thrown, though i will look into more
     
  9. Offline

    smickles

    Ok, well, I cloned the source of Blockstorage and compiled it myself with bukkit #789 and CraftBukkit #1031 as buildpath libraries and now Realfluids works. :D

    Edit: Could this be because I am running 64 bit (vs 32)?
     
  10. Offline

    mindless728

    no way, i compile the source on a 64bit linux VM then test it both in the VM in a server and in windows in a server both of which are running 64bit java

    as far as the fix, i can't say as i can't get this to happen to me
     
  11. Offline

    smickles

    I'm not sure if this is feasible, but suppose I don't want water to wash away minerail, but wash "over" minerail non destructively so it can continue to spread on the other side of a long track of rail.
     
  12. Offline

    mindless728

    hmmmm, gives me an idea, have a list of blocks that fluids can pass through, this would allow water to flow from one side of it to another
     
  13. Offline

    smickles

    Exactly what I was thinking. Also, It might be interesting to have gravel on this list too.
     
  14. Offline

    mindless728

    well the list would be configurable, though i don't know how easy more than 1 block thick of this would be
     
  15. Offline

    Maeyanie

    Actually, I was thinking last night about something that might work for this; allowing blocks other than water blocks to contain small amounts of water. While lacking partial blocks, allowing blocks of air to contain up to, say, 10% of a block worth, would allow for a rainfall simulation and help with some of the bugs. When the level rises high enough, they become water blocks.

    That could also be extended to allowing gravel/rails/etc to contain water so it flows through them.

    My best guess on this is some weird interaction between specific Java compilers and JREs.
     
    fysics likes this.
  16. Offline

    Goomboss

    great plugin if the config would load without errors:

    forgot to mention this happens with both the standard and the config posted here, also water is now static on the server because of the config thingy

    Code:
    2011-07-28 16:43:06 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-945-g73697a4-b1000jnks (MC: 1.7.3)
    2011-07-28 16:43:06 [INFO] BlockStorage version 1.3 installed
    2011-07-28 16:43:06 [INFO] Preparing level "world"
    2011-07-28 16:43:06 [INFO] Preparing start region for level 0 (Seed: -7735030338789302995)
    2011-07-28 16:43:07 [INFO] Preparing start region for level 1 (Seed: -7534317403313370716)
    2011-07-28 16:43:07 [INFO] Preparing spawn area: 4%
    2011-07-28 16:43:08 [INFO] Loaded Essentials build 2.4.2 by Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    2011-07-28 16:43:08 [INFO] Loaded EssentialsChat build 2.4.2 by Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    2011-07-28 16:43:08 [INFO] Loaded EssentialsGeoIP build 2.4.2 by Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    2011-07-28 16:43:08 [INFO] This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.
    2011-07-28 16:43:08 [INFO] GroupManager - INFO - Scheduled Data Saving is set for every 10 minutes!
    2011-07-28 16:43:08 [INFO] GroupManager version 1.0(alpha-5) [Zombie-Version, please switch to Permissions 3] is enabled!
    2011-07-28 16:43:09 [INFO] Loaded EssentialsProtect build 2.4.2 by Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    2011-07-28 16:43:09 [INFO] Loaded EssentialsSpawn build 2.4.2 by Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    2011-07-28 16:43:09 [INFO] FluidPumps version demo-snapshot-0.5 enabled
    2011-07-28 16:43:09 [INFO] MCMACOMPAT r15A
    2011-07-28 16:43:09 [INFO] McMyAdmin Compatibility Plugin version r15A started.
    2011-07-28 16:43:09 [INFO] *** RealFluids: Error in configuration file ***
    2011-07-28 16:43:09 [INFO] RealFluids version demo-snapshot-0.7 enabled
    2011-07-28 16:43:09 [INFO] Fake Permissions version 2.7.2 is enabled!
     
  17. Offline

    mindless728

    post the config exactly as you have it and i might be able to help, without the config all i can say is that there is an error in it or with reading from the file
     
  18. Offline

    Goomboss

    the file RealFluids.txt in the realfluids folder in plugins contains this:

    WaterStartLevel: 200
    LavaStartLevel: 100
    MinimumDifferenceLevelFraction: 0.05
    RepeatRate: 2
    MaxFlowTimePerRepeat: 25000000
    SimsPerRepeatFraction: 0.5
    FlowDownFraction: 0.5
    ChunkCacheSize: 1024
    WaterOverwriteList: 0 false
    LavaOverwriteList: 0 false
     
  19. Offline

    mindless728

    that config file works for me fine (see below), maybe there is something different in yours that copying to the forum changes, try to get a download link to it (try pastebin.com)

    Code:
    151 recipes
    16 achievements
    18:31:32 [INFO] Starting minecraft server version Beta 1.7.3
    18:31:32 [INFO] Loading properties
    18:31:32 [INFO] Starting Minecraft server on *:25565
    18:31:32 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-945-
    g73697a4-b1000jnks (MC: 1.7.3)
    18:31:32 [INFO] BlockStorage version 1.3 installed
    18:31:32 [INFO] Preparing level "world"
    18:31:33 [INFO] Preparing start region for level 0 (Seed: 2221312676191770151)
    18:31:34 [INFO] RealFluids version demo-snapshot-0.7 enabled
    18:31:34 [INFO] ScrapBukkit version 1.0.0 is enabled!
    18:31:34 [INFO] Server permissions file permissions.yml is empty, ignoring it
    18:31:34 [INFO] Done (0.116s)! For help, type "help" or "?"
    >
    
     
  20. Offline

    Goomboss

    this should be working so why isnt it? the config is identical to what I posted, also I disable mcmyadmin still same problem and with minequest off still same problem

    also I get the exact same error with the auto generated config

    without plugins after second boot so the auto generated config is there:

    Code:
    2011-07-29 01:18:37 [INFO] Starting minecraft server version Beta 1.7.3
    2011-07-29 01:18:37 [INFO] Loading properties
    2011-07-29 01:18:37 [INFO] Starting Minecraft server on *:26065
    2011-07-29 01:18:37 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-945-g73697a4-b1000jnks (MC: 1.7.3)
    2011-07-29 01:18:37 [INFO] BlockStorage version 1.3 installed
    2011-07-29 01:18:38 [INFO] Preparing level "world"
    2011-07-29 01:18:38 [INFO] Preparing start region for level 0 (Seed: -7735030338789302995)
    2011-07-29 01:18:39 [INFO] Preparing start region for level 1 (Seed: -7534317403313370716)
    2011-07-29 01:18:39 [INFO] Preparing spawn area: 3%
    2011-07-29 01:18:39 [INFO] *** RealFluids: Error in configuration file ***
    2011-07-29 01:18:39 [INFO] RealFluids version demo-snapshot-0.7 enabled
    2011-07-29 01:18:39 [INFO] Server permissions file permissions.yml is empty, ignoring it
    2011-07-29 01:18:39 [INFO] Done (0,183s)! For help, type "help" or "?"
     
  21. Offline

    mindless728

    i don't know what to say as i have not had a singe issue with the auto generated config file

    EDIT: FYI the time i am spending dealing with these issues are taking away from time to program the new version from the ground up (will have different name, same thread though), i don't mind supporting this version while the new one isn't done, just wanted to throw this out there

    EDIT2: just thought about it, what version of java are you running?
     
  22. Offline

    Goomboss

    the one my dedicated server guys have installed, the one that works with nearly all plugins asking them now if you want me to

    edit:
    seems they dont really like telling which java they run on, might take some time
     
  23. Offline

    Maeyanie

    Would also be worth checking permissions on the config file and directory it's in (that's file system permissions, not related to the Permissions plug-in) and the line endings type (Windows vs. UNIX/Linux vs. Mac).

    Though I'd think the auto-generated one should be right for both cases.
     
  24. Offline

    mindless728

    Update: got a bit of programming done tonight in between work, my birthday, and moderating a server. The API is looking good so far (no GITHUB pushes until it is finished) and I am liking how it is looking. This new APi will allow me (or someone else) to create a new fluid using any block material in the game, however the threaded nature of the fluids does not allow for events to be fired and caught. I will more than likely be providing a few types of fluids off hand:
    • ClassicWater/Lava
    • BetaWater/Lava
    • RealWater/Lava
    • InfiniWater/Lava (look up Infiniminer fluids)
    other types would be able to be created by extending one of my classes (namely Fluid) which will do as much of the annoying registration work with my plugin for you, how it moves, stores data, loads/saves config is up to the creator as i want this as generic as possible

    each fluid runs in its own thread with block updates going through a synchronized container and my plugin which changes the blocks in server synch time so there are as few issues as possible

    name change for the over arching plugin will be FluidFlow and the order of fluid types i will make at first is:
    • RealWater and RealLava
    • BetaWater and BetaLava
    • ClassicWater and ClassicLava
    • InfiniWater and InfiniLava
     
  25. Offline

    Goomboss

    Java x64 version 6.0.240.7
     
  26. Offline

    smickles

    Oh, this sounds better than I had hoped for.
     
  27. Offline

    mindless728

    i figured this way people can pick and choose their fluids, also this would allow people to create sand fluid or any other block to a fluid, and the api shouldn't be too hard to learn
     
  28. Offline

    Dominic


    Dang, this is a lot more than I expected! I hope all the coding goes well mindless!
     
  29. Offline

    mindless728

    I have a request to add one for snow, i'll probably call it RealAvalanche
     
  30. Offline

    Dominic

    This.

    In snow Biomes build-up of snow would be cool. Eventually leading to avalanches if disturbed...maybe stretching it for the plugins purpose...but would be cool :D
     
Thread Status:
Not open for further replies.

Share This Page