Sunday, January 15, 2012

node-js-mud

I've committed the initial version of node-js-mud. It really isn't a MUD yet, but should do just fine to create a MUD. It was quite a bit of fun to create, and I realized how much time I waste on refactoring and over designing. Even with this project where my goal was to rapidly produce, I found myself trying to design when I should have just been writing code. Anyway, some cool things that are in place:

Remoting.js, server/RemotingController.js, tests/RemotingTest.js
I decided not to use now.js but instead implement my own remote service framework. The framework will essentially copy services from the server to the client and replace any functions with callbacks to server/client. That way, if a remote service returns an object that should really exist only on the server, it can stub out the methods of that object so they call back into the server.

server/mongodb.js
Very basic HTTP endpoint for interacting with the MongoDB document store.

My next tasks are to implement

  • The Socket.IO services so that multiple people can interact/get notifications
  • Refactor commands so they are easier to create

Oh and some things I learned on the way:

  • NodeMON is essential for rapid development
  • Never return anything, it will just cause you headaches later, use callback functions
  • If you want to interact with MongoDB via HTTP Sleepy.Mongoose is quite good but you'll run into cross-site issues if it runs on a different port
  • Javascript has a with keyword... i need to try it


https://code.google.com/p/node-js-mud/

Friday, January 6, 2012

Holidays

Things were crazy busy over the holidays so this blog didn't get much attention over the past two months, but I've been busy writing the back end MUD for this game concept. Hopefully this weekend I will get around to creating the remote git repository and pushing what I've done so far. The framework for the back end is javascript, mongodb, and (soon) node.js. I wanted to experience first hand some of the concepts and techniques I witnessed at the mongo conference I went to. So this "MUD" back end is essentially the result of that. Here's a link to the presentation if anyone has time.

http://www.10gen.com/presentations/mongoboston-2011/cowboy-coding-learn-when-and-how-to-break-all-the-rules-for-really-rapid-prototyping

Later I'll post more details on how I envision these two systems working together.

Saturday, November 12, 2011

Sample Animation

Here's the first render of the walk cycle







Motion Capture

This week I was able to put together a walk cycle for the model I've been working on. It's no where near perfect but it's a start. Also, while I was animating I decided to look up motion capture on the internet to see if it was something I could do at home. I found a repository of motion capture datasets from Carnegie Mellon and a google code project that converted the data into various formats. I was able to take one of those formats and load it into blender, but the resulting animation / rigging wasn't 100% functional. I might attempt to write a script that repairs these files so that I can use them as a guide when positioning my rigging.


The DAZ Studio tool, which these BVH files were setup to work with, is free until the end of this month. In case anyone wants to view the motion capture datasets.


Wednesday, November 9, 2011

Re-Fingered!

I reworked the fingers on the model, and also took another stab at the hoodie and pants. I also setup the various camera angles so that the blend file can be rendered through the grails scripts. Hopefully I can find sometime this week to animate the walk cycle.



Monday, November 7, 2011

Fingerless

After playing with blender for a little longer, I've decided I'm not skilled enough for fingers. I think I'm going to remove them from my model. Here's an update with experimental clothing. I think I need to make the eyes much bigger.


Sunday, November 6, 2011

Weekend Results

Alright, so I didn't complete re-enabling exits (transitions to other rooms). I got caught up in trying to find a good solution for easy menu / dialog system. I'd really like to be able to design menus / buttons / dialogs completely in HTML (or markup that resembles HTML) and have the framework tie together the core actions. Maybe some sort of markup language for game programming...

Anyway, aside from playing with the menus, I also adjusted the main game rendering loop. It turns out scheduling a bunch of setTimeout operations and setInterval in javascript isn't that efficient. Who woulda thought? So, I merged the framerate calculation and entity update "thread" into the main render loop. This has had an excellent impact on the mobile device performance (we're now running 30-50 fps on an iPhone 3gs).

On the topic of player positioning, I adjusted the commands so that they include the current cell that the player is in, and if that cell is not visible then the player does not render. This is all client side currently, which I plan on updating so that the topic only broadcasts to the players that are in rooms nearby. I also added a periodic update to player positioning for slower devices (this produces choppy results, but at least the player is close to the right spot more often).

Also, the code base has been updated to run on grails 2.0.0 (whatever the current release candidate is). This has resolved the issues with SLF4J. Also, I updated some of the blender artifacts so they will generate correctly with the render-assets and crop-paths script. My upcoming plans are the following (not in any specific order):

  • Exits (transitions to other rooms)
  • Paths Enhancements (persistence, fixing circle template, new paths, ...)
  • Tile Enhancements (menu navigation, artifact uploads, custom color tile)
  • Static Artifacts (placement, persistence, sample artifacts (trees, buildings, ...))
  • Custom impassable regions (can replace hex regions)
  • Simple Mud Commands (attack, movement, chatting, actions, etc..)
  • NPC using the above commands
  • Node.JS fork (was suggested at work and would definitely be fun and a good opportunity to bring MongoDB back in)
I'm thinking object placement, artifact uploading, and a protocol (Simple Mud Commands) will at least set me up with an environment to be creative. The latest code is running on http://grails-js-mud.dyndns-remote.com:8080