1. If you're looking for help-related things (for example, the key rebinding tutorial), please check the FAQ and Q&A forum! A lot of the stickies from this forum have been moved there to clean up space.
    Dismiss Notice

Quadrupeds + blocks = problem?

Discussion in 'Starbound Discussion' started by thesecretofshadow, Aug 11, 2013.

  1. DeadlyLuvdisc

    DeadlyLuvdisc Oxygen Tank

    If half of the creature is floating, I don't care. Your character is two blocks wide and can stand on a ledge with one leg firmly planted on solid air, and nobody cares. It only seems problematic when less than half of the width of the creature can support it, like when a huge boss that is twenty blocks wide can climb up a really steep incline and looks like it is floating up the wall. The King Slime had this problem in Terraria-- it looked pretty weird, but nobody really complained about it.

    It would be really easy to code the game so that large mobs can't stand on ledges that are less than half of their width, rounded down. I can think of several potential bugs that could be caused by it, mostly involving very irregular terrain like having two pillars of uneven height with a small gap in between them, but those can probably be fixed.

    Right now, I think the game averages the height of each pixel below the character as long as the greatest difference is less than one full block. With larger creatures that are more than two blocks wide, you could just increase the maximum difference to equal half the width of the creature, rounded down. That would probably look fine. I'll draw some diagrams in paint if anyone is curious.

    EDIT: Oh yeah, and this would be a much easier and faster solution compared to redrawing thousands of mob parts.
     
    Suika Ibuki likes this.
  2. Vladplaya

    Vladplaya Cosmic Narwhal


    For big bosses its pretty reasonable, you just can't get away from the floating effect in case of large boss on game that revolves around squares.. For smaller mobs however, its much more noticeable as you will be running into them much more often then bosses, and they keep looking silly every time you see them standing like this, compared to this, and all I did is just pivot the monster around the center of front shoulder. Also if there happen to be one block just sticking out right under monster, they could try to make it so monster just overlaps small terrain bumps like that, one to two blocks, that way it still should look pretty decent.
     
    Towwl, bludud101 and Miss Andry like this.
  3. Miss Andry

    Miss Andry Cosmic Narwhal

    hey, that actually looks miles better than the original. Like a crap ton better. I like that a lot. If there isn't already a suggestion about it, you should make one with those pictures. Hopefully the devs would notice and think that's a huge improvement (if they're not already planning to make it look better that is)
     
  4. DeadlyLuvdisc

    DeadlyLuvdisc Oxygen Tank

    This would look really weird for any mob that is taller than it is wide. The key point is the transition between flat and sloped terrain. It's one thing to compare two still pictures, but a whole different story when you compare videos of each. I'm not saying it's a bad solution. With any answer to any problem, you are bound to find wrinkles that need to be ironed out.
     
  5. Vladplaya

    Vladplaya Cosmic Narwhal

    I am only talking about applying this effect to mobs that are very long, as mobs that are tall but are not wide on the bottom, look fine with just small portion of their bodies hanging over the block.

    The entire topic is about Quadruped creatures to begin with.


    I would think this topic in General discussion is probably more than enough for devs to think about it. Just maybe need more people actually supporting the idea.
     
    SPARTEN1337 X13 likes this.
  6. This makes sense! The terrain on Starbound seems hard to find surface, it's a lot mixed. So we easily notice in the videos that the monsters are like floating a bit in the corners instead of get into one better position. I don't know if that is really possible since it can require more sprites and they must re-create for every part, but it would make sense don't make them "float" in such cases.
     
    SPARTEN1337 X13 likes this.
  7. AllenKS

    AllenKS Hard-To-Destroy Reptile

    Nevermind.
     
  8. Red Space Monkey

    Red Space Monkey Phantasmal Quasar

    I don't really care about them floating in the air a bit. :) In this case, my "gaming sense" snaps in I guess, so I think something like "well, it is just a game" and I move on without thinking about it any further. If they find a good way to adress this, fine, but otherwise it wouldn't be something too problematic. :)
     
  9. thesecretofshadow

    thesecretofshadow Astral Cartographer

    I made a video showing how the quadrupeds animations could be while they are climbing the hills. Tell me your opinion pls:
     
  10. Alexor

    Alexor Star Wrangler

    I think the best way to do this would be to just give them preference towards being on solid ground. It's not going to matter too much if, occasionally, during combat or when moving around, they end up floating a bit. Ideally, their AI would just say "Hey, stepping there would put me on unstable footing. Is there anyplace else I can stand, or possibly jump to?" If it's the only way to reach their objective, then they should allow themselves to be on floating blocks, but it would happen only occasionally in most situations.

    Mostly, you just want to avoid situations where they're grazing on the edge of a cliff and such.
     
  11. bludud101

    bludud101 Phantasmal Quasar

    This is most likely something they've just yet to fully polish, but if not I hope they consider these suggestions as It's been bugging me too. ;)
     
    SPARTEN1337 X13 likes this.
  12. Miss Andry

    Miss Andry Cosmic Narwhal

    yeah, looks a lot better on the second one
     
  13. Pie4Pigs

    Pie4Pigs Existential Complex

    Looks great as a concept, but you haven't really shown what the transition back to solid land would look like. Would they snap back into place, or would they slide back to the proper angle? Additionally, they kind of begin to levitate last second in the video, so if this was actually in the game, it would most likely look different.
     
    DeadlyLuvdisc likes this.
  14. wraithbone

    wraithbone Pangalactic Porcupine

    There are several different ways to have quadrupeds navigate hills.
    With regard to the AI, you would indeed have it so that the monster prefers to be on flat when not aggro, or running away.


    The first animation solution is obviously the simplest and the one they currently use. A "square hitbox" style where as long as some of the bottom edge of the "hitbox" is touching the ground then terrain collision is satisfied. This also requires no transition from flat to slope and back.
    i.e: (excuse the awful looking monster)
    [​IMG]

    This method is simple and less calculation intensive, it also handles well what happens when the monster is on a ledge that is smaller than it.

    Second and third options would probably use a snap or tween transition to enter/exit the slope.
    Second is a sort of average filter, applied to the geometry of the land provides a base line for the "square hitbox" to move along. This is the one used in thesecretofshadow's video.
    i.e:
    [​IMG]

    The downside is that there is now a lot of terrain clipping on the bottom of the monster.

    The third is a spin-off of the second. This time the average is offset to avoid terrain clipping.
    [​IMG]

    An alternative is to offset it in the opposite direction to force more terrain clipping, but ensure the monsters "hitbox" is never floating. <- This would be the same as what Miss Andry suggested.

    The most complex and fourth option is to implement the first option but do it per animation group on the monsters sprite.
    So if my monster had the following animation groups:

    [​IMG]

    Then you could rotate and displace each animation group depending on the size of the slope.
    For a 45 degree slope you would drop the legs and rotate the torso and head back 45 degrees. The legs would stay straight.
    i.e:
    [​IMG]

    The transitions for this final case would be done in animation.

    The other problem with this final method is that there also have to be exceptions like, what happens if the slope is greater than 60 degrees? What happens if the terrain changes while the monster is on it?
     
  15. Event Horizon

    Event Horizon Big Damn Hero

    A very easy way to code a fix:
    • If the sprite is less than 3 blocks wide, do not change angle of inclination
    • Take three reference points: Bottom left, bottom middle, and bottom right of sprite
    • Take height of all ref. points
    • Use bottom middle point as the height of the actual sprite
    • If height of middle point exceeds or equals both side ref. points, don't change angle of inclination (Think situations where there is a single block-thick tower and a 3-block wide sprite is standing on it)
    • Calculate angle of inclination using trig on the two side ref. points
    • Set sprite's angle to calculated angle
    This would require no new animation code or anything. Just intelligently setting the sprite's inclination angle. You could also put a limit to angle of inclination on a creature by creature basis, to make way for wall-climbing creatures that actually turn sideways to climb walls!
     
    Axe Garian likes this.
  16. thesecretofshadow

    thesecretofshadow Astral Cartographer

    Yeah, my idea is like wraithbone says...one invisible line between blocks, and the quadrupeds could walk above it, no need to animate pivot or something like that. Even the transition between hills and solid would be nice. Look:
    [​IMG]
     
    Towwl, imrevned, Cabb and 11 others like this.
  17. wraithbone

    wraithbone Pangalactic Porcupine


    That looks pretty sweet.
     
  18. Meh, I'm used to this in 2-D games.
    Although it would be nice if the devs found an easy way around it.
     
  19. RizzRustbolt

    RizzRustbolt Existential Complex

    Doesn't need a pivot. Just a couple of extra animation hooks to span the height. One for going up, then another for going down.
     
  20. I honestly preferred if the sprites aren't rotated to the point where it's distorted. And no, anti-alias would ruin it for me too.

    Honestly I'm fine with having them do it the 'old' way and I prefer that. But I agree it does become a bit of a pickle once large creatures are taken into consideration.
     
    Axe Garian likes this.

Share This Page