I finally managed to fix pulling across map borders. You still aren't moving your target... But at least you are not longer getting stuck.

I still had a host of small bugs to fix today, this being one of them:

Fortunately, I managed to get most of the bugs fixed. The last remaining glitch is causing you to be unable to enter "pulling mode"... But it's so difficult to replicate that I can safely leave it alone for right now.

I also redesigned part of the movement system.

Previously, the UI was using polling to issue move and change direction commands to the logic layer. This code really did not need to be running at 60Hz.

I redesigned the code to issue those two commands based on different events. For example, the move command will now be issued when the "I want to move" event is raised, among others.

So, today I started work on the "pulling" mechanic. This mechanic allows you to pull other characters around the map. Such a feature would be useful in combat, and would also aid in forcing characters out of choke points.

I decided to get it working in a simple situation first: Neither the target nor the grabber is moving. I expected this to take two hours, tops... I am currently well over 5 hours into this task. So much for simple!

I keep coming back to this, but one of the big reasons why adding new mechanics takes so long is the state of the code base. But, I am gradually redesigning it.

The Bugs

I don't have much more to say on the subject. So, I'll leave you with a sampling of the sort of bugs I had to fix today:

Today started off with a relatively easy task: Add in a "grabbing" sprite for when a character grabs on to another.

I started off with getting things setup to add the sprite to the character's spritesheet. This went well, however I discovered something surprising: It was already there! Wishing I had noticed this sooner, I quickly moved on to adding in the simple logic for triggering the new sprite.

Bugs Fixed

I managed to squash three bugs today. Two of these bugs are currently present in v0.3.3.

When being grabbed by two other characters on opposite sides, it was impossible to escape.

Characters were jittering back and forth when attempting to move into a blocked tile on a northern map.

The character's sprite wasn't being set properly after grabbing another character. This bug was only present in development builds.

Badly Needed Refactoring

I spent the rest of the day refactoring/redesigning the server's movement code. A majority of this work involved moving methods out of the VolundServer god object and into separate classes.

The code was separated based on whether it handled synchronization or game logic. Currently I'm just throwing synchronization-related code into the PacketHandler class. Game logic code winds up in the GameLogic class, which is at least a bit better.

Community Report

Captain Argentina and Pema99 have mapped out the world of Volund! WARNING: These maps contain spoilers!

I finally fixed the bug that was causing the third character in a dragging train to disappear! Apparently, the create character packets were being sent before all of the character's state was set. This was causing the character to appear outside of your screen.

AoD's Fan Comics

AoD, a regular on the livestream, has created several comics related to the game and the various bugs that we've been trying to fix. Enjoy!

These next two comics need some background information. So, I was in the middle of adding the name tag feature mentioned earlier. While doing this, things got a little... Uhhh... Crowded. Here is a screenshot I took during the chaos:

A fight broke out in RedSquirrel's house. Our camera crew was on the scene, but due to an unfortunate equipment malfunction the video is being withheld. Investigations are ongoing as to whether or not Survivor was behind this.

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:

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:

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.

So today started off with fixing a rather odd bug. You see, the- Uh... Well. This is easier shown than described:

So. That was happening. Fortunately I managed to fix it (not without the help of the livestream viewers in the chat - thanks!)

The problem, like with most bugs, wound up being relatively simple: The character's velocity was being incorrectly set after changing maps.

The real issue is that the server works with coordinates and velocity measured in tiles. The client, however, uses pixels. This is definitely on my "I need to refactor this" list.

All Aboard the Game Mechanic Train!

As you may know, I've been working on the "grabbing" feature. This breaks down into several mechanics, but here is the basic idea: You can "grab" another character and push them/pull them out of the way, or hold them in one spot. Very useful in combat.

One of the mechanics is that if the character you are grabbing tries to move, they pull you along with them. This will eventually result in slower movement speed, but that is still being worked on.

At the request of the livestream viewers, I tried grabbing the character which was grabbing the other character, and then moving... Thus was born The Train! Choo choo!

The biggest news I have today is that the "hindering movement" mechanic is finally finished! Here is an animated gif of it in action:

With this mechanic, you can approach another character, grab on to them, and then prevent them from moving away quickly. After grabbing the character, he is unable to move in any direction without a delay.

The hindering effect only lasts for a single tile. However, that could be significant, particularly in a combat situation.

Bug Fixing with Friends

Before starting work on the next game mechanic, I needed to exterminate a bug. The bug was first discovered last night right before the livestream ended. I didn't have a chance to fix it then, so it got tacked on to today's work list.

The glitch happened when a character grabbed a target character and then followed closely behind them. After only a couple steps, the server would crash.

After a very long debugging session, two and a half hours in fact, the problem was found and squished: The server was issuing a grab command without first making sure that the grabber wasn't... Uh... Grabbing.

Thank you very much to the people in the Twitch chatroom, and Voidinc_ in particular, for helping me find the problem. It would have eluded me for much longer without your assistance!

Well, I have learned one thing over the past few iterations: Adding game mechanics takes a long time. A very long time. Just the framework for the grabbing feature has been in development for the past couple months.

So, I've identified a problem. Now what? Well I need to figure out how I'm going to solve it. I believe one of the major issues is the way the code is designed at the moment. It's desperately needing some large overhauls.

With that in mind, I'm going to try and spend extra time refactoring and redesigning. This will be in addition to the work I normally do on the livestream, and I'm not planning on livestreaming it.

One problem with deciding that a code base needs to be reworked is that you can easily get stuck only reworking it. This means you don't make any forwards progress on new features. Doing the redesign as extra work, rather than replacing existing work time, should help prevent this from happening.

Hand Holding Turns Violent

While on the livestream today, some players decided to form a circle and "hold hands" using the grabbing feature. This was all well and good, but then the circle was abruptly disrupted and the whole thing turned into a melee! Fists were swinging, characters were running all over the map... It was chaos! Also quite funny, haha.

First off: The Friday comic! This was inspired by an unexpected behavior in the grabbing mechanic for Volund, the 2D MMORPG my brother, father, and I are developing. The grabbing mechanic will allow your character to reach out and push another character, or even drag them away. Apparently it also works across map borders!

What's New?

Well, since the last development log we released, a few things have happened.

It includes a version number at the top-left corner of the screen. This will make it easier to keep track of bugs and which exact version was causing the problem.

Guests can now access the game as well. This means that you no longer need an account to play the game.

Changes to Automated Testing

I have decided to drop automated testing for game mechanics. The reason is simple: We are in early pre-production, and these are all just prototypes. Because they are all prototypes, they are changed frequently if not outright scrapped! So writing automated tests does not make sense at this point.

However, I will still be writing automated tests for engine-level features. The engine most likely will not change as frequently as the rest of the game.