Showing posts with label Cover. Show all posts
Showing posts with label Cover. Show all posts

Tuesday, August 22, 2017

Update 47: Cover and Flanking

In my last update I showed a screenshot with a soldier in cover. In this latest update, I've added an enemy and added the code that marks the players as in cover or being flanked/out of cover.

Here my player is in cover (the enemy has a lower chance of hitting the player and dealing damage):




Here my player is flanked and not in cover (the enemy has a much higher chance of hitting the player and dealing critical damage):


There was actually quite a lot of rework involved in the code and corresponding systems to get the enemy soldier to (re-)appear and have everything work. The next update will be even more involved as I refactor the code into more systems and add more players and enemies - adding turns that switch back and forth after movement.

Monday, August 14, 2017

Update 46: OpenTile

Two years can really fly by. Growing families, big work projects, small home projects, and as many distractions as you can throw at a sticky wall, here I am. I haven't been doing nothing, I just haven't been writing about it. I'm trying to change the not writing about things problem today.

One of those mini projects I've been working on is very relevant for this project. About a year and a half ago, I started a GitHub project I've called OpenTile. OpenTile is an opensource solution to create the building blocks and data structures for a tile based game. There is no UI, apart from the ASCII files, but it's being built in C#, with a branch for Unity3d. There is currently functionality for basic path finding, possible available tiles (for movement), cover, as well as a number of utility functions. 

I've found this framework really helpful for building a game. I'm able to focus on fundamental functionality such as path finding or cover in a simple ASCII UI, and then it's much easier to integrate the changes into a full 3d engine - with the confidence that it works.

In the screenshots below you can see two simple examples that show the output of path finding on a large map with varied obstacles.





In Unity3D, this is what the result looks like on a small test map: