Giant Elementals, A Crazy Idea that IS possible!

Discussion in 'WIP and Development Status' started by Splated, Apr 7, 2014.

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

    Splated

    I had and idea for an Epic mod, I want to make a giant elemental formed of flying blocks sucked up from the ground where its created. and have players fight it.


    Currently working:
    • Elementals body forms correctly (links between arms legs work).
    • Can be made of any block type (lava, stone, water)
    • If a block hits the floor it "lands". (solved)
    • dissapears after 3-4 min for no reason (solved)?
    • arrows can hit the falling blocks
    Current Problems:
    • Animations.
    • sword hits.
    http://dev.bukkit.org/bukkit-plugins/splateds_elementals/
    Idea Forum
     
  2. Offline

    NathanWolf

    This looks awesome! I'm doing something similar right now with non-falling blocks as "Automata"

    For problem #1 - I would like to solve this too. I think you have to set data differently for falling blocks- I have the same problem with the "step" particle effects (block breaking)- for the variants it's always grey colored.

    For problem #2- does this trigger a BlockPlaceEvent? This is also something I want to figure out, though for different purposes (tracking falling blocks for undo)

    #3 - I went an odd way with this, my Automata have a command block "brain" in their center that runs every 1 second and changes the blocks around it. But since you're using falling blocks, you probably just have to track all your elementals and update them on a Bukkit scheduled task. As for the "how"- I cheated, my Automata are algorithmic (Conway's Life)- if you want them to look and move like humans or whatever, you'll have to animate it all by hand, I think!

    #4 - Good question- see if you can detect projectile hit events and falling blocks, that sounds like a cool way to do it- what about swords, can you "damage" a falling block? If not to any of this, you could always handle hit detection yourself since you know where the elementals are supposed to be.

    #5 - Yeah maybe falling blocks despawn like items? I've been using some hackery to make entities never despawn, may work for you:

    Code:
       
        public static void setInvulnerable(Entity entity) {
            try {
                Object handle = getHandle(entity);
                Field invulnerableField = class_Entity.getDeclaredField("invulnerable");
                invulnerableField.setAccessible(true);
                invulnerableField.set(handle, true);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
    I'll be watching this thread, very interesting stuff! :)
     
  3. Offline

    Splated

    NathanWolf do you have a video of your Automata it sounds cool.
    you can change color of "step" particle effects by chaining the data number to the block id you want the color from.
    loc.getWorld().playEffect(loc,Effect.STEP_SOUND , 90); // portal block id. Minecraft ID List

    Im useing EntityChangeBlockEvent seems to stop placement but there still disappearing.


    I'm thinking mabie no feet like this.
    [​IMG]
    Have just a ground effect sucking up blocks as it moves. then I just need to deal with arms and torso.

     
  4. Offline

    NathanWolf

    Certainly! I didn't want to spam your thread though :) I don't actually have a recent video- I have these new ones I call "Hunters" that are much more like your Elemental idea- the one in this (kinda teasery, there's a link to another) video is just a giant blob of death.



    Indeed- but if you, say, use stained glass- then (much like the falling block problem) the particles are always grey. I think you have to munge the data byte into the material id somehow (like lshift 16 and OR) but I'm scared to mess with it since bad values crash the client :) It's on my TODO list tho...


    Oh, but it does fire? And it tells you the block that was just added from the falling block? You may need to cancel the event but also re-spawn the falling block... but if this works it's very good news for my desire to undo falling block changes! Thanks :)


    That'd be really cool! I love that implode effect you posted, I've been wanting to make a spell like that, too. It's unfortunate that falling blocks lag the client so hard- I've got a few spells (Blast, Collapse) that would be really epic if I could make them bigger without killing MC!
     
    Synapz likes this.
  5. Offline

    Splated

    I like the giant blob its cool.

    If you keep the explosions to sane small sizes it works, http://dev.bukkit.org/bukkit-plugins/fun_with_tnt/
    check out the vortex storm video. :)


    Im using this right now but I'm still losing blocks.
    Code:java
    1. @EventHandler(priority = EventPriority.NORMAL)
    2. public void EntityChangeBlockEvent (final EntityChangeBlockEvent event) {
    3. if (event.getEntityType() == EntityType.FALLING_BLOCK)
    4. event.setCancelled(true);
    5. }
     
  6. Offline

    Gamecube762

    Sounds interesting, ill be able to look more at this when I get to my computer.
     
  7. Offline

    NathanWolf


    Maybe try spawning a falling block back in the same place? I'm guessing it'll just re-place a block on the next tick, though, so it might thrash.

    How are you keeping the falling blocks from falling? I thought normally that required sneaky invisible bats or something?

    And, thanks- the Virus is a pet project of mine, but the Hunters are much more similar to what you're doing. They are smaller (like 5x5x5 blobs) and don't leave a big mess. They also can cast spells now, so they Curse you to slow you down, then engulf and suffocate you- nasty! :)
     
  8. Offline

    Splated


    By adding upward vectors to counteract gravity and theres also one to keep them attached to there center point, and random to make them wiggle.
     
  9. Offline

    NathanWolf


    Oh, I see- I guess I thought that caused a lot of client-side "jitter", especially when there is any latency?
     
  10. Offline

    Splated



    my progress so far
     
  11. Offline

    Gamecube762

    Make the falling sand ride bats with slowness&invis, that should remove the "jitter" and give you more control over the blocks.
     
  12. Offline

    Splated

    How do you control the bats? I have found Mob AI very annoying to control.
     
  13. Offline

    MagicMan

    Problem 1. Thats not your fault thats minecrafts. Its a bug currently that they turn gray
    Problem 2. Make the element hover. A falling sand is actually falling and once it touches something it becomes a legit block
    Problem 4. Falling blocks lifespan.

    I nearly fell off my chair laughing at that. Trying to control a bat without 500 lines of code is like trying to stop your elementors from jittering. Nearly impossible

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  14. Offline

    Rocoty

    To fix both 2 and 4 in one simple way you can use packets instead of actual falling blocks. Send packets of creating and maintaining falling blocks to the clients. The blocks will never get placed as that's a serverside operation, and only the clients see the falling blocks sent with packets. The lifespan is infinite as, again that is controlled by the server
     
  15. Offline

    NathanWolf

    That is looking awesome! I do wonder how jittery it gets with latency though- was this video taken using a local server?
     
  16. Offline

    Splated

    I Solved a few problems, The elemental creates 15 new blocks every 5 ticks, and using the ticks lived move to the next segment foot-> torso-> shoulder-> arm-> hand->death

    The blocks are continually moving upwards and outwards solves the hitting the ground and premature death problems.






    i like the idea, Can you give me sample code? I have never gotten reflection working.



    Yes I'm just running locally. I'll post a new video when I get a chance its looking really good, and not laggy.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  17. Offline

    Lorinthio

    Open source this! A lot of people would help! But i understand if you dont =(
     
  18. Offline

    bobacadodl

    ase34, Garris0n and NathanWolf like this.
  19. Offline

    Splated

    Progress has been made the elementals now can turn and move, Currently there duck taped to Iron golems but its just to barrow there AI for testing. I made 3 of them at the same time no huge jump in lag.

    [​IMG]
    frame from the newest video ill up load when i get home.


    I'll think about it. :D

    I created a bukkit page http://dev.bukkit.org/bukkit-plugins/splateds_elementals/

    And upload my current prototype if any brave server admin want to alpha test this madness.

    http://dev.bukkit.org/bukkit-plugins/splateds_elementals/files/1-elementals-vb-1/



    enjoy

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  20. Offline

    NathanWolf

    So cool!!
     
  21. Offline

    epicfacecreeper

    I have wanted something like this for literally years. If you need any help making this into a functional plugin, I would love to help.
     
  22. Offline

    Zethariel

    Is it purely server-side? As in, if you actually implement the AI to this to be custom, will the client need to download anything to play on the server that has this custom mob?
     
  23. Offline

    Splated


    It will be 100% server side. I don't program any plugins that require client changes. ;)

    I think to heal the elemental should eat blocks of its own type, like scoop up handfuls of dirt/water/lava and bring it too its head/mouth.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  24. Offline

    NathanWolf

    I love that idea- so maybe you remove blocks on projectile hits or entity damage (sword strike), if possible, to damage the elemental. If he has < 50% of his blocks, maybe he implodes and dies?

    But if the elemental detects its low on blocks, and there are some of its type around, it scoops them up to heal itself? So awesome...

    I would *really* love to use what you're doing here in my plugin, or integrate with you if you end up making this its own plugin. These would fit right in on my server.

    I'm currently working on getting my Autonoma to spawn naturally (rarely, randomly) in place of normal mobs- if I could throw some of these elementals into the mix, that'd be awesome. Maybe in the next storyline...

    But, yah, I too would love to work on this with you if you're willing, and if I have time... really trying to get my own plugin released, but you know how TODO lists grow faster than they shrink? Yeah, it's like that :)
     
  25. Offline

    Splated



    That was my original plan was you kill the block you kill the monster but in order to solve a bunch of problems its adding about 15 new blocks a tick. and they only last for about 20 sec before there destroyed.


    I do want some sort of visual health indicator like if its health is 10 out of max 15 5 of its new blocks are transparent.?


    oh and Chicken Elemental!
    [​IMG]
     
  26. Offline

    Splated

    update! you can now shoot them with arrows and damage is shown by some of the blocks becoming item stacks.



    I got death working now.

    Notice the more damaged the elemental gets the more blocks become item stacks. when there all item stacks it dies.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  27. When will you put this on the bukkitdev page? I find this pretty interesting :p
     
  28. Offline

    Splated


    Its there now just waiting for approval.
     
    NathanWolf likes this.
  29. Offline

    NathanWolf

    So awesome! I will be checking it out once approved :)

    I recently made my autonoma die, too- they "explode", throwing blocks everywhere.
     
  30. How the heck... I don't want to even begin imagining how this works. You must be the master of falling blocks or something.
     
Thread Status:
Not open for further replies.

Share This Page