• Register
Post feature Report RSS Devlog #12: The Mystery of the Vanishing Caboose

The good news: The "grabber dragged along" mechanic works, for the most part. The bad news: It was riddled with bugs!

Posted by on

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:

Volund - 2D MMORPG

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:

Volund - 2D MMORPG

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.

Official Blog for the Indie Game Development Company, IfThen Software

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Feature
Browse
Features
Report
Report
Views
71 (1 today)
Share
Related Games
Volund
Volund Role Playing
Related Engines
FlashPunk
FlashPunk MIT
Related Groups
IfThen Software
IfThen Software Developer & Publisher