I finally got around to putting world generation in a background thread so I can use the main thread to show a loading progress bar. This was a little tricky since you can only interact with Unity on the main thread, so for things like combining meshes or spawning objects I added a main thread task queue, which will execute tasks for up to about 30 milliseconds each tick. That queue is pumped during a regular Unity Update call, so in order to get those tasks to run as quickly as possible I disabled VSync while the level is loading.
I haven’t found a good way to profile the background threads—Unity’s profiler only looks at the main thread and VS can’t profile Unity’s instance of Mono. I already have to monitor world generation progress in order to report back to the main thread so it can increment the progress bar, and I get some timing reporting out of that, but nothing granular. So optimizing this has been guess and check, trial and error. Like, comment out a line and see how much faster that makes it, to measure that line’s impact.
I’m definitely getting some ideas here about how I would structure an engine if I wrote one from scratch, in order to make procedural world generation faster. The main thing I think would be to have object types that are specialized instead of general purpose, so that it’s not super expensive to create an object. Making engine types threadsafe, or at least lockable, would be a huge win too.
I’ve had a heck of a couple of weeks. I started a new job, which means that Adventure Delivery Service is going to start moving a little slower. But I’m really happy with the foundation I built over the last ~7 months and I’ll continue to work hard on it on nights and weekends.
To that end, last weekend I showed the game at the Portland Retro Gaming Expo at the PIGSquad booth, which was a ton of fun! Thanks a ton to PIGSquad for giving me the opportunity to do that. Then on Monday I brought the game to Game Dev Demo Night @ The Mercury in Seattle, thanks a bunch to Hashbang Games and Puget Systems for making that happen! I learned a lot about what work the game needs from watching a bunch of people play through it and talking to people about what they thought. Overall I’m encouraged that people treated it like a real game, which I think means I’ve crossed a threshold where it’s got just enough polish so that once I add some more content at least people will give it a good shot before deciding if they like it or not.
There’s plenty of work left to do. At this point I’m aiming for some kind of release in 2017.
Added pine trees.
Added animated image of Doctor Orange.
New punching animation.
New sword attack animation.
New injury animation.
New death animation.
New coin model.
New wand model.
New treasure chest model.
Using new fonts.
HUD messages can stack on top of each other and fade out after a couple seconds.
Replaced almost all UI bitmaps with 3D models.
Added support for multiple screen resolutions.
Added curve to attack lunge speed.
Increase enemy count in dungeons.
The game ends after finishing the first level.
Weapon elemental particle effects use custom meshes instead of quads.
Added UI in the HUD to show certain controls.
Skeleton boss will block your attacks even when it’s attacking.
Removed free-aiming turrets while I work on their behavior.
This is something I’ve been meaning to get around to for a long time.
This is the first weapon that attaches to the left hand instead of the right hand. The shield also attaches to the left hand—hopefully I’ll be able to get it looking okay when you’re holding both the shield and the bow.
This is also the first weapon that I made a custom animation for. The wand, sword, punching, and all the other held weapons use the same animation.
This is still a little rough. In particular the string on the bow doesn’t animate, and also intersects the player geometry. But when you’re playing I think you might just not notice that.