Recommend
5 
 Thumb up
 Hide
61 Posts
1 , 2 , 3  Next »   | 

Digital Wargame Development» Forums » General

Subject: Design Diary: Wargame: Poland 1939 rss

Your Tags: Add tags
Popular Tags: [View All]
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Here something I've never done before... a design diary for a new digital wargame. Here are the details:

Wargame: It's the invasion of Poland in 1939. Hex and counter style with alternate turns.

Platform: html5 and javascript. Something I'm new to, but... like a challenge. If challenge is to much, will end up Java and Android. Will be free game on whatever platform it comes out on.

Scale: Hex will be 10-20km across. Units will be divisions or, if independent, brigades. Each turn 2 days? Stacking quite high (3+ divisions by strength).

Units: Infantry, cavalry, mechanised, tank. Possibly also parachute/airlanding. Units will have a strength roughly related to the number of infantry battalions in the unit. They will also have up to 6 (?) assets. For armour, these will be types of tanks. Other assets will be artillery, a/cars. An asset will be approximately a battalion of the relevent asset type.

Combat: First a battle of the assets: Defensive artillery, offensive artillery, armour. Then a morale check. Then (if left) defending infantry, then attacking infantry. Then another morale check. Only a single hex can attack at a time (no mass ganging up).

Movement: Likely only 4 movement types: Infantry, cavalry, mechanised, truck(for supply). Unlikely to have ZOC at that scale.

Terrain: Only a few types in Poland. Hexes are clear, rough, mountain, or sea. Forest, swamp and city will be a sub-type within a hex. Hexsides can be river. Roads for movement between hexes.

Supply: Probably by supply units (slow moving and road-bound). Supply expended for moving units. Maybe a supply unit per corps, which all that corps units draw on.

Air/Naval: Highly abstracted - air probably based out of supply units?

Players: Just Germans (and Slovaks) versus Poles. Not going to include the Soviets at this point.
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Artwork will be by
Gonzalo Santacruz de la Torre
Spain
Rivas Vaciamadrid
Madrid
flag msg tools
designer
mbmbmbmb


Plan is to re-use terrain from my ACW games (e.g. Wargame Gettysburg), with some new hexes that will appear when Shiloh is being made (my other project).

Units will be nicely clipped counters. Grey for German, White for Poland, Blue for Slovakia. The brief is to produce a generic infantry, tank, mechanised, etc unit: A coloured counter with the relevent NATO-style symbol in the middle. The rest of the unit's text will be added as required (as it will change through the game and within turns).
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Thomas Stevenson
United States
Columbus
Ga
flag msg tools
badge
mbmbmbmbmb
Will the map be a single image or drawn via tiles?
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
tas1624 wrote:
Will the map be a single image or drawn via tiles?

Tiles... maybe. My present experimentation is like this.

I have png files of the hexes and hex-border art.

I place these png files onto their own little canvases, the size of the png file.

I then place those little canvases onto a big canvas, the size of the whole map = The map canvas.

I then place this "map canvas" onto the actual html5 canvas in the html.
Units and any highlights are then also added to the html5 canvas.

Moving a unit, or draggin the map around with a finger will reposition the units and the map canvas on the html5 canvas (just a redraw of the html5 canvas)

Sometimes moving a unit will change the map (e.g. border changes): this calls a redraw of the map canvas and then a redraw of the html5 canvas

Re-sizing of the map (zoom in or out) is the most complex:
1. All the png canvases are rescaled.
2. The map canvas is redrawn (different size now)
3. The html5 canvas is redrawn

So, you might wonder why I bother putting the pngs into individual canvases. Performance. For some reason, it is faster to put, 20 little canvases of clear terrain on another canvas, than it is to put 20 pngs of clear terrain on another canvas.

This is also the reason why I have the big map canvas - it's quicker to move this around on the html5 canvas, than to move lots of individual canvases on the html5 canvas.

My practice game (which is based on Yugoslavia 1941) is here: http://www.kerpob.com/t2.html

NB - I haven't got round to doing the units as pngs yet. They are still just drawn rectangles.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Two things (among many) I don't know how to do in Javascript:

1. How to have your html in one file (e.g. index.html), and your script in another (e.g. dkgame.js). How does the html "load" the script and start it running at the right time?

