Monday, February 23, 2015

WotR Formation Movement Calculator - Work in Progress [Part 1/11]

As mentioned in my last post - I thought it would be fun and interesting to start to put together a calculator in Xcode to help make the calculations for formations of Infantry and Cavalry. Over the last week I've been trying to squeeze time out whenever I could to try to make some progress on it, and I figured I'd share the current state of where it is.


The first thing I did was lay out the user interface as I has shown in the mockup dialog from the previous post. I also created a database table on the backend - since I'm not doing anything more with this application than modeling movement reconfiguration, rotation and translation the table was pretty basic and straight-forward; it basically has the Faction Name, the Unit Name (which is the primary key), the Unit's Move Value, the Unit's Type (Infantry vs Cavalry), and the Unit's Maximum Number of Companies in the Formation (which is just a placeholder - not correct, yet). I figure once I get the basics down, the next thing will be to add a second table with special rules that modify movement (e.g., Pathfinders).



As you can see below, the Desired Unit is associated with the selected Desired Faction. I also added some code in to blank the Desired Unit if you change the Desired Faction, so that it remains consistent.


The view on the right is basically and OpenGL view with a cube in it to represent the formation. I will need to get it "sized" right and use the number of companies to draw it out correctly, but it is sufficient at the moment to make sure that I'm connecting everything up correctly; and rendering it correctly in the view.


Above I'm showing the top slider that is controlling the rotation. It is set to rotate via spinning via the radio button, so it rotates about the cube's center (as it should). The other two sliders are currently set-up to handle the left-to-right and forward-to-backward movement of the formation via translation. Below you can see that I've moved the formation to the left and forward a little-bit, after rotating it.


I'm pretty happy with how it is coming along so far - the next step I want to get accomplished is making sure that I am compounding the expended Move Value - since that will be a big step forward in getting this done - and then also rendering the correct number of companies in the formation and then allowing reconfigurations.

Here is a few screenshots of the design document that I had started to put together for it.





Any thoughts so far?



LINKS TO OTHER PARTS OF THE WFMC PROGRESS SERIES


    LINKS TO OTHER PARTS OF MOVEMENT TYPES AND LIMITS SERIES




    • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 2-3 Companies [Part 11/23]
    • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised for 4 Companies [Part 12/23]
    • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 5 Companies [Part 13/23]
    • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 6 Companies [Part 14/23]
    • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 7 Companies [Part 15/23]
    • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 8 Companies [Part 16/23]
    • Movement Types and Limits Series - Reconfiguration Movement of Infantry Formations Comprised of 9 Companies [Part 17/23]
    • Movement Types and Limits Series - Cavalry Movement Example 1 from Page 33 of WotR Rulebook Analysis [Part 18/23]
    • Movement Types and Limits Series - Cavalry Movement Example 2 from Page 33 of WotR Rulebook Analysis [Part 19/23]
    • Movement Types and Limits Series - Cavalry Movement Example 3 from Page 33 of WotR Rulebook Analysis [Part 20/23]
    • Movement Types and Limits Series - Reconfiguration Summary of Cavalry Formations by Company Size [Part 21/23]
    • Movement Types and Limits Series - Cavalry Restrictions of Reconfiguration by Formation Name Summary [Part 22/23]
    • Using WFMC to Verify Movement Examples [Part 23/23]



          No comments:

          Post a Comment