Good grief

As soon as I settled on Babylon.js I found a viable process for exporting models with multiple animations from Blender in THREE.js.  The glTF exporter for Blender now experimentally, but officially, supports multiple animations.  I created a testing scene then used a very basic rigged human from opengameart.org and made some intentionally terrible animations.  The animation names (like “walk,” “run,” or “sit”) export correctly and they seem to play correctly too.  So it looks like I’m back to THREE.js.  The only real downside to this is that I’ll have to tackle collision detection again.  I don’t really want to deal with collision detection, but at least I’ll have the chance to optimize the system so that it behaves they way I want and doesn’t waste resources calculating things I don’t really care about.  I made more progress on the game using THREE.js than I ever did with any other library, so I’m actually excited to be able to start using it again.  I’m basically going to pick the old code base back up and just tweak it to load glTF files for pretty much everything.  That will take me a while, but hopefully I’m back on track.

Taking a step back…again

As cool as Unity is as a platform, it just doesn’t feel right for this project.  That’s tough because it’s obviously a professional tool and some really cool things have been made with it.  After several days of thinking about it I decided to take a look at BabylonJS again.  I’ve used that library before and it was quite cool, I just remember I got frustrated with the built-in collision detection system.  After spending months with various collision detection algorithms and never having much luck getting anything implemented, minor annoyances with the way Babylon operates seem less significant now.  I’ve been messing around with Babylon the last few days and I already have a heightmap-based terrain with a box character walking around on it, complete with collision detection and gravity.  I’ve been beating my head against the wall trying to keep the character from being able to walk up a very steep slope, but screw it.  I’ll figure that out later.  You also can’t jump, but screw that, too.  I know that can be implemented correctly but if I fight with it too much right now I’m going to give up on Babylon too and then I’ll be back to square one trying to use THREE.js and as much as I love THREE.js, the tools to create assets in Blender and import and use them in THREE.js simply aren’t ready yet and there’s no indication when they will be ready, whereas the Babylon exporter for Blender seems to work just fine right now.  So, for now, we’re moving ahead with Babylon.  It’s open source and it has many nice features, plus I can reuse my existing Node.js server side code with it, so there’s that.  I’ll try to post more frequently now that I’ve decided (again) on a tool to use, and hopefully get back to a regular release schedule as well.

Unity terrain

I’ve had my confidence in the Unity WebGL exporter somewhat restored by a little experiment tonight.  I changed the terrain in the game to a built-in terrain type object, instead of just putting a mesh collider on a big terrain mesh.  This seemed to work much better once the game was exported to WebGL without the weird hang ups I was getting before.  The stock third person controller kind of blows, but I guess I can deal with that.  The only real reason I was using a separately modeled object with a mesh collider was to get the low poly look I like on the terrain because the stock tools won’t allow you to do that with a Unity terrain object.  So this means I’ll either have to just deal with the terrain looking different from the rest of the game, ditch the low poly look entirely, or figure out how to make a Unity terrain object look the way I want.  I believe there are assets in the Unity Store that do exactly what I want, so if I ever fully settle on Unity as the game engine I want to use, maybe I’ll pony up the cash to purchase an asset that gives me the look I want.  For now, however, the terrain is just going to be smooth and textured while virtually everything else is faceted with no textures.

On a lighter note, happy birthday Lydia!  You’re lots of fun.

Rethinking Unity

I’ve been away for a bit trying to get familiar with Unity.  It’s a great toolset but I’m just not sure if it’s right for this project.  I’ve been trying to get a very basic scene to export to WebGL and while it works, it’s not exactly right.  I have a terrain object with a collider on it and my player character model moving around with the standard third person controller.  In the game editor you can move around and everything is gravy, but the WebGL export hangs up in weird places.  It’s frustrating because there are WebGL demos that were created in Unity that look fantastic, so I don’t understand why my simple scene is having issues.  I’ll keep playing with it for a while longer and if I feel like I can do what I want to do with Unity I’ll stick with it, otherwise I’ll look at all my options again.