Development has continued steadily.
Men
This time I have a screenshot of a recently added new 'unit'. Infantry! They don't run around though, but rather act as a light version of a turret, as seen in the screenshot. The APC unit can deploy infantry, which is relatively cheap to do. Naturally, the infantry sentries can't take much damage before falling, but they're still a nasty thing to encounter with light units. There will be at least one other type of infantry as well, possibly an anti-tank bunker of some sort.
Caps
Build caps are now in place. It was always the plan that there'd be a limit to how many units you can have deployed at a time. The caps are currently as follows:
10 mobile units
1 turret per every engineer
2 infantry sentries per every APC
Basically, if you don't build any engineers, you don't get to build any turrets (which is pretty obvious, since engineers are the ones building them), and same with APC and infantry. Should it happen that you lose an APC while two infantry sentries are deployed, you don't lose the infantry. You just can't deploy more until you can arrange your cap to be higher than the current amount of deployed units. (In this case 2 APC's, so you have a cap of 4, with 2 infantry active, and can deploy 2 more). Capturable turrets and other such stuff to be added in future won't count towards build caps.
Optimization
Yesterday I sat down and spammed the screen with units, enough to fill the build caps, and couple more for test purposes. The fps went all downhill and stuff started to act wrong. There was absolutely nothing going on on the screen, which made me realize there's something really really wrong somewhere. Turns out that despite all the fastloops being short and to the point, combine them all and it amounts to way too much, and ran way too often.
So, I started going over the code and the loops... again. This time I settled at nothing but obliterating every single unnecessary loop (aside from couple of cases I'm still trying to arrange efficiently), and was able to improve the performance yet again. Earlier, when there were roughly 25 units idle, my CPU (according to StatBar) showed around 50% usage. With the optimizations in place, the usage in same situation is usually under 30%. I do have a gazillion of programs running on the background though, so the actual usage is probably 5-10% less on average. It does allow the game to run properly in an idle state. Explosions and other "count multiple collisions at once" type of loops are still heavy at that point though, but honestly, I'd be surprised to find people having that many units active anyways, so this is a good step towards acceptable. I'm quite satisfied.
Scenery
There's also a mountain on the background now, to add a sense of distance. It's a bit of half-assed thing though, and I might redo it, but anyways.
The to-do list is growing shorter each day, with bugs being squashed all the time. Yesterday, for the first time in a while, I felt the game is starting to feel really good. And what better motivator is there than that.
|

|