November 2017


Progress report - November 2017

I decided to start making these progress reports, if just to give me an incentive to regularly work on the game.


I've been working on the game on and off since spring of this year. I'm working on it more regularly now, but it will take time as i am refactoring the entire code of the game. Currently it only consists of NPC guards, the floor and walls, but from a technical standpoints, spectacular progress has been made.

Artificial Intelligence

All npc's from now on inherit from a single npc_base class, streamlining adding of new npcs. The thought process for the Artificial Intelligence within the game has been rewritten from scratch, inspired by the Half Life 2 five step thought process of combine soldiers.

They can sense things with their vision (hearing and smelling is planned), after which the AI determines the state it's in, decides on the course of action and breaks those into smaller tasks. Additionally the bullets they fire are not simulated, and a hitscan is instead implemented, making dodging bullets impossible.

AI's still use A* pathfinding algorithm which can be seen and debugged with the debug overlay.

Collision detection

I have implemented a optimized collision detection algorithm, which splits the currently loaded map and world into quads, creating a quad-tree, with there being a maximum allowed ammount of entities in a quad. If that limit is breached, the quad splits. All collidable entities for which collisions are checked (such as the player) are only checked against other entities within that quad. This allows for virtually infinite maps with no visible delay on user's end that could stem from collision detection.

Quadtrees

You can see the entities for which collisions with players are being checked highlighted in red by the system. Over larger maps it significantly reduces ammount of calculations required.

Inventory

I started to work on an inventory system which will force the players to manage their limited inventory space, split into a grid, and divide it to contain all the items which may have different shapes and sizes and thus occupy different tiles of the grid. The weapons have been built into a robust data structure which allows the npcs to use that data instead of firing generic bullets at a generic firerate. (If a guard is holding a H&K MP7, they will fire it at the firearm's firerate and have the appropriate ammount of bullets per clip.

Rendering

The game engine uses a newly made drawables manager which prevents any form of layering issues to crop up (such as items behind other items appearing over the latter). The floor has been redesigned to use one sprite per floor entity which repeats its texture throughout instead of creating ridiculous ammounts of tiny tiles, for optimization reasons.


That's all for now, i'll try to post these logs relatively often.

Get Infraction

Leave a comment

Log in with itch.io to leave a comment.