Over the last week I’ve been starting to convert Exitus over to libGDX & Kotlin. During the process a couple of additions have also been added.
Not just squares
The first noticeable change is that the city generation now allows non square buildings to be created. This was on the list of changes for quite a while but it’s been added in during the rebuild. You’ll have to excuse the textures, it’s still using the whole spritesheet as the centre textures for the building sections.
The other change is the appearance of buildings. The building models now have two different height walls for the internal and external views. Outside a building has full height walls but moving the camera inside the building cuts away to show the current floor. The left image shows the internal view and the right image shows the external walls (in the top left).
After finishing the basic structure of the building, the next step is to add neighbouring city block generation for an infinite map.
The last week has been mostly spent working on two core mechanics. Although both could still do with some tidying up, they’re both functional.
The idea behind reactive pathfinding is that the character will keep checking their path as they progress down it to see if the route can be optimized. The result will therefore be a shorter path and hopefully one which looks more natural.
Field of View
Field of view is a key mechanic so the characters can see enemies and know how to remain hidden. The method was completely changed from the original. Instead of doing a periodic check along an angle like what was originally used, it now uses a line intersection check to see where the ray hits a wall. This will give a smoother line next to walls.
Well now the field of view is in place the next step is to add in the mechanics of what to do once something is seen. This will be the beginnings of adding in some sort of simple behaviour to the characters.
It’s been a while since working on Exitus but it started playing on my mind over Christmas as to why it was abandoned. The main reason was due to the time to take fixing bugs and not progressing, these bugs were mainly due to trying to build something too quickly and the structure becoming difficult to maintain.
It was therefore decided to reign back some of the features for now and rework them. It also allowed me to familiarize myself with something I had been interested in for a while, WebGL.
After building up the core groundwork for WebGL I began incorporating previous pieces back into the new version.
So far the city generation is in place but limited to just one block, there’s also no internal structure which was one of the pieces which needed the most fixing. The path finding is also in place but being worked on again to give it some well needed improvements, the main being implementing reactive path finding to make it look more natural.
After spending a fair amount of time on the perimeter buildings and not getting it to work nicely I’ve stashed it for now to work on other pieces.
I’ve added some basic characters, enemy and player. Currently they’re just coloured circles with a code showing their field of vision. If a player goes into an enemy’s FOV then the player will turn white. Just so we know they’ve been seen, in the future they’ll start chasing the player.
Players are black and can be selected, once selected they can have a path created by clicking on the map. Enemies will just move randomly around the map.
I’ve spent a little time working on a project to learn ECMA6 and the process of transpiling it down to ECMA6. The project is essentially rewriting a collection of code I’ve previously written in other languages and merging them together to play nicely. I’m now considering developing it further into a survival game.
So far I’ve put together the bulk of the city generation and the polygon path finding. The polygon mesh currently consists of the roads and a very basic algorithm for building layout. In the image the polygons are only visible for the current city block you’re currently in. This is only temporary so you can see the room layout as there’s no building textures yet.
I had originally thought that having procedurally generated building layouts would be good but I’m now thinking that having preset layouts would be a better idea.
There’s some lag while moving around the world which I’ve got to address and I’ve still to combine the perimeter buildings as they’re currently split by the city block edges. I’m also eager to get some sort of gameplay added in.