Red Horizon + XML + FengGUI = progress?

Posted in: Red Horizon

The project is still (and always) moving forward, albeit at the pace of most spare-time-only projects on the Internet (ie: slowly). Most recently I've started ironing-out an XML format of Red Alert's Rules.ini file. That file defined all of the configurable settings of the game, so there'll be a 'base' Rules.xml file (which includes new configurable options plus the original game settings) which can then be overriden by a RA-mod-suppplied Rules.ini, or another Rules.xml. This will allow the backwards compatibility with original mods, and open up the option to edit new, previously-unconfigurable options in newer mods. The new rules file will also be more flexible, allowing the creation of new (that's right, NEW!) units, structures, weapons, and the like.

Here's a current (although ever-changing) example of the RA Jeep unit in XML:

<unit:Vehicle
    ID="JEEP"
    Template="DefaultVehicle"
    Armour="light"
    Cost="600"
    Hitpoints="150"
    Points="20"
    Prerequisites="WEAP"
    RateOfTurn="240"
    Sight="144"
    Speed="6"
    TechLevel="3"
    Characteristics="CREWED">
    <unit:Footprint>
        <unit:Selection width="24" height="24"/>
        <unit:Hitbox width="24" height="24"/>
    </unit:Footprint>
    <unit:Weapon
        ID="JeepWeapon"
        Template="M60mg"/>
    <unit:Portrait
        ID="JeepIcon"
        Filename="jeepicon.shp"/>
    <unit:Animation
        ID="JeepUnitAnim"
        Filename="jeep.shp"
        IncludedAnims="TURRET"
        RotationAngles="32"/>
</unit:Vehicle>

As well as making the attributes look a little like those found in the original Rules.ini file, I've taken a look at how C&C3's XML files were structured, and taken some pages out of their book.

I've also started thinking about how I'm going to implement a graphical user interface (GUI) into the game. One option is to make my own, but that seems like an unnecessarily long use of my time. The other option is to use an existing Java/OpenGL GUI framework, and this is where FengGUI comes into play. The demo looks impressive, and taking a look through the FengGUI API, I'll have to make a few changes so that it'll fit into my existing code. If it works as I expect it should, then this could be the beginning of a beautiful friendship.