Animated GUI Lib

Discussion in 'Spigot Plugin Development' started by FiXed, Jun 4, 2016.

?

Would an animated GUI lib/api be a good idea

Poll closed Jun 11, 2016.
  1. yes

    100.0%
  2. no

    0 vote(s)
    0.0%
  1. So, I'd like to get some community feedback here but do you think a lib or api for an animated GUI would be a good idea? It would have per-item (time) updating and would have pretty much everything needed in a decent api, just wondering if it would be a good idea, I just finished making a regular Inventory api an wanted to go a step further with the idea. (wanted some opinions from developers)
     
  2. It's super easy to do so I don't think people will look up a lib to do it.
     
  3. not easy to a lot of people, plus the API would make it a lot easier to make one.
     
  4. Would it look something like this: animatedInv.setSlot(0, items)

    items contains stuff like grass, dirt, stone. Switches between those?

    Also animatedInv.setDelay(20)

    //ticks

    ?
     
  5. I actually already have this inv api, it's extremely fluid and works well
    https://www.spigotmc.org/resources/inventory-gui-creation-utilities.23567/
     
  6. Yeah, the lib sounds interesting but there is no way to make this concept that simple without limiting customization. If you could find a way around that problem I would love to use the library.
     
  7. maybe stuff like setting slots rainbow glass, wool? (Or making item bytes go to max then go back down)
     
  8. it would look more like this,
    AnimatedItem item = new AnimatedItem(Inventory inv, int Slot);
    then,
    item.setDelay(int delayInTicks);
    item.setItems(Material...list);
    item.setNames(String...names);
    item.setLores(List<List<String>> lores);
    item.setRandom(boolean isRandom);

    and a bit more than that. It would auto update in the GUIs inventory.
    does your API have a capability to animate itself? Also, it's a nice API except it's missing a few features I have in mine that I like implemented :p no offence to your plugin at all though.
    The lib would have full customization and would be on github so people can mess with the code however they want (gnu license)
    I would make it so the gui could be customized in almost every single way.
     
  9. I could also add a method
    item.addData(int... dataList); // would cast to byte during the update

    to sufficiently cover the going up the data then down.
    item.addData(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
     
  10. I know it would have a lot of customization but it is a pain to animate every single frame of a gui. How are you going to get around this and still make it very customizable?
     
  11. I have a way of animating every frame, you can also add fully non-animated items, or you could add animated items but have the gui have a tick delay instead of giving any of the items a tick delay, then the gui would go through each advanced item and if it doesn't have it's own tick delay it would update it with it's own delay.

    There's ways around almost everything and updating inventories won't really be a lag causer, as well as the item updating since getting strings, or objects from a list doesn't take much at all to do. It would honestly not make the server laggy unless you had like 20 inventories with 54 items in each.

    I could probably also make the size able to be animated as well as the name. Would probably just take some nms.
     
  12. Well, you can animate it yourself pretty easily, just implement runnable, and in the runnable create your animation. Then when you create an instance of the inventory, start the runnable.
     
  13. As well as mine, this lib would make it much easier though. It would make it a few methods and it would do it by itself.
     
  14. what is your "way of animating every frame" if you are going to make a library I want to know what it is going to be like for the developers who end up using it. If when you are using the API you have to say animatedInv.addFrame(Inventory) I will not use it. However if there is a method where you can do animatedInv.moveItem(originalFrame, newFrame, originalSlot, newSlot) I will be more interested. Also, if you do develop this remember to take in the opinions of everyone. The method animatedInv.addFrame(inventory) will still be useful to some people.

    Edit:
    You will want to have as much customization over each frame as possible while still maintaining simplicity of the API
     
  15. What do you mean by frames? nvm I think I know, are you talking about the item that will be shown? If so then I wasn't going to do it like that, I was going to have more of a material setup type system with the lists of materials, however I could allow setup for many different ways, I could also make a class called frame item which stores a list of items and updates based on the items instead of a list of materials etc, what I will make will probably be a multi classed system, I'll allow moving of the slots between frame items and slot items etc, how about I make the thing, upload it to git, then you give me features you'd like to see and I'll gladly implement them. I'll make a base API right now and then add user opinion features after the original release. I'll make it so it fits a lot of needs but I would love to implement everyone's feature requests. First I need to make a base API that works xD
     
  16. 1. Frames are the different arrangements of everything in the GUI that should be separated by a specified tick interval.
    2. Sounds like a good plan.
     
  17. Aren't those slots? As in the arrangement, or do you mean animated items moving between GUIS or like, changing the inventory its associated with.
     
  18. In your API frames should be represented as inventories to allow full customization. This way it cycles through all of the inventories to show an animation.
     
  19. I don't fully understand, can you show me what you're talking about like an example? or something like that.
     
  20. I think he means

    Frame1 = inventory 1
    Frame2 = inventory 2

    Etc

    Edit: so like animatedInv.getFrame(int) would return an inventory
     
    • Agree Agree x 2