Game Development So Far
So it’s been a couple of weeks since my last update and for those of you that keep up to date with the development of Gym Empire you’ll know that I’ve been struggling with incorporating collision avoidance for the characters. I’ve gone back and forth between using a manual system with raycasts (projecting invisible lines form the character to detect any obstacles) and using the built in Unity NavMesh. I flip flopped between the two each time certain the next would be the solution.
Other Developments
It’s been a frustrating few weeks as I am eager to move on to more of the gameplay side of things rather than visuals, but I am psyched to say I’ve finally figured it out!! I finally settled with the built in Unity NavMesh. The problem with the raycasts was that once an obstacle had been detected, making the character avoid it didn’t look natural at all. As this is a reactive way of dealing with the issue there is not enough time to move the character around without it looking overly fake. NavMesh on the other hand plans the route ahead and calculates each turn point essentially making a path for the character to follow. This creates a really nice aesthetic and works really well for the most part.
The only sacrifice I’ve had to make is allowing the characters to walk through each other. Not perfect and something I was hoping to avoid but as I tried further to solve the problem the more I realised how complex it was becoming. The plan was to have the character avoid static obstacles using the NavMesh and use raycasts for the moving objects. However this continued to show unrealistic and reactive behaviour with the clients sliding around, sometimes quite drastically, especially as the gym would get more and more populated. For the meantime, and to move onto some other areas of Gym Empire, I’ve enabled the character to just move through each other. It turns out that the situation doesn’t arise as much as I thought it would and when it does it doesn’t take away from the immersion like I worried it would. It’s still something I will return to at a later date but for now I’m really happy to be moving on.
Having completed the collision fixes over the weekend, this gave me some free time to make some minor fixes that have been bugging me before I plan my next week of work. Those fixes are:
- Removing the floating info box above the characters – I never really like the way they looked and they also didn’t scale very well when zooming in and out. Instead I have replaced them with the ability to click on the characters themselves. This then brings up the interaction box for the character where you can find out their information and interact with them. This makes the standard state of the game look much clearer and helps the overall immersion.
- Shadows – shadows have been one of those things that bugs me every time I run Gym Empire. They show up in the editor view but not in game view. It looks so much better with shadows too! Anyway I used one of my spare hours to figure out why. Turns out my quality settings for shadows was set too low. They just weren’t being generated at certain distances. Now they are things look a lot nicer! What a difference a shadow makes J. This also got me excited for the prospect of a day/night cycle. It’s something I’ve thought about implementing but seeing the effects when I change the sun location in the game look really good and will make for a great cycle!
Time Management
So back on the game dev gravy train and this week’s tasks are:
- Implement more equipment types
- Add more equipment animations
Gym Empire is now available to add to your Steam Wishlist.
Join the discord for exclusive beta access Chronik Spartan Discord.
For news and updates on Chronik Spartan games and future blog posts please subscribe.
You can support Chronik Spartan Games and get exclusive access to in depth behind the scenes news and other awesome rewards at Patreon.
