Epic4x: Devlog #11March 13, 2017
Posted on March 13, 2017 by dendiz So after a couple days of saving up features to write on the dev log, here is what’s been happening:
I cleaned up the command processing architecture and added event/state based hooks, so now each command has a pre-execute, execute and post execute stage that is called.
Setup/tear down tasks are be done at the pre/post stages and the execution phase does it’s magic. I also added validation for command→components mappings. So you can’t go around trying to issue a move command to a ship that doesn’t have an engine.
Issuing move commands can get confusing when there are 30.000 planets to choose from. The empires will have the location of all stars in the galaxy but they still need to survey the system to get specifics. Ships now have a sensor component that will limit the range it can navigate.
I also tidied up the parameters being passed to the endpoints using the great spring provided argument resolvers. This makes the controller layer code so much cleaner, a pleasure to work with. I also went ahead and restructured the package layout by functionality instead of application layers. There is no best practice for this so I’m trying out this type of structuring.
Now that the backend processing for commands is in place, the client needed some attention. The client is a prototype but still it needs a nice way to enable command input. Also the current command queue of the ships are listed.
I was using random string generator for names which gets a bit complicated when looking at planet/star names for navigation so I thought I’d code a small Markov chain based name generator for stars, planets and ships. Now I get names like the Heliak System, Coltar IV, Otein III and ships called Siberty. Sometimes it does spit out weird names that sound like elven too though.
I also setup the QA server with automated deployments so that I can have friends do some play testing, even though it’s still too early for that.
I merged the info requests that were made periodically into a single request to reduce server load going forward.
Tags: #gamedev #epic4x #devlog