[FUN/MISC][SPOUT] NightSky v0.1 - Tweak the Look of Space! [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Steeveeo, Aug 26, 2011.

  1. Offline

    Steeveeo

    NightSky - Tweak the Look of Space!
    Version: v0.1

    REQUIRES SPOUT SERVER AND CLIENT
    As you all know, Spout adds many new features to Minecraft that Devs like to play with. I decided to work with the SkyManager based features to make NightSky, a plugin based on tweaking the look of the night in Minecraft in many ways. Currently, this means the ability to have moons with phases, tweaking the number of stars rendered in the sky, and many MultiWorld compatible features.
    Spout, of course, is entirely optional, and installing this plugin does NOT mean you have to force your clients into downloading Spoutcraft if they do not want to. Without Spout on the server, this plugin simply deactivates itself. Non-Spout clients are simply ignored by the plugin.
    Features:
    • Moon Phases - The moon will go through all 8 phases continuously, from Full to New and back. Support for even applying your own moon textures as well!
    • Smart Transitions - Moon image URL will never change while the moon is visible. All changes to the texture of the moon are done during the day, so as not to cause sudden "snaps" when the texture changes. Note, new joiners may see the moon snap during the initial downloads.
    • Star Density - Server owners have the option to change the number of stars rendered in the night sky. Whether they want an eerie, starless night, or a vast sparkling sea, the option is there! (Currently works only in Spoutcraft Dev builds).
    • Multiworld - All settings are on a per-world basis. With this, you can even sync the moon phase of one world to another. Note: world settings always override the Defaults defined in config.yml; if you're having trouble getting settings to stick, change that setting in plugins/NightSky/Worlds/<worldname>.yml and reload the server.
    • Open Programming - Not really referencing this being on GitHub (it is!), but NightSky.jar can be used as a rudimentary API to interface with the different functions contained within NightSky.
    [​IMG] Download NightSky.jar
    [​IMG] Source Code

    Issues:
    Having issues with the plugin? Have a suggestion that's not already on the Planned Features list?

    Changelog:
    Note, when updating to or through any version with the "(Config Reinstall Required)" flag in the changelog, you must delete the NightSky folder in Plugins, then run the server to let the plugin regenerate the files.

    Version 0.1:
    • Committed to GitHub and Released
    Previous Versions (open)

    This plugin isn't old enough to have previous versions! [zombie]


    Planned Features:
    As with my other threads, I am always open to suggestions! Send them on in here or on GitHub Issues!

    Show Spoiler

    • Dynamic Light Pollution - This highly depends on how expensive the star redraw process is, but I have an idea of how to make a "Light Pollution" system where the number of stars dwindles as the surrounding light gets higher.


    Known Issues:
    A list of bugs that I have found, or that have been reported already. Most of these I plan to fix, but there is the rare case of which I have no control over.

    Show Spoiler

    • Transparent Moon - It is possible to see stars through the non-full moons. This is due to a quirk with how Minecraft draws the moon and sun textures, which use darkness as the transparency channel (Photoshop users: think Screen blending mode). I cannot do anything about this with the assets I have, but if someone wants to draft up versions of the moon textures that don't have this issue, I'll be happy to credit you and use them!
     
  2. Offline

    Pencil

    You know this isn't used anymore :p dev.bukkit.org :D
     
  3. Offline

    Steeveeo

    I don't see a single sticky that says that. At least not within the plugin forums.
     
  4. Offline

    Pencil

    You don't have to believe me D: I know it is somewhere :)
     
  5. Offline

    Steeveeo

    Anyone have an idea of how expensive switching the starFrequency on a client is? I'm thinking of making a "Light Pollution" thing which would dynamically change the number of visible stars based on the surrounding light, but I don't want the client locking up with every step into the dark.

    Ideas?
     
  6. Offline

    Afforess

    As a test, just set it every tick with a repeating task, and watch your FPS on the client.
     
  7. Offline

    Steeveeo

    Interestingly enough (though I did do this per second, not per tick) there was only a little bit of stuttering, and only when rendering the higher numbers of stars.

    What I did was pretty much this (cropped from existing code, thus the per-world stuff):
    Code:java
    1.  
    2. public void run()
    3. {
    4. //Loop through all worlds and update as necessary
    5. for(World world : worldList)
    6. {
    7. List<Player> players = world.getPlayers();
    8. SkyManager sky = SpoutManager.getSkyManager();
    9. for(Player player : players)
    10. {
    11. SpoutPlayer ply = SpoutManager.getPlayer(player);
    12. if(ply.isSpoutCraftEnabled())
    13. {
    14. sky.setStarFrequency(ply, (1000 + (int)(Math.random()*5000)));
    15. }
    16. }
    17. }
    18. }
    19.  


    Also lucky to note, stars seem to be generated from a seed, so regenerating stars don't generate entirely new patterns, seems my idea is a go.
     
  8. Offline

    Afforess

    Ah, cool. Looking forward to the result. :D

    FYI, our api should be Spoutcraft agnostic, so you don't have to use isSpoutcraftEnabled. It will for you.
     
  9. Offline

    Steeveeo

    So all the Spout functions automatically checks for the client?
     
  10. Offline

    Afforess

    Yep. If they don't, it's a bug.
     
  11. Offline

    Mercury

    @Steeveeo
    It would be amazing to add Bloodmoon like in terraria.
     
  12. Offline

    Steeveeo

    Hmm, possible. However, it would not change the hostile mob spawn rates like Terraria, that's outside the scope of this project. If I were to implement this, though, I would make it accessible for other devs to hook into and do stuff with, if they so desire.
     
  13. Offline

    Mercury

    @Steeveeo,

    Can't see any stars with #1185.
    I am also using 1.0.6 Spoutcraft.
     
  14. Offline

    Steeveeo

    That would be because it is not updated for #1185 yet, as indicated by the title. Once it is updated, I will be posting here in order to alert everyone of the status change.
     
  15. Offline

    JamesS

    Now what WOULD be nice is if you could work on this plugin so that... and this is based on if its possible or not, so that instead of the generic pixel night sky, you could have a much more high definition image rendered in or something. Say, as the sky darkens and the sun goes down, an image fades in that acts as the night sky:
    http://bethtrissel.files.wordpress.com/2009/09/ghostly-night-sky.jpg

    Now that would be awesome, and really bring a new leash of life into the graphically starved world of minecraft ;3
    If you could do this... I would love you.
     
  16. Offline

    Steeveeo

    You will have to take up the conversation of Skydomes/Skyboxes with the SpoutDev Team. Currently, this is not an option for this plugin.
     
  17. Offline

    JamesS

    Ah, well thanks for shedding some light on that!
     
  18. Offline

    Glaze

    The moon phases appear to be deprecated. Notch implemented his own.

    Does the mod already allow custom seeds for stars?
     
  19. Offline

    Steeveeo

    Sorry about the late reply, Bukkit forums seems to have decided not to alert me to responses through email like I told it to.

    Unless Spout has come out with a star seed generator lately, it does not. Also, I am going to keep my Moon Phases in, as that allows for admins to input their own images for each phase, along with readable data as to what moon phase it is.

    I've pretty much stopped all production on my plugins until 1.9 fully comes out and have been working on a different project in the interim (along with school), so this probably will not see an update until then.
     
  20. Offline

    Celeress

  21. Offline

    ipaqmaster

    Well 1.0.0 is out and I for one really like this plugin on my server and I think you should keep up the good work!

    the only problem I have with it at this point in time is how notch locked his own ******g moon in there and it cuts off
    is there a way to get past this? or will an update be required
    =C
     
  22. Offline

    Steeveeo

    I haven't messed with it yet, actually, but I bet it's just that the moon texture name changed in light of the phase changes. If anything, the Spout guys will find a way around anything like that if it is indeed locked.

    However, I am currently sucked in by the ever-so-intriguing TechnicPack, so any updates MAY be delayed for a bit. :p
     
  23. Offline

    ipaqmaster

    K =c, its your plugin.

    I can wait =)
     

Share This Page