[8] The Editor

10/20/2019, 11:27am

This weekend I worked on the world editor.

It's an application built in Unity, which will be useful when I share the terrain library with the game client. If Unity native plugins weren't such a hassle to work with, maybe I would have written the terrain engine in Rust so I could also share it with the server. However, the way it's looking now means the server will not need to maintain the terrain mesh, so it wouldn't be necessary. The game server only needs to load the world file to get info it cares about, like walkable tiles and entity placement.

When starting a new terrain, a small primitive island is generated. Eventually, a much larger island would become the base for Antorum. I've tested it on larger sizes and it still runs well, but my current dev machine is a macbook with a very loud fan so I've been keeping the scale down for better performance. I haven't added trees yet.

My main focus has been the shovel tool, and tool system in general. You can drag tile corners to modify them, or you can drag on the center of a tile to raise/lower the whole tile, just like the original RollerCoaster Tycoon. That game was my main inspiration for using this style of terrain.

There's also support for larger brushes, and a tile smoothing tool that is still in a rough state.

I thought I was going to implement world loading on the game client today, but I decided to take the rest of the day off. I'll plan my time more accordingly this week, and hopefully conclude the entire months work with a large update.

Eventually, you'll be able to place trees/fauna, NPCs, and various other entity types. You'll also be able to mark walkable tiles, which the game server will use for pathfinding. The goal is to get the editor to a point where I can build a simple enough world to pilot new features in, as well as give players something to explore when I open up the server for testing.

Other Contributions

This week there's some contributions to share from somebody other than me!

Mike has jumped into the project and started to do some refactors and cleanup on the backend. Here's some of the stuff he got done:

  • Bugfix: Clients can no longer log into an account that is already logged in elsewhere.
  • Players now log in with a username instead of email address.
  • All SQL code and database schema are now in a separate crate, to be used by the game server and web server.