1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice
  3. Greetings Guest! Tonights Maintenance is complete and the Stratics Community Wiki is now live. Please see this thread for more details.
    Dismiss Notice

[Project: Gorgon Official News] The flying animal fiasco

Discussion in 'Project: Gorgon News' started by Project: Gorgon News Feed, Apr 24, 2013.

  1. Project: Gorgon News Feed

    RSS Feed

    Nov 14, 2012
    Likes Received:
    Thought I’d do a short post about an amusing bug. It’s actually been happening occasionally for a while, but after a recent update it became pretty much 100% of the time: certain monsters, like great cats, would charge at you, ready to attack, then leap forward — and instead of landing, they would simply fly right over your head, and keep on going up into space.
    Wait, panther, we were fighting! You can’t just fly away!
    This took an entire day to track down, but here’s what happened. First, the panther’s physical body is really just a sphere-ish kinda shape:
    The green circle is the cat’s physics — where it can collide with things.
    When it comes time to move the monster around, the graphic of the cat is unimportant. The invisible sphere is what moves around, and the graphics are just drawn on top so you can tell where the heck it is.
    The problem came on the server. The server doesn’t bother with the cat graphics at all — why should it? But without any graphical shape, it’s extremely hard to debug. So when I was first debugging the server, I made it draw a little capsule overtop each creature.
    This is that same cat, as seen by the server’s debug-viewer
    So what went wrong? Somewhere along the way, I must have mis-clicked in Unity, and I gave that little white capsule physics — it became tangible. This meant the cat had two physical forms: the sphere and the capsule. They were both “the cat.”
    When the cat wanted to pounce on someone, it moved the green sphere toward them. But then it noticed it was “bumping into” the capsule representation of itself. It decided “oh, I’m standing on something,” not realizing that it was standing on itself! So then it tried to climb over the capsule, which is impossible since they were connected. As soon as the sphere moved, the capsule moved with it.
    So the poor cat just kept climbing up its own capsule, often for miles, until it would twist and turn in a way that didn’t register as being “on top of” the capsule for a moment. At that point, it would plummet out of the sky. This is why some players reported seeing monsters hurtling toward them like meteorites.
    As soon as I made the capsule intangible, everything was fine again. It just took hours to find the problem.
    Well, on the bright side, at least some cats and pigs got to see outer space.
    Elder Game is sponsored by:

    Continue reading...