Jump to content
  • Advertisement
  • entries
    169
  • comments
    54
  • views
    131387

Devlog #12: The Mystery of the Vanishing Caboose

Sign in to follow this  
VBStrider

774 views

It was a dark and stormy night...

No, not really. Although the morning certainly started off cold!

Bugs, Bugs, and um... Bugs



Today was full of bug fixing, which I expected going into it. The day started off with implementing the final part of the "grabber dragged along" mechanic: Slowing the speed of the target's movement.

Things were going quite well, until this happened:

characters-separating-bug.gif?resize=320%2C240

I spent most of the morning fixing this fun little bug, and part of my lunch break too! The problem wound up being related to storing the grabbing direction and the movement direction as two separate states.

Storing them separately wasn't the problem, necessarily. However, the code that handles dragging the grabber behind his target was using the wrong one!

To recreate the problem, you had to first grab another character. Let's say that you grab them while facing north, like in the animation above. You then press the down arrow key to "move" south. Because you are grabbing another character, you don't move. But! Your character's movement direction is still updated. When the character you grabbed tries to move, you'll be "dragged" in the direction you are "facing"... South!

The Internet Destroys Everything



The latter half of the day consisted of lag testing. This involved deploying to the staging site, and then seeing how badly latency would affect the new grabbing mechanics.

Sadly, it was pretty bad. One bug which I spent four hours solving was allowing characters to run right by grabbers. If there was enough lag, you could run right by another character who was trying to grab you.

This was being caused by some code in the server which would correctly grab the character, but then immediately cancel the grab! I added some additional checks, and the glitch seems to have been resolved.

The last bug I ran into, and the one which I didn't manage to fix, is demonstrated here:

The-Mystery-of-the-Vanishing-Caboose.gif?resize=320%2C240

If you have three characters, with two of them grabbing two others in a row, the last one in the chain will disappear when switching maps! I suspect the "caboose" is being teleported into the map's border, but I have yet to prove that theory.


IfThen-Software-Official-Blog.png
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!