Shannon V. OKeets
From: Honolulu, Hawaii
August 1, 2012 Status Report for Matrix Games’ MWIF Forum
Accomplishments of June and July 2012
As indicated by the title above, this report includes items that were done in June and July. My last month’s report hadn’t provided any details on June.
I am mending the MWIF code, mending my body, and mending my ways. It’s now 5 weeks since my bypass surgery and a month since I left the hospital. The Docs say I’m doing extremely well. I’ll see all 3 of them again in the middle of August. Hopefully that will be my last visit with the cardiac surgeon. The cardiologist says he will still want to see me annually. My visits to my internist are more frequent, monthly or bi-monthly. He draws blood each time and does a fairly full analysis of its chemical composition.
I’m taking a 1 hour walk each day, which is mostly boring, and my body is insisting on 10+ hours of sleep daily. That doesn’t leave a lot of time for work - which is just as well, since I have trouble staying focused for more than a couple of hours at a stretch. I’ve lost 24 pounds since I left the hospital, most of which was during the first 2 weeks. But I continue to lose a pound every 4 or 5 days. Weighing less is really great (45 pounds more to go) since it increases my flexibility and makes changing clothes a lot easier: my clothes are now oversized so they go on effortlessly and my pants fall off as soon as I undo the button at the waist.
In the first half of July I was pretty much good for nothing, although I did manage to bring my task list up-to-date. That was somewhat difficult to accomplish since I had dropped a lot of balls when I went into the hospital. It took me a while to figure out what I had actually completed and what was only partially done. Also the beta testers had reported a lot of items over the 3 week period I wasn’t keeping a close eye on them. I had to add all their new bug reports to my task list. In the second half of July I was able to get back to working on bugs again.
Hardware and Software
Matrix/Slitherine Games programmers made more revisions to the code at the NetPlay server end. I haven’t tested those changes yet. The goal is to cut the login time from 10 seconds to under 5 - perhaps that has been achieved.
The open items for Theme Engine remain unchanged: (1) scroll bars for the detailed map, and (2) its inability to display detailed listings of file directories (i.e., the dates and stuff when opening or saving a file).
In June I released new versions 9.07.08 (13 fixes), 9.08.00 (13 fixes), 9.08.01 (25 fixes), 9.08.02 (9 fixes), and 9.08.03 (10 fixes) to the beta testers. That totals 5 new versions and 70 fixes. I didn’t release a new version in July although I am close to doing so - I want to finish up the work on factory destruction and repair which just kept dragging on and on (more about that below).
I found another half dozen small items to fix in Production Planning. Simply going through the phase myself I found some small (mostly cosmetic) things to improve. While I was also able to whittled down the number of Production Planning bugs from 19 to something smaller, the beta testers quickly identified new bugs in that phase to bring the count back up to 19 - rats. In the middle of July I worked on eliminating all the remaining bugs in Production. That phase was working cleanly in almost all cases but there were a few odd elements that needed specialized code:
• Lend Lease air units mistakenly appearing in the build ahead pool
• Missing a separate row of possible units to build for SubHunters
• Repairing damaged oil resources (e.g., in Ploesti)
• Repairing damaged factories.
Only small changes to support SubHunters and damaged factories.
Map, Units, and Scenarios
For the start of Decline and Fall I changed control of New Caledonia and some other islands in the Pacific from Germany to France.
In the Production form I added a new line for SubHunters to the list of items on which a player can spend build points. There is still more code to be written for SubHunters (e.g., for performing their missions) but at least now they can be built and arrive as reinforcements.
I spent over a week at the end of the month working on getting the code for damaging and repairing factories to work correctly (I still have a few small items to fix). CWIF had only completed about a third of this code. To start with I needed to determine what the rules were, which took me several passes and a lot of help from Orm. There is more on this at the end of this report. The optional rules for Construction Engineers and Factory Construction & Destruction necessitated a lot of branching logic.
Internet - NetPlay
Probably the biggest difficulty with NetPlay is getting the decision maker(s) for each phase, subphase, sub-subphase, and digression correctly identified on all computers, then having their decisions communicated to all players, and ultimately having the ‘phase’ end and transition to whatever comes next. Towards that goal, I modified the following to support NetPlay:
• Carpet bombing phase
• Strategic bombing phase
• Undoing land moves (reverting hex control to what it was previously on all computers)
• Weather phase
• Ground support phase
• Paradrop phase
• Land combat resolution phase
• Air transport phase
• Setup (combining multiple oil point counters in a hex into a single counter)
• DOW on minors, choosing the controlling major power, and setting up units for the attacked minor
• Displayed available Activity Counts (e.g., land moves, land attacks, etc.)
• Processing of a half dozen Naval Combat subphases - there are more to do, including the use of surprise points.
Artificial Intelligence (AI)
Nothing new: both the Players Manual and Rules as Coded are in the hands of the Matrix Games graphics person, who is doing the final layouts for how those will appear as PDFs and in print.
Tutorials and Training Videos
I still have one bug to fix for the tutorial on Production (so production can be performed for multiple countries within the tutorial). Otherwise the tutorials are done.
I need to re-record the 6th and create the last three Training Videos: 10th, 11th, and 12th. The 6th (main form and drop down menus) needs redoing because I have seriously modified some forms since I recorded that video in December of 2009. The last 3 training videos are for naval movement, naval combat, and production/politics.
Historical Video, Music, and Sound Effects
I now have all the files I need as WAV files. What’s needed is for me to insert calls into the sequence of play to activate these glitz elements.
Here are my in-line code comments on factories. The first section describes the MWIF internal Class TFactoryHex, supplemented by my understanding of the rules. The second section presents a more detailed explanation of how the rules are implemented by MWIF (e.g., what routines get called when). I almost always start coding a complex set of rules with this sort of writeup. The nitty-gritty implementation details are added as I code. What I find so useful about this approach is that by reading through what is suppose to happen I can often anticipate problems in advance of actually writing code. In addition, if I need to make changes later, I have this clear and concise description of what the code is doing as a quick reference.
// Class TFactoryHex.
// A TFactoryHex can contain up to 3 factories. The factories in the hex are
// differentiated using an index (0-2). Red factories are always listed first
// followed by Blue and then Green. Printed factories are designated Permanent
// Green factories are those that were newly built (i.e., they are not
// There is only one difference between Blue and Green factories:
// (1) Blue factories that are 'destroyed' are merely Damaged, and moved to the
// Repair Pool, while 'destroyed' Green factories are removed from the game.
// Factories can only be 'destroyed' if playing with the optional rule
// FactoryConstruction (which includes the rules for factory destruction). Note
// well that the following paragraphs about destroying, damaging, and repairing
// factories only apply if the optional rule FactoryConstruction is being used.
// There are 2 ways in which a factory can be 'destroyed':
// (1) By strategic bombing,
// (2) During the Factory Destruction phase when a major power chooses to
// destroy a Blue or Green factory using one of its land units that occupies
// the hex.
// If a Red or Blue factory is 'destroyed', by any means, then it becomes
// damaged and a unit representing the damaged factory is placed in the Repair
// Pool. If a Green factory is 'destroyed', it is removed from the game.
// Repair of a damaged factory in the Repair Pool is initiated during the
// Production phase by spending build points to repair the factory. The factory
// then arrives as a future 'reinforcement'. In actuality, upon arrival the
// factory simply changes from damaged to usable.
// If using the optional rule ConstructionEngineers, then an engineer unit must
// be in the factory's hex during the Production phase in order to spend build
// points to repair the factory.
// Both Captured and Recaptured (see below for definitions) Red factories are
// not usable if using the optional rule ConstructionEngineers until an engineer
// unit is in the factory's hex during the Production phase. There is no build
// point cost to make these factories usable.
// Code Implementation for factories.
// A factory typically has no associated unit counter. Instead, the factory is
// displayed as an icon in the hex. For example, this is true for all Permanent
// (Printed) factories. Temporary factory units are created under four
// circumstances, when:
// (1) a new factory is built [FactoryCreate -> RLID_UCrF -> PickFactory],
// (2) a factory is moved [FactoryCreate -> RLID_UCrF -> PickFactory],
// (3) a factory is damaged [DamageAFactory -> RLID_FacD ->
// FactoryDamagedOnMap -> FactoryDamage ->
// PickFactory, and
// (4) an undamaged Blue or Green factory is controlled by the enemy
// [SetHexControl -> TFactoryHex.SetOwner -> PrepareMoveReservePool /
// PrepareMoveRepairPool /
// In all these cases the temporary factory units are placed in off-map pools so
// players can see the status of factories that are not currently usable but
// which may become usable in the future.
// Building a new factory causes a New Factory unit to be created and placed in
// a Production Pool. Once the factory arrives as a 'reinforcement', the New
// Factory unit is removed from the game and the factory icon in its arrival hex
// is modified to display a new Green factory.
// Moving a Blue or Green factory by rail causes a Moving Factory unit to be
// created and placed in a Production Pool. Once the factory arrives as a
// 'reinforcement', the Moving Factory unit is removed from the game and the
// factory icon in its arrival hex is modified to display a new Blue factory.
// Some scenarios start with the USSR having Moving Factory units in the Setup
// tray and/or a Production Pool. The USSR player can placed these factories in
// any valid city hex in the USSR. However, all factories that are moved during
// a game have their destinations specified by the player when they are first
// moved. Those destinations cannot be changed and the factory must arrive in
// the city hex originally chosen by the player.
// 'Destroying' a Red or Blue factory during strategic bombing causes a Damaged
// Factory unit to be created and placed in the Repair Pool. Destroyed Green
// factories are simply removed from the game.
// When control of a factory hex changes sides, there are 2 possibilities:
// (1) the factories are 'Captured' by the enemy, or
// (2) the factories are 'Recaptured' by the side that originally controlled it.
// For instance, Germany occupying Lille 'Captures' the factories in the hex;
// while if the Allies later occupy Lille, then they 'Recapture' the factories.
// Capturing or Recapturing a factory hex containing damaged factories does not
// affect the damaged factories, unless they are in the process of being
// repaired. If they are being repaired, then that process is aborted and the
// damaged factory units are returned to the Repair Pool.
// Undamaged Blue and Green factories are never usable when Captured, but are
// immediately usable when Recaptured.
// Undamaged Red Factories are immediately usable by the new owner when they are
// Captured or Recaptured, unless the optional rule ConstructionEngineers is
// being used. If the optional rule ConstructionEngineers is being used, then
// for each undamaged Red factory in a Captured or Recaptured factory hex, a
// TFactory unit is created and placed in the Repair Pool.
// When a factory hex is Recaptured, for each undamaged Blue and Green factory,
// there should be a TFactory unit in the Reserve Pool. That unit is removed
// from the game and the corresponding Blue/Green factory immediately becomes
// usable by the original owner.
// If during the Factory Destruction phase a Blue factory is destroyed, its
// TFactory unit in the Reserve Pool is converted to a Damaged Factory unit and
// moved into the Repair Pool. Destroying a Green factory causes its Factory
// unit in the Reserve Pool to be removed from the game.
// During the Production phase, a check is made to see if there are any TFactory
// units for Red factories in the Repair Pool. If one is found, a check is made
// for an engineer unit in the corresponding factory hex. When an engineer unit
// is found in the hex, the TFactory units is destroyed and the Red factory becomes
// During the Production phase, a player may repair damaged factories using
// build points. If using the optional rule ConstructionEngineers, then an
// engineer unit must be in the factory's hex. When a factory is repaired, the
// Damaged Factory unit for the repaired factory is moved from the Repair Pool
// to a Production Pool to arrive as a reinforcement. Upon arrival, the Damaged
// Factory unit is removed from the game [ProcessReinforcement -> RLID_FcRp ->
// FactoryRepair] and the factory is shown as usable on the map (and in the
// Production Planning form).
Perfection is an elusive goal.