пятница, 10 июня 2016 г.


I installed unit tests but unable to use it. It show errors and must be fixed. But why? It is should work pretty well.

Tests is running. And now I should add tests for TowerController for blueprints testing.

But which test to write first?
Should I use assertion components?

Too much information to handle. I should step easily.

For testing tower controller I should setup it with blueprint manager. And blueprint manager should be setup also.
So, I should test from beginning.

TowerController depends on BlueprintManager
BlueprintManager depends on Blueprint

So, I should check from start.

I need to find a way to instantiate by name. Then I can test my blueprints from designed one.

It can instantiate from resources. So I should make them move to resources folder.

Successfully instantiated. Now I should check blueprint for work and move it to startup.

And I should check availability for every blueprint. So common code is good to be in tests.

First checking beamer 1x2 for normal and extended pattern. I should check empty pattern and rotated one to fail

Adding upgrades

Now I think about upgrades and decks. I should get it from scene with upgrades, already implemented. Just copy them.

I can not find it in my project. Where it goes? Maybe it on archive hdd at home. And I should now implement it again. I should use prefabs for this. In Unity all must be prefabs.

I slowly flesh it out. And my memory is recalling. Maybe I can have this game playable to end of week. Then I should debug it until level is working perfectly.

Now blueprint deck view and deck has prefabs. Player tower controller has blueprint manager.

But one problem though: I do not remember where to find these big weapons? Should I use RAIN AI weapons with mine old? Or I should reintroduce all weapons in mine AI logic?

суббота, 4 июня 2016 г.

AI is debugged (partially)

As said Dijkstra: "Debugging is twice as hard as coding. And if you code at maximum, you can not debug your own code"

And it is very good note. I'm trying to debug code, but understanding unity is pretty shallow now. And looking at code I struggle with wish to rewrite code from scratch.

If I can not understand what is going wrong with parallel execution, then I can not write better code.
So, step by step I improve AI and now has build version

Alpha-150: on google drive

It has one level and all basic towers to test. Buggy, but playable.

среда, 1 июня 2016 г.

Pretty fun debugging AI

I develop AI step by step and now decided to move it to one root class - GridTowerAI.
But it is not soo easy as it sounds. I lose wait pause between shots.

It looks as very long trail of cannon/laser shots:

And it is very annoying, but interesting code collision of some metaphors.
I should check it and make it wait. One thing that help me in bug hunting - plain old paper prints.

Many monitors is pretty good, but paper is good at marking and writing thoughts (and drawing).