Today the game got to the point where units actually are fighting against each other. But since there no visual effects for the attacks (animation, particles etc.) or even sound, I added simple health status bars so I can see what happens.
Further more all types of units can now be defined through XML files, which allows for very flexible management of all the different unit types and of course easy adjustments. For example, the tank that can be seen on the screenshot is defined as follows:
<?xml version="1.0" encoding="utf-8"?><UnitType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Cost>300</Cost><Name>Panzer</Name><Description>Ein futuristischer Panzer mit zwei Kanonen</Description><ModelName>Models/panzer_rotation</ModelName><Race>Menschen</Race><Properties><Hitpoints>400</Hitpoints><PrimaryAttack><Damage>100</Damage><Precision>90</Precision><Range>30</Range><Speed>0.5</Speed><Type>Projectile</Type></PrimaryAttack><Armor><Type>Heavy</Type><Class>1</Class></Armor><Vision>80</Vision><Visibility>1</Visibility><MotionSpeed>20</MotionSpeed></Properties><Behavior xsi:type="AggressorUnitBehavior" /><IsBuilding>false</IsBuilding><IsAnimated>false</IsAnimated></UnitType>
<?xml version="1.0" encoding="utf-8"?> <UnitType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Cost>300</Cost> <Name>Waffenfabrik</Name> <Description>Fabrik zur Herstellung von Panzern</Description> <ModelName>Models/spaceship</ModelName> <Race>Menschen</Race> <Properties> <Hitpoints>5000</Hitpoints> <Armor> <Type>Building</Type> <Class>10</Class> </Armor> <Vision>500</Vision> <Visibility>1</Visibility> <MotionSpeed>0</MotionSpeed> </Properties> <Abilities> <Ability xsi:type="SpawnAbility"> <Cooldown>15</Cooldown> <Name>Spawn</Name> <SpawnUnitName>Panzer</SpawnUnitName> </Ability> </Abilities> <Behavior xsi:type="SpawnBuildingBehavior" /> <IsBuilding>true</IsBuilding> <IsAnimated>false</IsAnimated> </UnitType>
There in the abilities collection is the only ability of type SpawnAbility defined with a cooldown of 15 seconds. The name is purely for in-game info later on. The spawn unit name refers to any unit that was defined through XML.
With these capabilities I can easily extend the game with more units and buildings at any point without touching any code, which makes it a lot more comfortable.
I’m positive that within the next weeks the first playable version, even though very limited, will be done.