Saturday, January 23, 2016

Day 14: Time Warp

Phew! I keep on losing track of the blog at the amount of work I've been doing.

Currently implementing a vector; the dynamic array actually holds a raw pointer to an array, but the juggling implementation with abstraction allows the user to treat it as a dynamically allocated array.

How does a dynamically resized array work? Think of an array with a set capacity but not a set size. To predetermine the amount that is pushed in, one creates an array with a default size as capacity and fills up to a set size. Whenever the size pushes over capacity, the actual array is replaced with larger one (element-by-element copy and new/delete), so it's actually quite an expensive process. Luckily it takes a lot of implementation out of the user's hands.

As for capstone? The boss is afoot! Slightly. The behavior tree has been modified so that the insects are always aware of the player when the boss is present. Think of a hive mind.

No comments:

Post a Comment