2. Timing: If I want a function to only run, e.g., after 50 seconds, how do I do that?

Hope someone knows!
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
1. Script tag with src. Google that and onload events, or that special $ function if you use jquery.

2. setTimeout (and setInterval). Some new browsers have a special function for higher precision, game something.

Can post some links to good online tutorials and books later when not on phone.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Here is the map (with Yugoslavia units on it... just ignore them)

Bit sluggish, mostly because the wood image is too big.

http://www.kerpob.com/p39.html

Edit: Map is taken (with designer's permission) from Poland Crushed
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Yes, very sluggish indeed, but it looks nice.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Some details on the units:

Units are divisions and brigades. Most are divisions, brigades are only included where they were independent formations (such as the various SS and Polish cavalry brigades, plus the odd city garrison). There are about 130 units in total. Orders of battle and unit locations are fairly easy to find on the web, plus I have some books as well. The Polish stuff is a bit less well known, and Slovakian even less than that.

Units have 5 basic ratings:

Strength: Roughly corresponds to number of infantry battalions in the unit, so generally 9 for a full strength division. Some of the Polish units will start at a low strength, which will increase if they can rest - this will simulate the Polish mobilisation, which was only partly complete when the war started (units have a maximum strength).

Movement: 2 for most infantry, some Polish "cavalry" which had a large infantry component. Some static infantry are rated 1 or even zero. 3 for most cavalry and some faster infantry (e.g. mountain units). 4 for mechanised and tank units. Terrain will affect the 3 movement types (infantry, cavalry, mechanised) differently.

Morale: Graded from 0 to 6. 6 is the best, only best Panzers have this. 5 is a lot of German infantry, and a few Polish elite. 4 is rest of Germans and the Polish fist line divisions (those numbered under 20). 3 is the rest of the Polish reserve divisions and garrisons. A morale of 1 or 2 would be unable to attack. A morale of zero would retreat if adjacent to enemy.

Supply: Haven't got this fully fleshed out, although will range from full, to depleted, to none. Will affect combat ability and, for mechanised, movement.

Assets: Only tanks (other assets tbc): 1 per battalion, so a Panzer division can have up to 4, while a light division has one. These will be used in an added extra step in combat.

Unit counter will have unit symbol in middle (standard NATO). Unit name and morale (maybe colour code) Strength to left (which will show red if less than maximum), movement to right (plus supply indicator, which might be colour code or a filled circle). Below the symbol will show the assets, probably little tank icons.

Also, there is going to be an organisation level control, which will be at army level for both sides. I think I will create supply units for each army (plus some generic ones for GHQ level).
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
kerpob2 wrote:

Movement: 2 for most infantry, some Polish "cavalry" which had a large infantry component. Some static infantry are rated 1 or even zero. 3 for most cavalry and some faster infantry (e.g. mountain units). 4 for mechanised and tank units. Terrain will affect the 3 movement types (infantry, cavalry, mechanised) differently.
Some more detail... because the scale is divisional, a "tank" unit will be pretty much the same as a mechanised unit, as the main movement unit in both formations is the lorry. Cavalry will usually be same as infantry.

Move cost for clear terrain is 1 (the basic cost).
Cross a river +1 for infantry/cavalry; +2 for tanks/mechanised.
Enter a forest: +1 for cavalry; +2 for tanks/mechanised.
Enter mountainous: +1 for infantry/cavalry; +3 for tanks/mechanised.
Low supply and all move costs are +1 for tanks/mechanised.

To enter enemy owned hexes costs +1 for infantry. If enemy units are present, then it is +1 for all unit types, unless they possess tanks. (the effect of this will be that mechanised/tank/cavalry will spearhead advances, with infantry following)

All units have a minimum movement of 1 hex.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
kerpob2 wrote:
Combat: First a battle of the assets: Defensive artillery, offensive artillery, armour. Then a morale check. Then (if left) defending infantry, then attacking infantry. Then another morale check. Only a single hex can attack at a time (no mass ganging up).

Combat... options and decisions.

There are 3 basic combat options I am thinking about:

1. Only allow a single unit to attack. This is easiest to program, simple concept, but probably least commonly encountered in boardgames. I used this in my Rommel and Korean war Android games. Essentially, the unit attacks the top enemy unit in the target hex. If it beats it, it attacks the next one down (if any) at -1 bonus, then next at -2 etc. Subsequent attacks by more units on a hex (if first attack failed) get +1 bonus (then +2 etc).

2. Allow any unit in any hex adjacent to enemy units to attack. This is most frequently encountered in classic hex/counter boardgames, but not especially good looking to program - it's tricky to highlight exactly what units are attacking/can attack.

3. Just allow one hex to attack another hex. I use this in my Gettysburg and Bull Run Android games. You can highlight as many units as required for the attack via a big (some say ugly) pop-up hex.

I'm leaning towards number 3, mostly because I think that multi-hex attacks are in-elegant and "gamey". What I might have is a pop-up to give attacker option to add extra units to the attack (if they can).

Comments/alternatives welcome!
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
kerpob2 wrote:

1. Only allow a single unit to attack. This is easiest to program, simple concept, but probably least commonly encountered in boardgames.

Easy of programming is an ok reason, but a better reason for this imo is that the GUI for multiple unit attacks can get complicated (or at least slow play down a lot).

What I found a bit annoying in your old games (I still play them now and then; it is not that I am not a fan ) is that combat is so deadly. There is a lot of focus on attrition and often a whole front can suddenly disappear and after an AI turn nothing on the boards looks like it did last turn. I would prefer if, like boardgames, a more common combat result was a retreat, the only effective way to eliminate units being to surround them. But that is of course subjective.

One thing that could work is having one unit attack but give drm for being adjacent to friendly/enemy units (or only adjacent units that are not also adjacent to other enemy units, so that you place supporting units behind the attacking unit(s), not able to also attack on their own... this is what I had in mind for my vaporware Android wargame).
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
pelni wrote:
Easy of programming is an ok reason, but a better reason for this imo is that the GUI for multiple unit attacks can get complicated (or at least slow play down a lot).
Good point... I'll keep to 1 for now

Quote:
What I found a bit annoying in your old games (I still play them now and then; it is not that I am not a fan ) is that combat is so deadly. There is a lot of focus on attrition and often a whole front can suddenly disappear and after an AI turn nothing on the boards looks like it did last turn. I would prefer if, like boardgames, a more common combat result was a retreat, the only effective way to eliminate units being to surround them. But that is of course subjective.
Yes, this happens. But typical strength in Poland is nine, so units will linger for a good while!

Quote:
One thing that could work is having one unit attack but give drm for being adjacent to friendly/enemy units (or only adjacent units that are not also adjacent to other enemy units, so that you place supporting units behind the attacking unit(s), not able to also attack on their own... this is what I had in mind for my vaporware Android wargame).
Maybe - but then when these other units attack, they'll get the bonus too. Bit unfair.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Here is the combat system...

Unit attacks enemy hex - it first fights topmost unit in stack:

Defending unit's tanks hit - 10% chance per tank strength of causing tank casualty; 20% chance of an infantry casualty.
If infantry casualty caused, morale check per casualty = 10% chance attack immediately discontinues.

If not, attacking tanks hit - 20% chance of causing tank casualty and 80% chance of causing infantry casualty.
If infantry casualty caused, morale check per casualty = 10% chance defender immediately retreats.

Defender still there = defending infantry hit, with 5% chance per inf strength of causing tank casualty; 20% chance of an infantry casualty.
If infantry casualty caused, morale check per casualty = 10% chance attack immediately discontinues.

Finally, if attacker still there, the attacking infantry hit, as per defending infantry. Same chance of defender retreat if casualaties inflicted.

If defender has not retreated by this point, the attack discontinues. If they do retreat, then the attacker attacks the next unit in the hex, but loses 1 tank strength (not permanent, just for combat purposes).

This continues until all defenders retreat or the attack discontinues.

You can try it out now at http://www.kerpob.com/p39.html

Works well on Chrome on Android and laptop.
Works well on Firefox on my Ubuntu laptop.
Works slowly on Firefox on Android.
Worked last time I checked on Safari on iPod.
Dolphin and stock browsers on Android don't scroll well.
Windows 8 phone has own pointer system that I haven't implemented, so not easy to use on those devices.
Should work well on common x86 PCs/browsers (e.g. IE on Windows, Safari on OSX), but I haven't checked

Other combinations unknown...
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
I don't see the map, except for hexes adjacent to selected unit. Could not find a way to deselect a unit without spending all its movement points. After moving a unit or two in turn two the game stopped responding. This was in desktop (Ubuntu) Firefox.

Also tested in Opera Mobile and also saw the white map and only adjacent hexes rendered.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
pelni wrote:
I don't see the map, except for hexes adjacent to selected unit. Could not find a way to deselect a unit without spending all its movement points. After moving a unit or two in turn two the game stopped responding. This was in desktop (Ubuntu) Firefox.

Also tested in Opera Mobile and also saw the white map and only adjacent hexes rendered.
Click reload to get map usually works. Waiting for images to load on my to do list!
Deselect broke. Should just be tap anywhere unselected.
I've played to completion ( no poles left) on Ubuntu/ Firefo. There are still bugs.
Got polish infantry icons now.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
kerpob2 wrote:
pelni wrote:
I don't see the map, except for hexes adjacent to selected unit. Could not find a way to deselect a unit without spending all its movement points. After moving a unit or two in turn two the game stopped responding. This was in desktop (Ubuntu) Firefox.

Also tested in Opera Mobile and also saw the white map and only adjacent hexes rendered.
Click reload to get map usually works. Waiting for images to load on my to do list!
Deselect broke. Should just be tap anywhere unselected.
I've played to completion ( no poles left) on Ubuntu/ Firefox. There are still bugs.
Got polish infantry icons now.

Fixed image loading and deselect (tap anywhere unselected, or on unit if it is alone in the hex).

Used this for image loading: http://stackoverflow.com/questions/7618213/html5-canvas-imag...
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
pelni wrote:
After moving a unit or two in turn two the game stopped responding.

Think I've fixed this - it was a retreat bug. I've added supply units, but they don't do anything yet.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Seems to work now in Opera Mobile on this phone (Nokia N9). A bit slow, but no crashes or obvious bugs.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
pelni wrote:
Seems to work now in Opera Mobile on this phone (Nokia N9). A bit slow, but no crashes or obvious bugs.
I think that html5 is still being implemented by the various browsers. Chrome and Safari work very well... firefox is OK, other are slow or don't work. IE has it's own pointer control which I haven't implemented yet, but seems OK other than that.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
SUPPLY - here's how it will work.

Combat uses up supply - units have a max of 2 points to spend. Attack costs 1 point; defending and being forced to retreat costs 1. Maybe moving tanks/mechanised also costs 1?

GHQs are supply sources. Each turn, they supply x supply points to army HQs - depending on distance, this will be 2, 4, 6 or 8.

Army HQs then re-supply their units, nearest getting priority.

Obviously cut-off units, or units losing their HQ, will no longer get any supply. Units with low supply (1 point) have a yellow dot to the right of their unit type symbol. Units with zero supply have a red dot.

EDIT: Supply length for HQs is 15 mech moves.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Thomas Büttner-Zimmermann
Germany
München
Bavaria
flag msg tools
badge
Wiggle It!!!
Avatar
mbmbmbmbmb
Hm, I just tried this on my Nexus 4 with Chrome - but the site hangs...
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Almecho wrote:
Hm, I just tried this on my Nexus 4 with Chrome - but the site hangs...
Try refreshing the page - that sometimes helps. Good phone btw!
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Just tried building it with PhoneGap - not good results for Android... images grainy, and can barely drag the screen. Odd, as works well enough on my phone as pure html5/javascript.

EDIT: Reason is PhoneGap implements itself via the stock browser, which isn't very good for canvas-intensive operations. I tried an alternative (CocoonJS) which rolls its own canvas system, and this worked well enough for me to probably use when this becomes an App.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
Got it working OK, so after a brief break figuring out how to do smooth scrolling, I'm now onto the gameplay again. Also, got unit artwork:




Game can be tried out at www.kerpob.com/p39/index.html

Works on most browsers on most OSes. Notable exception is MS Explorer.

Would love someone to try it on an iPad - I only have an iPod to test on.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
1 , 2 , 3  Next »   |