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.
A working example can be viewed here and the code is available on github