Tuesday, May 15, 2012

Supply and Production

I had a catastrophic crash of my laptop.  I re-installed the OS and drivers and downloaded all 85gig of my backup from Carbonite only to discover that my hard drive was bad.  I've ordered a new one and continued development knowing that at any moment my laptop may crash and be unrecoverable. 


Thank God for backups!


The one item lost was about 3 hours of map work in a Photoshop file that appears to be corrupted.  In addition, I had about 3-4 days of downtime between when the trouble started and when I was able to get coding again.


I have made some progress on the next stage, supply and production.


From the manual:

At the beginning of each nation turn, the supply network is recalculated.  It can be displayed by toggling on ‘RRS’ view (Rail / Resource / Supply) view with the ‘R’ key.  All areas in supply will be highlighted in green or blue green as described below.

The supply system in Grand Strategy WWII consists of 3 parts:

1) Supply Root
The supply root is the central hub of the supply network.  This is shown by a yellow border around the hex when in RRS view.  This must be a city connected to rail or a sea port.  The Supply Root is the central control location for all supply related activity. All supply flows through this location.  It should be protected at all costs.

By default it is the active capital.  However, the user has the option of moving the supply root.  This can be done from the control page of the cell details screen of the new supply hub location.  Moving the supply root has a cost and should only be done as a last resort.  Between 10% and 30% of each resource will be lost in this transfer.  In addition, 2 entire turns worth of rail transport points will be consumed by the move making rail transport unusable for at least the next 2 turns.

2) Supply Points
Every city controlled by the nation that can trace a path through either friendly, undamaged rail and / or sea ports to the supply root constitute a Supply Point.  These are displayed with a black border. The Supply Root is also a Supply Point.  Each Supply point provides a transportation network to and from all of the cells within its supply range.  All cells in range of supply points will be displayed with a green highlight.  Clicking on a city while in RRS mode will highlight the specific hexes in range of that city.

Each Supply Point has a priority level which can be None, Low, Medium, or High.  These determine how much supply and reinforcements will be routed to them each turn.  This can be done from the control page of the cell details panel.
3) Mobile Supply Points
Each supply unit provides mobile supply to the surrounding hexes within its supply range.  These are shown as blue green highlights.  Selecting the supply unit will highlight its specific cell range.
Flow of Resources and Supply
1) All resources in supply range (green) will be transferred each turn to the supply network and from there to the various factories that use them.

2) All manufacturing facilities will use supplies on hand to produce manufactured goods.

3) Manufactured goods will then be transferred to supply points based on their respective supply levels.

4) Supplies and reinforcements will then be transferred to mobile supply points based on their respective supply levels.

5) Supplies and reinforcements will then be transferred to units within range of the supply network based on need.

6) Supplies and reinforcements will be transferred from mobile supply units to units within their command and supply range.

7) Supplies will be transferred from mobile supply units to units within their supply range that are not in same command.
Here are some screen shots to illustrate:



This shows the green and blue green areas which show main supply and mobile supply. 


This shows the mobile supply area for the selected supply unit.  This us useful when two or more mobile supply units areas overlap.  Since combat units can only draw reinforcements from a mobile supply unit in the same command tree, it is important to know if you are in range of your mobile supply unit.


Here, units have been hidden to show the supply root (Madrid) shown with a yellow stroke and other supply points shown with a black stroke.

Sunday, May 6, 2012

Version 0.1.4.7 Completed

Sound.

I got some very good advice from an industry insider about the proper way to implement sound in a strategy game.  I decide to go ahead and implement that right away in case there were some issues with the game library I'm using.  It was pretty straightforward and I implemented both movement and combat sound.

Now I can get back to production and supply....

Saturday, May 5, 2012

Version 0.1.4.6 Completed

Fixed a few minor display issues.  Most importantly some layout issues with the unit placement panel.

Key changes:

Added command highlighting. 

Clicking on an HQ will show all units within command range with green highlight and those outside of command range as grey.  Clicking on a unit will show its command unit in red and siblings in blue.  Clicking on an HQ and pressing the 'D' key will show the command range of the HQ as yellow for 5 seconds.

Added supply corps under HQ.


This corps acts as the supply /  reinforcement center and moves independently of the HQ.  All supplies and reinforcements will go through this unit to the individual corps.

Added HQ effects.


Units in HQ range will now get a boost to organization and morale at the beginning of each turn.  Those outside of command range will not.  This can be a deciding factor in combat and allows retreating and broken units to recover.

Added HQ specific command matrix.


This adds the ability to add commands that are specific to an HQ.  The first one added is combined arms which allows the sharing of recon between units in command that are participating in a combined arms assault.  Requirements also include at least one armor / mech and one infantry unit.

Added Entrench command.


This command allows units that don't move to 'dig in' for better defensive ability.  Happens automatically to a point for a unit that doesn't move.  Can be increased further by explicitly entrenching.  Uses up all available movement.

Fleshed out Cell Details panel.

This is now a two page panel consisting of an Overview and a Production page.  The overview contains all pertinent cell details while production is a placeholder for the production model.  Also added more cell details to the combat panel.