Better animation

Planning and Development

Last night I made a simple, bad run cycle for my test character and put it in the game.  I then updated the game so that the player only “runs” when he is moving.  The animation is still very rudimentary in that it just starts when you move and stops when you stop.  There’s no blending to make it smoothly transition between idle and running or anything fancy like that.  It’s a very basic start, but it’s a start.

My development schedule from back on February 1st hasn’t gone exactly as planned.  I have basic multiplayer in place, and I’ve been improving Penrith Forest here and there, but I’ve done nothing with the camera controls or jumping.  Instead I’ve been working on this animation stuff.  I’ve also reorganized all of the code into a format that’s easier for me to work with.  I don’t really want to mess with the camera controls or jumping since both open a can of worms, but I guess I will since it has to be done eventually.

Simple animation

Uncategorized

I spent some time today trying to do a really basic animation for my player character.  I had to go back and brush up on my Blender rigging skills but I managed to make a truly horrible animation that loops for your player in the game.

I fully realize that it’s hard to tell from these two images that any animation is happening at all, but trust me, the player now does this terrible flailing kick and arm waiving motion that makes no sense.  Fortunately, my goal was not to create something believable as character movement, but just to have the character move at all and I accomplished that.  Using animations in BabylonJS isn’t too complicated as long as you get the export out of Blender done correctly, so in the near future I’ll try to make an actual walk/run cycle along with an idle animation and maybe even an attack animation.  Then I’ll try to do some animation blending so that you can run and attack at the same time.

Bonus: you can see the new spooooooooky tower off in the fog in the images above.

Better multiplayer

Feature Development

Small steps.

As of now when a client disconnects the player disappears from the world.  I realize this is not a big thing, but it definitely adds some “realism” to the world to not have disconnected players just hanging out in the world.  I’ll add some new assets to Penrith Forest this week then see what’s next.

Can you smell what this rock is cooking?

Asset Spotlight

It’s potatoes.  This is a Polish rock.Ok, it’s not a Polish rock.  It’s a normal rock.  And it took like 45 seconds to model, so I tried to do something a little humorous to break up the monotony of posting a picture of a virtual rock.  I hope no one is offended.  This is rock001.  Which means I can make 998 more individual rock models of this same amazing quality before I need to change my asset naming scheme, so get ready.

Penrith Tower

Asset Spotlight

Holy moly!  So freakin’ spooky!

Oooooooooooooohhhhh!!! (ghosty noises)

Ok, so no one’s shaking in his boots over this one (yet) but I’m pleased with the progress so far.  It needs a good bit more work but this is a nice starting point.  As of right now, this tower has no planned purpose in the plot of the game.  It might be nice if players had the ability to look out of the windows.  Like, the inside isn’t modeled but if you interact with the door you can say “climb the tower” and then the game camera is just place in front of the top windows so the player can look at the glory of Penrith Forest.  Or maybe the tower will actually have some significance.  Who knows.

Assets for Penrith Forest

Planning and Development

Here’s a free form jazz-fusion style list of things I think would help make Penrith Forest more interesting:

  • A well – random wells are always fun
  • A spooky tower – some spooky stuff went down there
  • Rocks
  • More tree variety
  • Grass
  • Bushes
  • A stable behind the farmhouse
  • Etc., etc., etc.

I’ve also decided what the game’s very first quest will be!  This will probably change, but I think it works for now, but I don’t want to give it away just  yet, so I’ll post about that soon.

Small multiplayer improvement

Feature Development

I’ve changed all players to the same default character from the gray sphere.  I also implemented tracking rotation changes in addition to position, so when another player rotates you can see it.  Here’s three tiny browsers running side by side:

Bask in the glory of very basic multiplayer support

It’s a little confusing because every player looks the same, but take my word for it that those three guys are running around independently, just as happy as clams wearing green shirts and blue pants.

The polling time is still very long (1/2 a second) but I’m going to leave it that way for now because I would like to implement optimizations that don’t rely on short polling times, and I’m afraid that if I shorten it now I’ll forget about that.

Basic multiplayer

Feature Development

Well that was a little faster than I thought.  Here’s a screenshot of my very, very basic multiplayer support in action:

That’s two browsers running the game side by side.  For now, your player is represented by my nifty character model, and any other players are a gray sphere.  So you can see in this screenshot that in the game on the left the sphere is where the player is in the game on the right, and vice versa.  As each moves around it’s updated in real time on all other clients.  My polling time is set at 1 second right now, so the server only sends out an update once per second and the movement is very jumpy, but there are ways to improve that, the simplest of which is to simply decrease the polling period.

Using socket.io and node this was almost disturbingly easy.  It took me a bit to get my head wrapped around the concepts, but overall this is a very simple thing to do with these tools.  I also relied pretty heavily on a series of tutorials made by the guy who made Raining Chain.  The tutorials were very helpful, and the game itself is also quite entertaining, so if you’ve never played it, go check it out.

Still many things to do, but it’s exciting to get basic multiplayer support added so quickly and easily.