Editor Update

Feature Development, World Editor

I’ve made some more good progress on the world editor.  Here is the full list of features as of today:

  • Relatively full saving and loading capabilities.  That is, you can save and load terrain changes and the location, rotation, and scale of objects in a scene.  Terrain data is saved in a custom heightmap image file.
  • Terrain editing including raising and lowering terrain and smoothing.
  • Add assets to a scene from a menu.
  • Translate, rotate, and scale assets that are added to a scene.

Listing it out, it’s not all that impressive considering the amount of work it has taken to get the editor to this point.  Still, I’m fairly happy with it and I’m pretty much at the point I wanted to reach by the end of February, so that’s encouraging.

I think the best course of action is to release a new version showing off the features of the world editor.  I’ll try to do that tomorrow.  Then I need to spend some serious time actually designing the game.  I have a vague idea of how I want the game to look and work, but I can’t develop from a vague idea.  I need specifics about classes, races, maps, battle systems, crafting systems, economic systems, etc., etc.  So after a version release tomorrow I’ll spend several days, if not more, trying to get the very basics of an actual game planned out so that I can start working on features in a more coordinated way.

Oh, and I guess I need to get an asset spotlight done as well.  Hopefully I can do that over the weekend, although designing assets of any value without a real game plan in place is … challenging.  Still, I’ll make something generic that I know I can use no matter what.

Next step

Feature Development

I’m honestly not sure what the next step is for development of the game.  I’ve been thinking about battle mechanics and I have an idea for a system that is pretty different from a typical open-world MMO, but I’m hesitant to go all in with the idea because I didn’t start this project to do things differently, and doing things differently involves risk.  That being said, doing things exactly the same as they’ve always been done also involves some risk, so I’m torn.  Because the battle system is pretty core to the game experience as a whole, I need to make this choice correctly the first time.  I’d rather not have to implement a new battle system after the game is up and running.  Of course, one of the nicest things about the web as a platform for games and not working for a big company is that I can try things that are probably completely crazy.  For instance, I could have the battle system work completely differently in different parts of the world, or maybe have open world battle done like a typical MMO then use something different for party play.  I’m only constrained by what I can think up and implement.

I’m glad I started this post because it’s help me decide to go back to the typical MMO open-world battle system for now.  That’s what players will be used to and if I want to add in another system later I can always do so.

So, I think my next step is to recreate an attack animation for the main character and implement a very basic battle system.  It will be nothing more advanced than “attack an enemy and it dies” but that will do for now.

White flower

Feature Development, Planning and Development

I needed a small break from thinking about the world editor so I made a flower.

Here it is in all of it’s flowery glory.  It’s 249 triangles with 4 materials.  That’s actually a higher polygon count than I was hoping for, but since the petals are actually solid (not just planes) it bumped up the count a bit.  I can go back and make the petals into planes later if it becomes an issue, but I doubt it will.  Here’s a little closer shot so you can see all of the magnificent details.And here’s a shot where you can pretend you are a bug or some very small animal.  
I found Neverwinter a few days ago.  As with any game where you make fairly fast progress at the beginning it’s been really engrossing.  Unfortunately it’s eaten into the very limited amount of time I have to work on Lyridia, but I’m calling it market research because Neverwinter is free-to-play so it’s interesting to see how a real studio makes money from this business model.  It’s also a very pretty game and has inspired me to think about the style I want Lyridia to be, from the visuals to the audio to the general feel of the game.  I’m trying to work on the most basic bones of a game engine before I invest too much into what the final game will look like.  Once I get the base system working I have someone in mind I would like to collaborate with to work out the art style and much of the gameplay style as well, so hopefully I’ll be to that point by some time this summer.

I may be stalling

Asset Spotlight, Feature Development

The truth is that I really don’t want to dig into the camera controls for the game.  Since I’m using a FollowCamera it does a lot of the work for me but also sort of hides most of the details.  For instance, I was trying to do some very basic mouse event capture and was getting weird results.  I can only assume this is because BabylonJS is capturing mouse events as part of the FollowCamera, but I don’t really know.  What’s happening is probably well documented somewhere but I haven’t taken the time to dig in and find out yet, so for now it’s a little frustrating.  I didn’t really get anything done last night because there was a car wreck at the entrance to the neighborhood where I live and it took out the power for a big chunk of the night.

So, a distraction.  The game needed some grass.Isn’t that maybe the most realistic grass you’ve ever seen in your life, including times you’ve seen actual grass with your actual eyeballs?  It’s 24 triangles and, of course, no collider.  So I can add a ton of these to the game without affecting performance much.  Why, you ask, not just use a texture on a plane?  After all, that’s just 2 triangles.  True, but I’m trying to stick to a “materials only” style for performance reasons.  This model is actually a solid object with volume.  I may try to make some other grass that’s just a double-sided flat mesh.  I know BabylonJS can handle double-sided materials, but I’m not 100% sure how to tell it in Blender that’s what I want.  Also, I may eventually make an exception to the no textures rule for simple elements like this since I can keep the texture sizes very small.  We’ll see.

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.

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.