четверг, 10 декабря 2015 г.

Extracting blueprint templates for design purposees

My code of TowerController was fully responsible for blueprint management and initialization. But most levels must contain only specific blueprints. This helps make story progression.

In sandbox mode all blueprints will be provided to you, but in Minecraft-alike mode. What you remember or find online you can craft. Once crafted it will be available to rest of game and between subsequent game sessions.

And this can help us implement bundles with new weapons and blueprints. Also - modding will be easier. Maybe package for unity asset store will be developed after release.

Blueprint editor extension


Blueprints was initialized as arrays, but it only can be fit into programming side of game. But designing from code is very tedious and not visible at all. You must scan/review code to define which blueprint is registered and what it will produce.

Hopefully unity has extension mechanism. And I use it for extending editor. Now blueprints can be present by game objects and prefabs.

And all blueprints can be hierarchically placed and tuned in game.
Thoughts about grid with drag-n-drop mechanics for blueprint invention were written down to my Zim wiki.

I like to develop in places without internet. More concentration and work was done there.

One problem with unity thought:
Unity can not serialize two dimensional arrays. I forced to implement blueprint grid as vector, and access it logically by shifting from beginning by row/column count.

For testing purposes introduced the grid of sprites - it should display current template for placed modules.

Without it I should print strings in log and see what happens. Not very usable. And slow down game when testing (console output very laggy and slow)

I like visual editing and maybe in future it will be introduced for campaigns and blueprints. And if I can figure it out - implemented in game.

When this facility will be fit into game I will develop replacement for big modules.

Currently game show me how much enemies I slain and towers lost, and it counts in tens.

I temporarily disabled energy price and production cooldown for blueprint testing. And front towers life is pretty short. Seconds or less.