tag:blogger.com,1999:blog-23464637577401495442021-10-10T09:34:32.341-04:00GMT Panzer SOLO ProjectConverting GMT Panzer board game to a computer game while trying to stay sane. Reading rule books and writing code :)8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]Blogger15125tag:blogger.com,1999:blog-2346463757740149544.post-2450782314619868592020-12-29T11:25:00.008-05:002020-12-29T13:40:26.758-05:00Panzer SOLO: Latest Development Update<p></p><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;"><br /></span></div><div class="separator" style="clear: both; text-align: justify;"><span style="text-align: left;"><div class="separator" style="clear: both; text-align: left;"><a href="https://1.bp.blogspot.com/-6YTulQsdBAA/X-tGe8sW2TI/AAAAAAAAC4I/WRt8xkyxtwMMn45ZIxhHjdGbzDsLll_YQCPcBGAYYCw/s441/Screen00054.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: justify;"><img border="0" data-original-height="357" data-original-width="441" height="91" src="https://1.bp.blogspot.com/-6YTulQsdBAA/X-tGe8sW2TI/AAAAAAAAC4I/WRt8xkyxtwMMn45ZIxhHjdGbzDsLll_YQCPcBGAYYCw/w112-h91/Screen00054.png" width="112" /></a></div>Today we'll cover a number of areas that I've been focusing on lately, including suppression recovery, ammunition availability, ammunition limits, the new battle map, a more useful spotted units area, the short halt command, as well as the implementation of the solo rule for identifying the most dangerous enemy unit.<span><a name='more'></a></span></span></div><p></p><div><div style="text-align: justify;"><br /></div><h3 style="text-align: justify;"><span style="color: #e69138;">Suppression Recovery</span></h3><div><span style="color: #e69138;"><br /></span></div><div style="text-align: justify;">Let's start thing off with my implementation of "Suppression Recovery". When each turn has ended, any units that have "Suppression Off" counters will attempt to "Recover". The suppression recovery form appears for each unit and indicates any modifiers (such as "Command other than No Command"). in the screen below, we see that the Soviet ("Green grade") unit did not roll in the recovery range (highlighted in orange).</div><div style="text-align: justify;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-7hsxX_ZtFf8/X-tGfz7XFOI/AAAAAAAAC4U/RL_6qZDlYh4JSYrmjPvfHSGXxvACU6d7wCPcBGAYYCw/s1920/Screen00053.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-7hsxX_ZtFf8/X-tGfz7XFOI/AAAAAAAAC4U/RL_6qZDlYh4JSYrmjPvfHSGXxvACU6d7wCPcBGAYYCw/w640-h360/Screen00053.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">Suppression recovery failed. The unit will remain suppressed for the next turn.</span></td></tr></tbody></table><div style="text-align: justify;"><br /></div><h3 style="text-align: justify;"><span style="color: #e69138;">Ammunition Availability</span></h3><div><span style="color: #e69138;"><br /></span></div><div style="text-align: justify;">Ammunition availability dates (like HVAP, APCR) can only be used when they are available according to "Notes" section on the unit's data card (bottom of each card). Note the scenario date (July 1943) at the top middle in the screenshot below. The T-34 M44 unit card is displayed, but notice it's HVAP ammunition type is not listed. HVAP for this unit is not available until January 1944.</div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><br /></div></div><div class="separator" style="clear: both; text-align: center;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Y-jiFYs1FwA/X-tL7HqtUsI/AAAAAAAAC5A/4jfq8Pk7OZQmsPVzKWnlajfYuU5jA2nKgCLcBGAsYHQ/s1920/Screen00058.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-Y-jiFYs1FwA/X-tL7HqtUsI/AAAAAAAAC5A/4jfq8Pk7OZQmsPVzKWnlajfYuU5jA2nKgCLcBGAsYHQ/w640-h360/Screen00058.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">It's July 1943. HVAP is not available for the Soviet Tank until January '44.</span></td></tr></tbody></table></td></tr></tbody></table><br /><div style="text-align: left;"><span style="text-align: justify;">Notice in the next screen (below), after changing the scenario date to January 1944 and reloading the scenario, HVAP is now listed in the unit's ammo listings on the unit card...</span></div><div style="text-align: left;"><span style="text-align: justify;"><br /></span></div></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-D-8jYD-_QdI/X-tS2EAhlfI/AAAAAAAAC54/q6FNYCtYLz4en9sbtrkM-gZs6OUm4o-igCLcBGAsYHQ/s1920/Screen00060.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-D-8jYD-_QdI/X-tS2EAhlfI/AAAAAAAAC54/q6FNYCtYLz4en9sbtrkM-gZs6OUm4o-igCLcBGAsYHQ/w640-h360/Screen00060.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">This scenario now takes place in November 1944, so HVAP is available for the T-34.</span></td></tr></tbody></table><div style="text-align: justify;"><br /></div><h3 style="text-align: justify;"><span style="color: #e69138;">Ammunition Limits</span></h3><div><span style="color: #e69138;"><br /></span></div><div style="text-align: justify;">Ammo Limits presented a bit of a logical challenge the way my code works, but it's done! You'll notice in the screen below that the T-34 has ammo limits (A:A5) indicated for its 76.2 mm L/43 main weapon. Normally, the T-34 has HVAP ammunition which is subject to ammunition limits. However it is too early in the war for HVAP, therefore no ammo limits apply in this case. This is indicated in the "Battle Box" window in the area called "Ammunition Limits". If the T-34 ammo limits indicated A:3, it's AP (armour piercing) ammunition would have been subject to ammo limits. </div><div style="text-align: justify;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Gzf2v-lc9hw/X-tROpVVDmI/AAAAAAAAC5s/7nGdr0xy0GgUj4I7Rlu6QXTOKnVX7g5LgCLcBGAsYHQ/s1920/Screen00059.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-Gzf2v-lc9hw/X-tROpVVDmI/AAAAAAAAC5s/7nGdr0xy0GgUj4I7Rlu6QXTOKnVX7g5LgCLcBGAsYHQ/w640-h360/Screen00059.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">No ammunition limits apply in this case.</span></td></tr></tbody></table><div style="text-align: justify;"><br /></div><div style="text-align: justify;">In the next screen, we have a different scenario that takes place later in the war, making HVAP available to the T-34. The Soviet player has selected the HVAP ammunition against the German Panzer IV. Since the HVAP ammo is subject to ammunition limits (indicated by the "A" beside the HVAP ammo listing on the unit data card), our first roll for this FIRE command is to roll to check if ammo limits will apply for this shot. Since the T-34 has an indicated ammo limit of 3 for any "A" type ammunition (A:A3, indicated in the main weapon data on the data card), we need to roll 3 or less to avoid ammunition limits. The Soviet player rolls a 4, so ammo limits apply and will modify the upcoming "To Hit" number...</div><div style="text-align: justify;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-qajA9wzXj1U/X-tTsepH3TI/AAAAAAAAC6Q/GYp51fxdG6cvFSXU3HjBzoYGSH2r9BKQgCLcBGAsYHQ/s1920/Screen00061.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-qajA9wzXj1U/X-tTsepH3TI/AAAAAAAAC6Q/GYp51fxdG6cvFSXU3HjBzoYGSH2r9BKQgCLcBGAsYHQ/w640-h360/Screen00061.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">Unfortunately ammo limits apply to the Soviet player's shot.</span></td></tr></tbody></table><div style="text-align: justify;"><br /></div><div style="text-align: justify;">You can see in the screen below, that the ammunition limits modifier is highlighted in the "AP Hit Modifiers" table below (Ammo Limit, Heat Haze). This modifier represents a shift of 3 rows down (not good) on the "AP Hit" table. Instead of moving only 3 rows down on the AP Hit table because of the Unit Company's "Green" grade (highlighted in orange), we actually end up moving 6 rows down. 3 rows down for the green unit grade, but then an additional 3 more rows down because of ammo limits. The result is a "To Hit" number of 20 (20% chance of hitting the target), instead of 35 (35% chance of hitting the target)...</div><div style="text-align: justify;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Kw-iYEydiIs/X-tUFAqfJFI/AAAAAAAAC6c/cMkmmKNHuTMvQjHhRDWOM6G3ivMWrPm8wCLcBGAsYHQ/s1920/Screen00062.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-Kw-iYEydiIs/X-tUFAqfJFI/AAAAAAAAC6c/cMkmmKNHuTMvQjHhRDWOM6G3ivMWrPm8wCLcBGAsYHQ/w640-h360/Screen00062.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">Applied ammo limits affect this shot reducing our chances of hitting the target by 15%.</span></td></tr></tbody></table><div style="text-align: justify;"><br /></div><h3 style="text-align: justify;"><span style="color: #e69138;">Battle Map</span></h3><div><span style="color: #e69138;"><br /></span></div><div style="text-align: justify;">Moving on, I have implemented a "Battle Map" (screen below) that opens when a unit executes a FIRE command. The battle map focuses on the firing unit and the target unit and displays them in the window. This comes in useful when the 2 units aren't necessarily both viewable at the same time on the main map...</div><div style="text-align: justify;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-aG2nyrGCqpo/X-tWLiFKV2I/AAAAAAAAC64/7TmIquCgpI4fAO9N5wAutma8St0vNTDGQCLcBGAsYHQ/s1920/Screen00063.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-aG2nyrGCqpo/X-tWLiFKV2I/AAAAAAAAC64/7TmIquCgpI4fAO9N5wAutma8St0vNTDGQCLcBGAsYHQ/w640-h360/Screen00063.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">The "Battle Map" gives a better visual of the shot's firing and target units on the map.</span></td></tr></tbody></table><div style="text-align: justify;"><br /></div><div style="text-align: justify;">In other developments, I have created a new "Spotted Unit" area where the player can view many more details of units that have been spotted by the player's selected unit. You'll notice in the screen below that the selected unit's data card for the Panzer III is displayed at the bottom left. To the right of the data card is the "Spotted Units Area", listing all units spotted by the Panzer III, including the top down graphic and relative size of the unit. Included in the details for each row are the range to each spot, the aspect angle relative to the selected unit, and any counters applied to each unit. Each column in the table can be sorted as well...</div><div style="text-align: justify;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-R-KH9aRRKkE/X-tWy8MEc8I/AAAAAAAAC7Q/69WB3BqaAF0pQTlMLFBWh0Ll_fDk6hIngCLcBGAsYHQ/s1920/Screen00064.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-R-KH9aRRKkE/X-tWy8MEc8I/AAAAAAAAC7Q/69WB3BqaAF0pQTlMLFBWh0Ll_fDk6hIngCLcBGAsYHQ/w640-h360/Screen00064.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">Note the counters (Damaged, Bail, Track, etc) displayed for each spot in the Spotted Units Area.</span></td></tr></tbody></table><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><br /></div><h3 style="text-align: justify;"><span style="color: #e69138;">Short Halt</span></h3><div><span style="color: #e69138;"><br /></span></div><div style="text-align: justify;">I have also added the logic for the SHORT HALT command. It was easy! Because I had already wrote the code for FIRE and MOVE commands, the logic for adding a SHORT HALT command was pretty basic... just add a FIRE and a MOVE command to the unit :)</div><div style="text-align: justify;"><br /></div><h3 style="text-align: justify;"><span style="color: #e69138;">Most Dangerous Enemy Unit</span></h3><div><span style="color: #e69138;"><br /></span></div><div style="text-align: justify;">One of the more exciting blocks of code I've written so far, was the solitaire "Most Dangerous Enemy Unit" function. This function assesses each spotted enemy unit for a selected unit and calculates the how "dangerous" the enemy unit is to the selected unit. It takes into account a number of factors, including aspect angle, range, combat modifiers, ammunition penetration, defensive armour, chance of elimination, N-effect (for general purpose ammunition) and more!</div><div style="text-align: justify;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-ljZWbaZE_Sc/X-tATprQVfI/AAAAAAAAC3w/kBJ2Ajm6kbE4K9OFu63Gheyry-0thjLPACPcBGAYYCw/s1920/Screen00052.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1041" data-original-width="1920" height="348" src="https://1.bp.blogspot.com/-ljZWbaZE_Sc/X-tATprQVfI/AAAAAAAAC3w/kBJ2Ajm6kbE4K9OFu63Gheyry-0thjLPACPcBGAYYCw/w640-h348/Screen00052.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: justify;">Code, code, code. And more code.</span></td></tr></tbody></table><div style="text-align: justify;"><br /></div><div style="text-align: justify;">I'll definitely be posting a video of most of the items covered today. Check back soon and until next time. I hope you enjoyed this update.</div></div><div style="text-align: justify;"><br /></div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]3tag:blogger.com,1999:blog-2346463757740149544.post-90606718730515285382020-12-02T15:00:00.015-05:002020-12-04T08:33:38.026-05:00Firing Attached AP Ammunition - Leg Unit to Combat Vehicle<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Kbe1ahomlxI/X8fapF5KFpI/AAAAAAAACvY/IqGugRhmJPQ4N8xo7H7j5j7kDTy_ORJ-wCLcBGAsYHQ/s150/Screen00049.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="144" data-original-width="150" src="https://1.bp.blogspot.com/-Kbe1ahomlxI/X8fapF5KFpI/AAAAAAAACvY/IqGugRhmJPQ4N8xo7H7j5j7kDTy_ORJ-wCLcBGAsYHQ/s16000/Screen00049.png" /></a></div>Today we'll look at a small test of leg unit vs combat vehicle action for the purposes of demonstrating an AP (armour piercing) attached crew served weapon attack. We'll assign a fire command to the leg unit and fire the M1 Bazooka on an unsuspecting Panzer IVG.<span><a name='more'></a></span><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The situation: A lone Soviet elite Rifle Squad carrying a crew served M1 Bazooka attached weapon sits above the clearing to the south, protected by light woods. A single elite crewed Panzer IVG is spotted making it's way to the end south of the village of Stravrhevoy. The Soviet squad waits patiently for the German tank to creep into range of their Bazooka's AP ammunition.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-j5GjJmu-s60/X8famaJva4I/AAAAAAAACvw/7IaFNBMDgzwzeYO8q-Ci23o7o_KZikmzACPcBGAYYCw/s1474/Screen00036.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="828" data-original-width="1474" height="360" src="https://1.bp.blogspot.com/-j5GjJmu-s60/X8famaJva4I/AAAAAAAACvw/7IaFNBMDgzwzeYO8q-Ci23o7o_KZikmzACPcBGAYYCw/w640-h360/Screen00036.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Our first catch of the day.</i><br /></td></tr></tbody></table><br /><div class="separator" style="clear: both; text-align: left;">We can see the solid green spot line from the Soviet squad to the German Panzer. This not only indicates that we have line of sight (LOS), but that the squad is also able to fire with at least one of its weapons. Looking at the Soviet data card, we can see that this unit has 2 weapons. Its intrinsic GP (general purpose) Rifle squad weapon, as well as a crew served attached AP M1 Bazooka.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-LS__aTeIkEE/X8fal4WRGwI/AAAAAAAACvk/hFH7GGA5VmsnmjOu-wW-pZ4gY9nytzNvwCPcBGAYYCw/s577/Screen00040.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="81" data-original-width="577" height="90" src="https://1.bp.blogspot.com/-LS__aTeIkEE/X8fal4WRGwI/AAAAAAAACvk/hFH7GGA5VmsnmjOu-wW-pZ4gY9nytzNvwCPcBGAYYCw/w640-h90/Screen00040.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The Rifle squad has both a GP and an AP weapon.</i><br /></td></tr></tbody></table><br /><div class="separator" style="clear: both; text-align: left;">The German unit is at range 3. At this range the Soviet Rifle squad's intrinsic GP weapon has a factor of "6". However, its M1 Bazooka at range 3 has a factor of 20. Much better :)</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Each ammunition listed can be either enabled or disabled (greyed out) depending on whether it can be used against any of the unit's spotted targets. If an ammunition is out of range, or cannot be used against a particular enemy unit, it cannot be used in battle. In this specific case, both ammunitions listed are available to be used against the German unit.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here is the data card for the German tank. The "Defensive Information" area displays the possible data points (highlighted in orange) relevant to this attack...</div><div class="separator" style="clear: both; text-align: left;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-WGZT8qbGDao/X8falj_FksI/AAAAAAAACvg/LsRm1lYGSckmE0Ach3u9_ALf04NHvqL3QCPcBGAYYCw/s772/Screen00038.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="519" data-original-width="772" height="269" src="https://1.bp.blogspot.com/-WGZT8qbGDao/X8falj_FksI/AAAAAAAACvg/LsRm1lYGSckmE0Ach3u9_ALf04NHvqL3QCPcBGAYYCw/w400-h269/Screen00038.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>In this attack, the Soviet squad has a "Front Side" aspect angle on its target.<br /></i></td></tr></tbody></table><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><span style="text-align: center;">We use the Defensive Information "Front/Side" data points due to the target's Front/Side aspect angle. We cross reference this with the type of shot (Level, Rise, or Fall), which in this case is a "Falling" </span><span style="text-align: center;">shot because of the higher elevation of the Soviet squad. </span><span style="text-align: center;">The AP defensive data along the "Fall" row relevant to this attack includes armour values for:</span></div><div class="separator" style="clear: both; text-align: left;"><span style="text-align: center;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="text-align: center;">"TF" (turret front)</span></div><div class="separator" style="clear: both; text-align: left;"><span style="text-align: center;">"TS" (turret side)</span></div><div class="separator" style="clear: both; text-align: left;"><span style="text-align: center;">"HF" (hull front)</span></div><div class="separator" style="clear: both; text-align: left;"><span style="text-align: center;">"HS" (hull side)</span></div><div class="separator" style="clear: both; text-align: left;"><span style="text-align: center;">"DK" (deck) </span></div><div class="separator" style="clear: both; text-align: left;"><span style="text-align: center;"><br /></span></div><div class="separator" style="clear: both; text-align: left;">The Soviet unit is given a "Fire" command. The computer controlled German Panzer unit decides on a "Move" command. <i>For the purposes of this test, we purposefully give the computer controlled German unit a "Move" command. The command is face down (below), but we do in fact know it is a Move command. When playing against the AI, we will not know the command assigned to any of the enemy units.</i></div><div class="separator" style="clear: both; text-align: left;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-X0AkMHN68-E/X8falt0wZaI/AAAAAAAACv0/DT9XuWdyoCovuYckQSWyNDBPFq2E_P1QwCPcBGAYYCw/s361/Screen00039.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="306" data-original-width="361" src="https://1.bp.blogspot.com/-X0AkMHN68-E/X8falt0wZaI/AAAAAAAACv0/DT9XuWdyoCovuYckQSWyNDBPFq2E_P1QwCPcBGAYYCw/s320/Screen00039.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>After the "Command" phase.</i><br /></td></tr></tbody></table><br /><div class="separator" style="clear: both; text-align: left;">Once we have locked our target, the Battle Box appears with the battle details loaded for AP combat resolution...</div><div class="separator" style="clear: both; text-align: left;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-yowR0DoSwGE/X8fan82tU8I/AAAAAAAACvs/g7sDpvft6ioT-YEQWwv5W-1heWAiF6uIwCPcBGAYYCw/s1626/Screen00041.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1060" data-original-width="1626" height="418" src="https://1.bp.blogspot.com/-yowR0DoSwGE/X8fan82tU8I/AAAAAAAACvs/g7sDpvft6ioT-YEQWwv5W-1heWAiF6uIwCPcBGAYYCw/w640-h418/Screen00041.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The Battle Box. Ready for armour piercing combat resolution.</i><br /></td></tr></tbody></table><br />The right side of the Battle Box contains our direct fire data and process for determining the result of the attack. To start the process off, we open the AP Hit form by clicking the first "Roll" button...<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-HwiPay5xT6c/X8famOQ4qXI/AAAAAAAACvk/P1SbWmqXQX4L73cappdSsN_XKAYGsfnUQCPcBGAYYCw/s396/Screen00042.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="318" data-original-width="396" src="https://1.bp.blogspot.com/-HwiPay5xT6c/X8famOQ4qXI/AAAAAAAACvk/P1SbWmqXQX4L73cappdSsN_XKAYGsfnUQCPcBGAYYCw/s320/Screen00042.png" width="320" /></a></div><div><br /></div>The AP combat modifiers are listed on the left (below). Any modifiers highlighted in orange are added up and push the AP Hit row up or down. In our case, we have 2 combat modifiers that apply. "Target Moving" at a value of "-2", and "Shooter Grade" at a value of "5". Adding these together we get a total of "3". Since the German unit is at "E" (extended) range for the Soviet's Bazooka ammunition, we use the "E" column of the AP Hit table. Using our modifier total of "3", we travel 3 rows up from the "0" row (the grey row). This leaves us with the highlighted AP Hit value of "13". We must roll a 13 or less to hit the German Panzer IVG...<div><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-JnAHZaEhIM4/X8fanMtjqeI/AAAAAAAACv0/CO0VMGxlNSQ4ZdbwRdJ60xpy7SFkIKG9QCPcBGAYYCw/s1004/Screen00043.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="582" data-original-width="1004" height="373" src="https://1.bp.blogspot.com/-JnAHZaEhIM4/X8fanMtjqeI/AAAAAAAACv0/CO0VMGxlNSQ4ZdbwRdJ60xpy7SFkIKG9QCPcBGAYYCw/w640-h373/Screen00043.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>We rolled well. It's a hit. We had a 13% chance.</i><br /></td></tr></tbody></table><br />Sometimes we need to determine the number of hits. To do so, we would open the "# of Hits" form. However, the Soviet squad has an "N" (normal) "ROF" (rate of fire), and therefore we do not utilize this table in this specific battle. ROF is listed for for each ammunition on the leg unit's data card. This is what the "AP Number of Hits" table looks like...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Zh62aydg-1E/X8fanERaF0I/AAAAAAAACv0/YE33Ih43JnYKN3Lp7F2zncdaPmOO0bltwCPcBGAYYCw/s944/Screen00044.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="470" data-original-width="944" height="318" src="https://1.bp.blogspot.com/-Zh62aydg-1E/X8fanERaF0I/AAAAAAAACv0/YE33Ih43JnYKN3Lp7F2zncdaPmOO0bltwCPcBGAYYCw/w640-h318/Screen00044.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>This table only applies to ammunition with Q (quick), F (fast), or R (rapid) ROF (rate of fire).</i><br /></td></tr></tbody></table><br /><div>Next up in the process is the "AP Hit Location" determination...</div></div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-qVnd4U61R18/X8fan_bwtxI/AAAAAAAACv0/aa1Y21TawrUocKv7XaDKgqJxb2TG9vwLQCPcBGAYYCw/s948/Screen00045.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="406" data-original-width="948" height="274" src="https://1.bp.blogspot.com/-qVnd4U61R18/X8fan_bwtxI/AAAAAAAACv0/aa1Y21TawrUocKv7XaDKgqJxb2TG9vwLQCPcBGAYYCw/w640-h274/Screen00045.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>We roll a single D10 die to determine the hit location on the enemy tank.</i><br /></td></tr></tbody></table><br /><div>Since the target aspect angle is "Front/Side", we use the "Front/Side" row (highlighted in yellow). We've rolled a "4", which indicates that we have hit the "TS" or "Turret Side" of the Panzer unit.</div><div><br /></div><div>We've hit the tank on the side of the turret. We now determine whether or not the shot has penetrated. This is automatically calculated for us using a few pieces of data from the data card of each unit...</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-HM_4jXS1Yf8/X8fapYUhJlI/AAAAAAAACv0/cIf8TK0Tc_wdqV_TKeeyKFJbpI7csD6qACPcBGAYYCw/s1626/Screen00046.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1060" data-original-width="1626" height="418" src="https://1.bp.blogspot.com/-HM_4jXS1Yf8/X8fapYUhJlI/AAAAAAAACv0/cIf8TK0Tc_wdqV_TKeeyKFJbpI7csD6qACPcBGAYYCw/w640-h418/Screen00046.png" width="640" /></a></div><br /><div>At the bottom left of the screen above, we take the "P" (penetration) value of "20" from extended range of the Soviet M1 Bazooka row. We compare it to the target's armour rating listed in the Panzer's "Defensive Information" under the "TS" (turret side) column. In the "Fall" row, the cross referenced value is "7". The Bazooka's "20" beats the turret side armour of "7". The shot has penetrated.</div><div><br /></div><div>Now we determine the damage the shot made to the Panzer. Looking at the Soviet M1 Bazooka row, we see the "AP Damage" values for "ND" (no damage), "DM" (damage), "KO" (knocked out), and "BU" (brew up). We roll a single D10 and see where we land...</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-nu8_sNAHuL0/X8faoxMVozI/AAAAAAAACvo/ZpgwICCITNowr48HGKbmU8a0IVWJ2BncwCPcBGAYYCw/s778/Screen00047.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="432" data-original-width="778" height="356" src="https://1.bp.blogspot.com/-nu8_sNAHuL0/X8faoxMVozI/AAAAAAAACvo/ZpgwICCITNowr48HGKbmU8a0IVWJ2BncwCPcBGAYYCw/w640-h356/Screen00047.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Great result! Bazookas rule.</i><br /></td></tr></tbody></table><br /><div>We roll a "0" (which is a 10). This results in a Brew Up and the unit is destroyed...</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-JIOfI7oMkWQ/X8fao8CsFAI/AAAAAAAACvs/cqkM2uNCV9I928Hh8gx5vBTzNtGtCUqKQCPcBGAYYCw/s778/Screen00048.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="432" data-original-width="778" height="356" src="https://1.bp.blogspot.com/-JIOfI7oMkWQ/X8fao8CsFAI/AAAAAAAACvs/cqkM2uNCV9I928Hh8gx5vBTzNtGtCUqKQCPcBGAYYCw/w640-h356/Screen00048.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The Soviet leg unit is marked with a "Spot Fire" counter.</i><br /></td></tr></tbody></table><br /><div>Our "Fire" command counter is disabled. The Soviet unit can now be spotted from much farther away, since it has been marked with a "Spot Fire" counter. By firing, they have exposed themselves and possibly compromised their location. Who knows what the enemy will throw at us next :)</div><div><br /></div><div>I hope you are enjoying my work and I look forward to any comments and/or suggestions.</div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]1tag:blogger.com,1999:blog-2346463757740149544.post-40116246317210193372020-12-02T01:11:00.002-05:002020-12-02T09:04:16.137-05:00Firing General Purpose Ammunition - Leg Unit to Leg Unit<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-oXqJ6kPg3ZM/X8cvwLChtHI/AAAAAAAACuE/E79w8A0sWE0nSnwKTE7i-KLOp0pVb5VrQCLcBGAsYHQ/image.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="178" data-original-width="190" height="81" src="https://lh3.googleusercontent.com/-oXqJ6kPg3ZM/X8cvwLChtHI/AAAAAAAACuE/E79w8A0sWE0nSnwKTE7i-KLOp0pVb5VrQCLcBGAsYHQ/w87-h81/image.png" width="87" /></a></div>I've been working on assigning targets and firing AP (armour piercing) and GP (general purpose) fire ammunition types. There are a lot of details to consider and the code is getting much more complicated. Let's setup a simple scenario for testing purposes.<p></p><span><a name='more'></a></span><p><br /></p><p>We'll consider a single Soviet leg unit and a single German leg unit for our test. Here we have an elite Soviet Rifle Squad. We've kept it simple and not included any attached weapons for now. The only weapon that this unit has is it's intrinsic GP (General Purpose) weapon, listed on it's unit card below.</p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-gU4BoIUl6cw/X8cZKpDv8RI/AAAAAAAACpE/FsaR5hWePqEHGZG_OgbjYt7urtz1bi_swCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img data-original-height="475" data-original-width="769" height="248" src="https://lh3.googleusercontent.com/-gU4BoIUl6cw/X8cZKpDv8RI/AAAAAAAACpE/FsaR5hWePqEHGZG_OgbjYt7urtz1bi_swCLcBGAsYHQ/w400-h248/image.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The Soviet S-8A Rifle Squad just outside the village of Stravrhevoy.</i><br /></td></tr></tbody></table><br />Let's have this unit perform its initial "Spotting" phase. As you can see below, The Soviet unit has spotted a veteran German Rifle unit approaching from the east. The range to the German unit is 5 hexes, or "M" (medium) range.<p></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-61YXxbivQzc/X8cdiIW5GxI/AAAAAAAACpg/bxEXNYFccqoDhlbhC2lfCviCU7WOFshqwCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="900" data-original-width="1217" height="237" src="https://lh3.googleusercontent.com/-61YXxbivQzc/X8cdiIW5GxI/AAAAAAAACpg/bxEXNYFccqoDhlbhC2lfCviCU7WOFshqwCLcBGAsYHQ/w320-h237/image.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>A German Rifle Squad is spotted in the clear.<br /></i></td></tr></tbody></table><br />You can easily identify which gunnery range factor applies in this case, as it is highlighted in orange in the Soviet unit card. With its intrinsic weapon at medium range (4, 5 or 6 hexes in away), the Soviet unit has a GP factor of 5.<p></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-A7Flo5qbknU/X8cfrtAsjPI/AAAAAAAACps/CcbtbM8D1wIFsp-kEJ2lnUhs1sF_9V5TwCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="135" data-original-width="288" height="150" src="https://lh3.googleusercontent.com/-A7Flo5qbknU/X8cfrtAsjPI/AAAAAAAACps/CcbtbM8D1wIFsp-kEJ2lnUhs1sF_9V5TwCLcBGAsYHQ/image.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Gunnery Range and GP factors.<br /></i></td></tr></tbody></table><br />If the German unit was 3 hexes away, it would be within "S" (short range) and have a GP factor of "6". If it were 10 hexes away, it would be at "E" (extended) range. Obviously (in most cases), the closer the enemy unit is, the higher the GP factor. High GP factors serve us well when it comes to combat.<p></p><p>We see that the German unit's "Defensive Information" highlights the "GPD" (general purpose defense) and indicates a value of "2S". If this unit were in "Heavy Cover", it would receive a GPD of "8S". The higher the GPD, the better off the unit will be defensively when it comes to GP (general purpose) combat.</p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-aWxkgLd9Zgc/X8chi71WkrI/AAAAAAAACqI/QRf1RTOcz2s5u49uGV6cxb3nnoy9FVRFACLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="405" data-original-width="642" height="253" src="https://lh3.googleusercontent.com/-aWxkgLd9Zgc/X8chi71WkrI/AAAAAAAACqI/QRf1RTOcz2s5u49uGV6cxb3nnoy9FVRFACLcBGAsYHQ/w400-h253/image.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The German Rifle Squad is in the open with no cover.</i><br /></td></tr></tbody></table><br />Now we'll assign a "Fire" command during the "Command" phase, then select the German Squad as a target in the "Direct Fire" phase. The Soviet unit is designated a Fire command counter and the spot line to the German unit indicates that the German Squad is the target.<p></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-yC7D7Hh5CAw/X8cili7_7VI/AAAAAAAACqg/gG9k2Cd9ZwM8P2JS4pCRLvyTKv53rJrsgCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="245" data-original-width="443" height="221" src="https://lh3.googleusercontent.com/-yC7D7Hh5CAw/X8cili7_7VI/AAAAAAAACqg/gG9k2Cd9ZwM8P2JS4pCRLvyTKv53rJrsgCLcBGAsYHQ/w400-h221/image.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The Soviet Squad is ready to fire.</i><br /></td></tr></tbody></table><br />Now it's time for combat. Once our target has been locked in, we can execute our Fire command...<p></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-BTVLqCQWOs0/X8cjseKBfdI/AAAAAAAACqo/mhSQeTl2iTgrVm50h_I8Z4JauYCftWCOACLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="608" data-original-width="1555" height="156" src="https://lh3.googleusercontent.com/-BTVLqCQWOs0/X8cjseKBfdI/AAAAAAAACqo/mhSQeTl2iTgrVm50h_I8Z4JauYCftWCOACLcBGAsYHQ/w400-h156/image.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The "Battle Box".</i><br /></td></tr></tbody></table><br />The "Battle Box" is where our Fire command combat begins and ends. On the left, we have our shooter. On the right, our target. The "GP Direct Fire Data" area (far right) displays the necessary initial information we need to calculate our combat results. In this case, we are executing a GP Fire command against a leg unit and therefore need the shooter's GP Factor, as well as the target's GP Defense Factor...<p></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-8gvJU3ZXNuk/X8clUg9QOFI/AAAAAAAACq0/K8aAvKyzdVMkL0TM-rs7ZB1bW4f9Tw4bQCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="103" data-original-width="226" height="91" src="https://lh3.googleusercontent.com/-8gvJU3ZXNuk/X8clUg9QOFI/AAAAAAAACq0/K8aAvKyzdVMkL0TM-rs7ZB1bW4f9Tw4bQCLcBGAsYHQ/w200-h91/image.png" width="200" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Getting there!<br /></i><br /></td></tr></tbody></table>We can also identify the possible outcomes by looking at the "Result Ranges" for our GP Combat dice roll...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-nocDFduhPto/X8cl3hBcArI/AAAAAAAACq8/BFpQI-Hh1S4lUDOwPnpY_fPDUe4DLTXxQCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="77" data-original-width="215" height="72" src="https://lh3.googleusercontent.com/-nocDFduhPto/X8cl3hBcArI/AAAAAAAACq8/BFpQI-Hh1S4lUDOwPnpY_fPDUe4DLTXxQCLcBGAsYHQ/w200-h72/image.png" width="200" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>What will we roll?</i><br /></td></tr></tbody></table><br />These ranges are determined by using GP Factors, in this case "5" and "2" and cross referencing them on the "GP Combat Results" table...<p></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-iYM0Sf8YZFk/X8cmmZoUnHI/AAAAAAAACrY/IqK2ZszC2fc1lbh4KknwEVgRtj-HVeT6gCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="853" data-original-width="1601" height="213" src="https://lh3.googleusercontent.com/-iYM0Sf8YZFk/X8cmmZoUnHI/AAAAAAAACrY/IqK2ZszC2fc1lbh4KknwEVgRtj-HVeT6gCLcBGAsYHQ/w400-h213/image.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The GP Combat results table.</i><br /></td></tr></tbody></table><br />Looking across the top of the large table above, we locate the shooter's GP Factor of "5". We cross reference this with the target's GP defense factor of "2" down the left of the same table. There are 2 rows for each GP Defense Factor. The first is the "N" (no effect) row, which in this case is 39. The second row is the "S" (suppression) row and in this case is 68.<p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-6QimdnDgEc4/X8coCoyJs8I/AAAAAAAACr0/bb_WyNyO35Mif_vWt2TPTiVCQVg_rb4DwCLcBGAsYHQ/image.png" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="153" data-original-width="273" height="179" src="https://lh3.googleusercontent.com/-6QimdnDgEc4/X8coCoyJs8I/AAAAAAAACr0/bb_WyNyO35Mif_vWt2TPTiVCQVg_rb4DwCLcBGAsYHQ/image.png" width="320" /></a></div><br />If we roll 39 or less, the combat result is "N" (No Effect).<p></p><p>If we roll between 40 and 68, the combat result is "S" (Suppression).</p><p>If we roll 69 or more, the combat result is (Effective).</p><p>Of course, it's not as simple as this. We haven't taken into effect any of the GP Combat Modifiers listed in the table...</p><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-yFdA2iwcC5U/X8co3FJVzaI/AAAAAAAACr8/_ef3ENq1XCwAms-O_5Eckok2kJ88tDOUACLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="546" data-original-width="385" height="320" src="https://lh3.googleusercontent.com/-yFdA2iwcC5U/X8co3FJVzaI/AAAAAAAACr8/_ef3ENq1XCwAms-O_5Eckok2kJ88tDOUACLcBGAsYHQ/w225-h320/image.png" width="225" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>GP Modifiers affect your roll.</i><br /></td></tr></tbody></table><br /><br /> GP modifiers in effect are highlighted in orange and are cumulative. We can see that in this case our shooter is an elite unit and gets a bonus of "10" added to our GP Combat roll. Modifiers can also reduce our roll, so we need to make sound tactical decisions to maximize our outcomes. The GP combat modifier total is calculated and displayed under the dice roll area...<p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-YWBYvF0seiY/X8cp4_KGSnI/AAAAAAAACsY/oz3DDykFFVMLGwEiOkN5H8zHGfxwMhn_ACLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto; text-align: center;"><img alt="" data-original-height="321" data-original-width="183" height="240" src="https://lh3.googleusercontent.com/-YWBYvF0seiY/X8cp4_KGSnI/AAAAAAAACsY/oz3DDykFFVMLGwEiOkN5H8zHGfxwMhn_ACLcBGAsYHQ/image.png" width="137" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Let's roll.</i><br /></td></tr></tbody></table><p>Clicking the "Roll" button, we get a value of "70"...</p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-wTe-zqZvHvM/X8cqnUTVsXI/AAAAAAAACsw/WoSoO4y8HGEbJzo2JM5nbSJ-aOD9cdHSQCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="369" data-original-width="630" height="234" src="https://lh3.googleusercontent.com/-wTe-zqZvHvM/X8cqnUTVsXI/AAAAAAAACsw/WoSoO4y8HGEbJzo2JM5nbSJ-aOD9cdHSQCLcBGAsYHQ/w400-h234/image.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>An effective result after our modified roll. That's what we're looking for.</i><br /></td></tr></tbody></table><br /><br />Our roll is modified by a +10. Our modified roll is therefore 80. If we look at the orange highlighted values, we see that we needed a 69 or greater to achieve an effective result.<p></p><p>After closing the window, our Battle Box is updated with the results...</p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-zeGDVuPzbwc/X8crgY121_I/AAAAAAAACs8/tHFptRGeyCw5Ic-FrOHK6MtFtRn74xQlgCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="461" data-original-width="1016" height="181" src="https://lh3.googleusercontent.com/-zeGDVuPzbwc/X8crgY121_I/AAAAAAAACs8/tHFptRGeyCw5Ic-FrOHK6MtFtRn74xQlgCLcBGAsYHQ/w400-h181/image.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Reduced to a Half-Squad.</i><br /></td></tr></tbody></table><br />The damage to the unit is indicated in the "GP Combat Result" area. Because of the effective result, the German Rifle Squad is reduced to a Half-Squad. The unit's counter is updated to reflect this fact and now displays the Half-Squad image. The "Bailout" area does not apply in this case and is disabled.<p></p><p>Closing the Battle Box, we can see that the German Unit's data card reflects the fact that this unit is no a Half-Squad, and displays the appropriate Half-Squad values for it's weapon. Note the new "Gunnery Ranges"...</p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-_L7GOjfFzEU/X8ctOn9ZIMI/AAAAAAAACtY/i1TOT_LM7csOrSIzRyLTxMotfEexxnDsQCLcBGAsYHQ/image.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="535" data-original-width="696" height="308" src="https://lh3.googleusercontent.com/-_L7GOjfFzEU/X8ctOn9ZIMI/AAAAAAAACtY/i1TOT_LM7csOrSIzRyLTxMotfEexxnDsQCLcBGAsYHQ/w400-h308/image.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The gunnery range values are reduced for Half-Squads.</i><br /></td></tr></tbody></table><br />Next time we'll take a look at a leg unit vs a combat vehicle. Maybe we'll add the Bazooka to give the leg unit a fighting chance.<p></p><p>Thanks for visiting and leave any comments below :)</p><p><br /></p>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]2tag:blogger.com,1999:blog-2346463757740149544.post-14293582307775852672020-11-11T08:32:00.001-05:002020-11-12T10:07:13.588-05:00Command Phase and New Features Video<div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: left;">I've put together a short video of the new features and command phase implementation discussed in the previous blog post. Enjoy!</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/pf1KD2cAc-I" width="320" youtube-src-id="pf1KD2cAc-I"></iframe></div></div><br /><p><br /></p>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]2tag:blogger.com,1999:blog-2346463757740149544.post-68970271918179435692020-11-06T23:55:00.012-05:002020-11-07T00:17:01.996-05:00Panzer SOLO Digital Wargame Progress Update<p></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-zbQw30ePASA/X6YqlzpFdUI/AAAAAAAACmY/82xn8dwvBp06K5-6Yy3N72ENyfWti9xvACLcBGAsYHQ/s61/Screen00035.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="53" data-original-width="61" src="https://1.bp.blogspot.com/-zbQw30ePASA/X6YqlzpFdUI/AAAAAAAACmY/82xn8dwvBp06K5-6Yy3N72ENyfWti9xvACLcBGAsYHQ/s0/Screen00035.png" /></a></div><a href="https://1.bp.blogspot.com/-eC2m1ZhCPn4/X6Yp39ohgEI/AAAAAAAACmM/kj22c1DwMckYt6dkZp_HPUHvOto0vHq0gCLcBGAsYHQ/s122/Screen00035.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div></div>It's been a while, but the work (and progress) continues. There are a number of items to cover, so let's get to it!<div><br /></div><div>If you any questions, just let me know in the comments below.<div><br /><p></p><p></p><a name='more'></a><br /><ol><li>When a unit has spotted another unit, a "Spotting Line" is drawn from the selected unit to the spotted unit. If the unit is able to fire on the spotted unit with at least one of its weapons, the spotting line is a solid line. If the unit is not able to fire on the spotted unit with any of its <br />weapons, the spotting line is a dashed line.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-0VSRN_LxvNg/X6YZ_U08jPI/AAAAAAAACjY/LjniQ7fcGpA37m8ksRaNIp-shm3SfpUWwCLcBGAsYHQ/s1665/Screen00028.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="875" data-original-width="1665" height="210" src="https://1.bp.blogspot.com/-0VSRN_LxvNg/X6YZ_U08jPI/AAAAAAAACjY/LjniQ7fcGpA37m8ksRaNIp-shm3SfpUWwCLcBGAsYHQ/w400-h210/Screen00028.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The selected unit at the top right has spotted 2 units. However, it can only fire at the unit with the solid green spotting line. The other spotted unit with the dashed spotting line cannot be fired at.<br /><br /></i><br /></td></tr></tbody></table></li><li>Front and rear firing arcs have been implemented for turretless vehicles. For example, the Soviet SU-100 M44 (Data Card S-4B) has a turret turn rate of zero (TT: 0), which indicates that it is turretless and has a front firing arc of only 60 degrees. In order to assign a fire command to this unit during the command phase, it must spot a target within a 60 degree arc to the front of the unit. If the unit wants to fire on a unit outside of this arc, the unit itself must turn (in the movement phase) in order to bring its weapon to bear.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-JAU69-vBxEo/X6Ya9iN_LbI/AAAAAAAACjg/ykM0EzwmH6E0YXpjg-G0WmvHlIocKUlZQCLcBGAsYHQ/s1665/Screen00028.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="875" data-original-width="1665" height="210" src="https://1.bp.blogspot.com/-JAU69-vBxEo/X6Ya9iN_LbI/AAAAAAAACjg/ykM0EzwmH6E0YXpjg-G0WmvHlIocKUlZQCLcBGAsYHQ/w400-h210/Screen00028.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The selected unit has a front firing arc of 60 degrees. The dashed spotting line to the German Panzer III indicates that the German unit has been spotted, but that it is not in the Soviet unit's firing arc.<br /><br /></i><br /></td></tr></tbody></table></li><li>Ammo types are greyed out on the unit's data card when they cannot be used on a particular enemy unit.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-IPmxFQXoYS0/X6YdGqbqhyI/AAAAAAAACj8/VyJ4eIKUVSEKT2_CNaEnZDzbQZuTFPOfgCLcBGAsYHQ/s1665/Screen00028.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="875" data-original-width="1665" height="210" src="https://1.bp.blogspot.com/-IPmxFQXoYS0/X6YdGqbqhyI/AAAAAAAACj8/VyJ4eIKUVSEKT2_CNaEnZDzbQZuTFPOfgCLcBGAsYHQ/w400-h210/Screen00028.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The "AP" and "GP" ammo types for the Soviet SU-100 are greyed out because they cannot be used on the highlighted spotted German Panzer III (in yellow).<br /></i><br /></td></tr></tbody></table><br /></li><li>Gunnery ranges on the unit's data card are highlighted (in light blue) for each ammo type depending on which spotted unit is selected. This makes it easier for the player to look up the range and penetration values.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-jp5x0QIsaOI/X6YfxdkDS7I/AAAAAAAACkY/9qeQGPnuFlEFyBe2KEaN_dcjQeRRV69MACLcBGAsYHQ/s1194/Screen00029.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="710" data-original-width="1194" height="238" src="https://1.bp.blogspot.com/-jp5x0QIsaOI/X6YfxdkDS7I/AAAAAAAACkY/9qeQGPnuFlEFyBe2KEaN_dcjQeRRV69MACLcBGAsYHQ/w400-h238/Screen00029.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The Rifle Squad can use its intrinsic weapon at gunnery range "P" (point blank range) against the currently selected German Panzer III. The penetration value at this range is 8 (highlighted in blue).<br /></i><br /></td></tr></tbody></table><br /></li><li>There is a "Spotted Units" area that displays the selected spotted unit. Players can click on the unit to display the data card for the unit in a popup window. This window will display highlighted offensive and defensive values for this spotted unit against the players' selected unit.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-q85gF3zsXw0/X6Yg71FrVyI/AAAAAAAACkg/A6gsrkcV7GUBXO6ev49fQWXPzQm0OSzrACLcBGAsYHQ/s1836/Screen00030.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="870" data-original-width="1836" height="190" src="https://1.bp.blogspot.com/-q85gF3zsXw0/X6Yg71FrVyI/AAAAAAAACkg/A6gsrkcV7GUBXO6ev49fQWXPzQm0OSzrACLcBGAsYHQ/w400-h190/Screen00030.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>The Soviet Rifle squad spots 2 units. The currently selected spotted unit is displayed in the spotted unit detail area at the bottom middle of the screenshot. The player can click in this area to open a popup window with the spotted unit's data card (bottom right).<br /></i><br /></td></tr></tbody></table><br /></li><li>The command phase has been implemented. Players can select a unit and right-click on it to assign any of the applicable commands from a context menu. The context menu disables commands that are not eligible to be assigned. For example, a unit that has a track hit cannot be assigned a "Move" command. The "Move" command will be disabled in the menu. If a unit cannot fire at a spotted unit, the "Fire" and "Short-Halt" commands will be disabled.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/--bY8a17Zyms/X6YiSSlU6pI/AAAAAAAACks/Ugx13IkQ1DECfEx1v4bJv1vJKjK4wclpACLcBGAsYHQ/s610/Screen00031.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="600" data-original-width="610" height="394" src="https://1.bp.blogspot.com/--bY8a17Zyms/X6YiSSlU6pI/AAAAAAAACks/Ugx13IkQ1DECfEx1v4bJv1vJKjK4wclpACLcBGAsYHQ/w400-h394/Screen00031.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Because this selected Soviet unit can be moved or can fire, all command options are available.</i><br /></td></tr></tbody></table><br /><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-iCyMhcIPzhI/X6YjQi5z_VI/AAAAAAAACk0/vhCpBPL_14gQ7XPAkw1XEbtTPZwTuzHcwCLcBGAsYHQ/s610/Screen00032.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="600" data-original-width="610" height="394" src="https://1.bp.blogspot.com/-iCyMhcIPzhI/X6YjQi5z_VI/AAAAAAAACk0/vhCpBPL_14gQ7XPAkw1XEbtTPZwTuzHcwCLcBGAsYHQ/w400-h394/Screen00032.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>I rotated the SU-100 so that its firing arc no longer applies to any enemy units. Since it can't fire at anything, the "Fire" and "Short-Halt" commands are disabled in the context menu.<br /></i><br /></td></tr></tbody></table><br /></li><li>Commands can be shared between units from the same company by one of two ways. All commands (with the exception of the "No Command" counter) display a number on the counter. Shared commands will have the same number on the counters. The player can select a unit that has a command assigned to it and drag-and-drop the command to another eligible unit. Eligible units need to be from the same "Company" and also need to be in "Command Range" (0, 1, or 2 hexes) of the selected unit. Command Range is automatically determined based on the "Grade" of the Company that the units belong to.<br /><br />Players can also share commands by right clicking on the selected unit and selecting "Share Command".<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-zKCSgJzWPvc/X6Yl6ibEKAI/AAAAAAAAClg/VFswgDwdA4Uy-sTleur7zzWJg-EOoVz9gCLcBGAsYHQ/s929/Screen00033.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="595" data-original-width="929" height="256" src="https://1.bp.blogspot.com/-zKCSgJzWPvc/X6Yl6ibEKAI/AAAAAAAAClg/VFswgDwdA4Uy-sTleur7zzWJg-EOoVz9gCLcBGAsYHQ/w400-h256/Screen00033.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Assigning shared commands with units in the same hex or within command range. The player simply clicks the images to share the same "Fire" command as the selected unit. Each fire counter above has the number 1 assigned to it, indicating that these are shared fire commands.<br /></i><br /></td></tr></tbody></table><br /></li></ol>That's all for now :) I'll post a video of these features shortly. Leave any comments below.<p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-ojwLHj16AeI/X6YoBMb_uHI/AAAAAAAACls/Z5GOmhSkFHYm_vpOUmoUfnoPcMuf3tMIwCLcBGAsYHQ/s1916/Screen00034.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="896" data-original-width="1916" height="188" src="https://1.bp.blogspot.com/-ojwLHj16AeI/X6YoBMb_uHI/AAAAAAAACls/Z5GOmhSkFHYm_vpOUmoUfnoPcMuf3tMIwCLcBGAsYHQ/w400-h188/Screen00034.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>This Soviet T34/85 is sizing up a German Tiger II. Note the highlighted gunnery ranges highlighted in the Soviet data card and the rising shot defensive data highlighted for the Tiger.</i><br /></td></tr></tbody></table><br /><div><br /></div></div></div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]0tag:blogger.com,1999:blog-2346463757740149544.post-69130446760571593742020-08-31T12:42:00.009-04:002020-08-31T12:59:28.406-04:00Time to Refactor<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-SX7ophA26fY/X00n89wir0I/AAAAAAAACeM/GTUQVQfFfoA8KSTi9A6sE3VGDZJIiWvfACLcBGAsYHQ/s1024/Screen00024.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="GMT Panzer IV Unit Card" border="0" data-original-height="641" data-original-width="1024" height="126" src="https://1.bp.blogspot.com/-SX7ophA26fY/X00n89wir0I/AAAAAAAACeM/GTUQVQfFfoA8KSTi9A6sE3VGDZJIiWvfACLcBGAsYHQ/w200-h126/Screen00024.png" title="GMT Panzer IV Unit Card" width="200" /></a></div><br />I've been spending most of my time rewriting major portions of the code to accommodate weapon systems and their ammunition. Each unit now has weapons that can have multiple ammunition types. Weapons can be a "main" weapon. Although each unit has one or more main weapons, most units only have one.<div><br /></div><div><br /></div><span><a name='more'></a></span><div><br /><p><br /></p><p>Weapon systems consist of:</p><p></p><ul style="text-align: left;"><li>Guns</li><ul><li>AP Direct</li><li>AP Indirect</li><li>GP Direct</li><li>GP Indirect</li></ul><li>MMG</li><li>Leg Unit Intrinsic Weapons (Rifle, Infantry, SMG)</li><li>Attached Crew Served Weapons for leg units:</li><ul><li>Attached AP Direct (i.e Panzerfaust, M1 Bazooka, RPzB 43/54)</li><li>Attached GP Direct (i.e BM41, GrW 36)</li><li>Attached GP Indirect (i.e German GrW 34 Mortar)</li></ul></ul><p></p><p>I have added a number of other items to each unit:</p><ul style="text-align: left;"><li>A unit's main weapon data is now displayed along the top of each card.</li><li>A number of combat vehicle units have coaxial MGs which are indicated by the boxed number in the unit's GP ammunition under "Point Blank" range.</li><li>Leg unit cards only display the relevant leg unit data. If the unit is a Rifle Squad, the SMG, Section and Infantry data is hidden.</li><li>Leg units now only display gunnery range data for either full squad or for half squad units. If the unit is a half-squad, only the half-squad data is shown. This makes data intel gathering simpler and easier to decipher.</li><li>If a leg unit has attached crew served weapons assigned to them, they are readily available for reference on the same leg unit card.</li><li>Leg units now have their ammunition limits</li><li>GP Effectiveness is now displayed for each ammunition type.</li><li>Unit grade is displayed at the top of each unit card.</li><li>Points values for each unit is displayed at the top right of the unit card. Leg units with attached crew served weapons display the total point value of the unit and all attached weapons.</li><li>Unit cards display formation symbol.</li><li>Notes and basic game armour are displayed the bottom left.</li></ul><p>I still need to implement leg unit "Sections". This shouldn't be too difficult, since all of the "leg work" has already been done.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-0_d4yLIXeM4/X00qiSRPkUI/AAAAAAAACeo/-n_KlZqFIogEcC20OSOhyStLZ7T5EtDqACLcBGAsYHQ/s1206/Screen00025.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="493" data-original-width="1206" height="264" src="https://1.bp.blogspot.com/-0_d4yLIXeM4/X00qiSRPkUI/AAAAAAAACeo/-n_KlZqFIogEcC20OSOhyStLZ7T5EtDqACLcBGAsYHQ/w643-h264/Screen00025.png" title="Soviet Infantry Squad with a BM41 Mortar at point blank range." width="643" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ONo-Cdbc0U8/X00rpX1yieI/AAAAAAAACew/dg_yOp-x2jcr9Gr6WpLIdRgY3GL7ODMmwCLcBGAsYHQ/s1576/Screen00026.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="874" data-original-width="1576" height="355" src="https://1.bp.blogspot.com/-ONo-Cdbc0U8/X00rpX1yieI/AAAAAAAACew/dg_yOp-x2jcr9Gr6WpLIdRgY3GL7ODMmwCLcBGAsYHQ/w640-h355/Screen00026.png" title="AP Damage and GP Effectiveness values are now displayed." width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-mr4ZstMYVjE/X00sCZFIsjI/AAAAAAAACe4/D7Ip-N_X5x4O2tnQm1NO6Ktww54dpemnwCLcBGAsYHQ/s1565/Screen00027.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="671" data-original-width="1565" height="274" src="https://1.bp.blogspot.com/-mr4ZstMYVjE/X00sCZFIsjI/AAAAAAAACe4/D7Ip-N_X5x4O2tnQm1NO6Ktww54dpemnwCLcBGAsYHQ/w640-h274/Screen00027.png" title="Leg unit with an attached M1 Bazooka hunts down German tank units." width="640" /></a></div><br />8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]2tag:blogger.com,1999:blog-2346463757740149544.post-73173433855261487952020-06-11T09:15:00.000-04:002020-06-11T10:46:17.408-04:00GMT Panzer SOLO AP Fire Command Process<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-1wZiSeyqYbM/XuIv_UWbjWI/AAAAAAAACaE/t-DpVabQhy0JmzCDriBoZ1a-odLkn7SQwCLcBGAsYHQ/s1600/title.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="446" data-original-width="516" height="172" src="https://1.bp.blogspot.com/-1wZiSeyqYbM/XuIv_UWbjWI/AAAAAAAACaE/t-DpVabQhy0JmzCDriBoZ1a-odLkn7SQwCLcBGAsYHQ/s200/title.png" width="200" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Fire commands assigned.</td></tr></tbody></table>I've been working on the user interface for performing armour piercing fire commands, which has been a bit of a challenge. It's not difficult to code, but there is a lot going on under the hood. Testing has been quite a challenge and takes significant time to verify numerous possible outcomes.<br /><br /><a name='more'></a><br /><br />Anyway, I think I've got a good foundation. There are still a number of items to implement, such as the "AP Number of Hits" and "AP Penetration" tables. I'll be tackling those right away.<br /><br />In this short video that demonstrates what I have so far for AP direct fire, we have two soviet units, an SU-85 M43 and a T-34/85 M44. Both units are in the woods and have spotted 2 German units out in the open and headed north.<br /><br />The Soviet units are both assigned individual "Fire" commands. Both have targeted the German Panther. Let's find out what happens. Make sure to turn subtitles on...<br /><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/-QYasrdF258/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/-QYasrdF258?feature=player_embedded" width="320"></iframe></div><br /></div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]0tag:blogger.com,1999:blog-2346463757740149544.post-39631990178633649222020-05-01T16:32:00.002-04:002020-05-01T19:10:11.315-04:00Unit Weapon Range and Hexes in Line of Sight<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-7nsn2dk-JjU/XqyGvZSAA6I/AAAAAAAACWU/ZcWcZpFiqIwS7Xpj3MnM4xDe0bT2Hvn_gCLcBGAsYHQ/s1600/Screen00018.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="203" data-original-width="466" height="86" src="https://1.bp.blogspot.com/-7nsn2dk-JjU/XqyGvZSAA6I/AAAAAAAACWU/ZcWcZpFiqIwS7Xpj3MnM4xDe0bT2Hvn_gCLcBGAsYHQ/s200/Screen00018.png" width="200" /></a></div>This is pretty cool :) I've added a mechanism to display a unit's range for it's longest weapon. You can select the range you would like to display, and the map will show you all of the hexes that are within that range and line of sight (LOS) for that unit. It takes a lot of the "guesswork" out of play and provides a lot of invaluable info for the player.<br /><a name='more'></a><br /><br />Let's take the German Panther out for a stroll...<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-dxB57_HYmBQ/Xqx4WKHpu4I/AAAAAAAACU4/9Tq7KEOEYL4MbPqPAKuV1yUAopfBB-EIwCLcBGAsYHQ/s1600/Screen00014.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="593" data-original-width="936" height="202" src="https://1.bp.blogspot.com/-dxB57_HYmBQ/Xqx4WKHpu4I/AAAAAAAACU4/9Tq7KEOEYL4MbPqPAKuV1yUAopfBB-EIwCLcBGAsYHQ/s320/Screen00014.png" width="320" /></a></div><br />If we focus on the "Offensive Information" area of the Panther's data card, you'll notice the 3 rows of ammunition...<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-el0NDaFWEiA/Xqx48V0__6I/AAAAAAAACVA/6tOOlX2tzqom957d80_lHVGfIJjxfieOQCLcBGAsYHQ/s1600/Screen00015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="147" data-original-width="252" src="https://1.bp.blogspot.com/-el0NDaFWEiA/Xqx48V0__6I/AAAAAAAACVA/6tOOlX2tzqom957d80_lHVGfIJjxfieOQCLcBGAsYHQ/s1600/Screen00015.png" /></a></div><br />The Panther has 3 different types of ammunition to choose from when attacking an enemy. Range factors for each ammo are denoted by a single letter. At the top of the image above are the letters:<br /><br />P = Point Blank Range<br />S = Short Range<br />M = Medium Range<br />L = Long Range<br />E = Extended Range<br /><br />Each ammunition type has both a Range (R) and a Penetration (P) value for each of the 5 range factors. For example, the first row is "AP", or Armour Piercing. We can locate the point blank range factor for the AP weapon by looking under the column "P". We see that at point blank range, the Panther has a range (R) of 4 hexes and a penetration (P) value of 32.<br /><br />For the same AP ammunition, the Panther's short range (S) is 8 hexes. At medium range, the Panther can fire it's AP ammo 14 hexes. The maximum range the Panther can fire it's AP ammo is at extended range, which is a range of 24 hexes.<br /><br />The 3rd row represents the unit's GP, or General Purpose ammunition. At point blank range, the ammo can fire up to 6 hexes. GP fire can reach 38 hexes at extended (E) range.<br /><br />The player can select a range factor (P, S, M, L or E) and display all of the hexes on the map that are at that range and in line of sight...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-RTS7gWw-PpQ/Xqx-w2yApgI/AAAAAAAACVc/efqW6Ci8CJ4VwSjPj0gkUMuZbI_z9a4GACLcBGAsYHQ/s1600/Screen00016.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="793" data-original-width="1600" height="315" src="https://1.bp.blogspot.com/-RTS7gWw-PpQ/Xqx-w2yApgI/AAAAAAAACVc/efqW6Ci8CJ4VwSjPj0gkUMuZbI_z9a4GACLcBGAsYHQ/s640/Screen00016.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The "P" button (at top middle) is selected. This button highlights all hexes that are in <br />line of sight and at a point blank range of 6 of the German Panther's GP ammunition.</td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-znEOxNO3PZ8/XqyD2ltRzOI/AAAAAAAACV4/awwscJXKOPIEpqHXY-roPu0ntYo1xPmVwCLcBGAsYHQ/s1600/Screen00017.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1075" data-original-width="1600" height="430" src="https://1.bp.blogspot.com/-znEOxNO3PZ8/XqyD2ltRzOI/AAAAAAAACV4/awwscJXKOPIEpqHXY-roPu0ntYo1xPmVwCLcBGAsYHQ/s640/Screen00017.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Note the "E" button is selected at the top of the screen. The Panther can obviously see a lot more hexes at extended (E) range. Extended range for this unit's longest ammunition, which is GP, is 38 hexes. Since the map is 38 hexes wide, it has the ability to see clear across the board from one end to the other, as long as it has line of sight.</td></tr></tbody></table><br />The screen above has hexes highlighted in green for the unit's extended (E) range of it's GP ammunition. Establishing which hexes can be seen on the table top version of the game would be a long process.<br /><br />Here's a video demonstrating this feature. Turn on your subtitles! I hope you enjoy it :) Don't forget to subscribe!<br /><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/yIKViIy6Kig/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/yIKViIy6Kig?feature=player_embedded" width="320"></iframe></div><br />8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]4tag:blogger.com,1999:blog-2346463757740149544.post-76370816098788769322020-04-20T16:22:00.001-04:002020-04-21T12:00:30.412-04:00Panzer SOLO Line of Sight Tool<span style="background-color: white;"><span style="font-family: inherit;">Just a short note today...</span></span><br /><br /><span style="background-color: white;"><span style="font-family: inherit;">I've added a "Line of Sight" (LOS) tool that allows the player to view whether or not there is line of sight between two hexes. Just select a hex, click the LOS button, then roll the cursor over any hex on the map. If you have line of sight to the hex under the cursor, the hex turns green. Red if there is no line of sight.</span></span><br /><span style="font-family: inherit;"></span><br /><span style="font-family: inherit;">I think I'm going to expand the functionality of the tool to include the reason why no line of sight is possible. I'll also add an area to indicate range to the selected hex. The more info the better... right?</span><br /><br /><span style="font-family: inherit;"><br style="background-color: white; max-height: 1e+06px; overflow-wrap: break-word;" /><span style="background-color: white;">You can see the LOS Tool in action in a video I posted...</span></span><br /><br /><span style="background-color: white; color: #51002b; font-family: "verdana" , "arial"; font-size: 12px;"><br /></span><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/RuI3vEIGldA/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/RuI3vEIGldA?feature=player_embedded" width="320"></iframe></div><span style="background-color: white; color: #51002b; font-family: "verdana" , "arial"; font-size: 12px;"><br /></span>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]0tag:blogger.com,1999:blog-2346463757740149544.post-16592226797575122682020-04-18T16:44:00.003-04:002020-04-21T11:13:15.073-04:00Heat Maps for Hot Zones<span style="background-color: white; font-family: inherit;">I've been working on developing "Heat Maps" for the AI opponent to better manage situational awareness. <span style="color: #14171a; white-space: pre-wrap;">The areas in "red" indicate the extended range of a particular unit</span></span><span style="background-color: white; font-family: inherit;"><span style="color: #14171a; white-space: pre-wrap;"><span style="font-family: inherit;"> and t</span>he hexes it can target with it's longest range direct fire ammunition.</span></span><br /><div style="text-align: right;"><span style="background-color: white; font-family: inherit;"><span style="color: #14171a; white-space: pre-wrap;"></span></span></div><a name='more'></a><span style="background-color: white; font-family: inherit;"><span style="color: #14171a; white-space: pre-wrap;"><br /></span></span><br /> <span style="background-color: white; font-family: inherit;"><span style="color: #14171a; white-space: pre-wrap;">I'll work this function into the AI system for determining these hot zones. The computer will calculate overlapping areas of "hotness" and be able to better determine risk through identified areas of safety, danger and retreat. Here are a couple of sample shots of a single unit on the board...</span></span><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-V4ngCzeWeMY/XpteSU_4XXI/AAAAAAAACRY/cWvIBA42M3koHxagyskP4wivvTcgA2wIACLcBGAsYHQ/s1600/Screen00010.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1392" data-original-width="1600" height="347" src="https://1.bp.blogspot.com/-V4ngCzeWeMY/XpteSU_4XXI/AAAAAAAACRY/cWvIBA42M3koHxagyskP4wivvTcgA2wIACLcBGAsYHQ/s400/Screen00010.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">A Soviet T-34/76 M43 on the ledge scouring the terrain for German presence.<br />It can fire its GP weapon at a range of 27 hexes.</td></tr></tbody></table><br />The T-34 in the above screen is sitting on a hill. The longest range that the Soviet unit can fire at is 27 hexes. Its general purpose (GP) weapon has a penetration level of 2 at that range...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Td6wAgLXQ3s/XptrpM05vBI/AAAAAAAACSg/LGKpExAyaBcuDGTBzgjOlYRukgBou_P7ACLcBGAsYHQ/s1600/Screen00012.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="510" data-original-width="809" height="200" src="https://1.bp.blogspot.com/-Td6wAgLXQ3s/XptrpM05vBI/AAAAAAAACSg/LGKpExAyaBcuDGTBzgjOlYRukgBou_P7ACLcBGAsYHQ/s320/Screen00012.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">At extended range (27 hexes), the T-34 can fire its GP weapon.</td></tr></tbody></table><br />The heat map will calculate the line of sight to each hex on the map, up to and including the unit's maximum range of it's weapon it can fire the farthest. The T-34 has multiple weapons, but it's GP weapon can fire the farthest.<br /><br />I am able to drag and drop a unit to any location on the map and view exactly which hexes are within line of sight of its maximum ammunition range. There are a lot of surprises that pop up here and there, revealing locations that otherwise might never be discovered using the tabletop map. It's actually a great way to identify any problems with my line of sight algorithm.<br /><br /><div class="separator" style="clear: both; text-align: center;"></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-8hn-Fh1eG8Y/XptgWiJRu5I/AAAAAAAACR0/nYSlZ14jVHUmb_e7iKaark9BGoqjrprtQCLcBGAsYHQ/s1600/Screen00011.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1422" data-original-width="1600" height="355" src="https://1.bp.blogspot.com/-8hn-Fh1eG8Y/XptgWiJRu5I/AAAAAAAACR0/nYSlZ14jVHUmb_e7iKaark9BGoqjrprtQCLcBGAsYHQ/s400/Screen00011.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The T-34 moves into Kurvha. Notice that line of sight passes through the streets of the town.</td></tr></tbody></table><br />Eventually I'll have multiple units display their lines of sight. Any overlapping areas will be displayed as a darker shade of red (or other colour). Each hex will receive a "score", indicating how many times it has been overlapped. If a hex has a high overlap score, it will indicate a very high area of danger for the enemy. The AI will try and avoid these areas unless absolutely necessary.<br /><br />There are some edge cases that I still need to work out. Terrain such a gullies, hedgerows and streams aren't quite ready yet, as there are a few anomalies. Once I have these figured out, I'll post a demo video :)<br /><div><br /></div><div>That's all for now. Until next time!<br /><span style="background-color: white; font-family: inherit;"><span style="color: #14171a; white-space: pre-wrap;"><br /></span></span></div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]0tag:blogger.com,1999:blog-2346463757740149544.post-58497610774553793302020-04-01T13:29:00.000-04:002020-04-21T10:55:51.814-04:00GMT Panzer SOLO Class StructureOriginally, I began my <a href="https://www.gmtgames.com/p-749-panzer-3rd-printing.aspx" target="_blank">GMT Panzer</a> SOLO project as a non-graphics AI system that would be used in conjunction with the paper map, counters and data cards.<br /><div><br /><a name='more'></a><br /></div><div>This system would present the human player with events that would "instruct" the player what enemy units to add or remove from the paper map, what counters to place and remove for each unit, which commands should be executed, and so on.<br /><div><br /></div><div>However, as I got deeper into my design, I realized that there were a few significant obstacles that were not just cause for concern, but derailed any idea of a non-graphics interface.<br /><div><br /></div><div>In order for the game to have an artificial intelligence, the human player would have to input every human action taken on the physical map into the computer AI system. For example, if you moved your T-34 from hex A to hex B, you would have to enter each hex moved into the computer program, one at a time, to allow the AI to choose whether or not to perform an "Overwatch" command at a specific hex location in your move.</div><div><br /></div><div>Also, any effects applied in the system software, such as suppression, damage, full cover, etc. would need to be placed on the map for each unit in the scenario for both the human player and the computer controlled player. Even with event messages such as:</div><div><br /></div><div>"Place damage counter on unit X"</div><div>"Turn Fire counter face up for unit Y"</div><div>"Pivot unit X number of times clockwise"</div><div><br /></div><div> ...would be cumbersome and time consuming at best.</div></div></div><div><br /></div><h3>Under The Gun</h3><div>I quickly realized that a typical computer war game interface would be a necessity. Playing against a computer opponent on a digital map, but using the rules and tables from the original board game would be an interesting idea if I could pull it off. For me, the most challenging issue would be implementing the user interface, the graphics and the events using Windows Forms. In c# (a programming language pronounced "see sharp"), you could sum up my knowledge of graphics programming as...</div><div><br /></div><div style="text-align: center;">myExperience = null;</div><div><br /></div><div>After a good amount of internet later, as well as a lot of trial and error, things came together fairly quickly. Paint an image on the screen... Update the screen when an update has occurred. Not too bad.</div><div><br /></div><div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Q3DSNXo6qnY/XoN-O9Y8joI/AAAAAAAACOQ/lHKdHkkyD9oG3pbfBBIs5QLr8IK6QpO-wCLcBGAsYHQ/s1600/Screen00001.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1010" data-original-width="1305" height="307" src="https://1.bp.blogspot.com/-Q3DSNXo6qnY/XoN-O9Y8joI/AAAAAAAACOQ/lHKdHkkyD9oG3pbfBBIs5QLr8IK6QpO-wCLcBGAsYHQ/s400/Screen00001.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">German Tiger II supported by a German SPW 251/2 and Infantry Squad.</td></tr></tbody></table></div><h3></h3><h3>Everything is a Unit</h3><div>I had already formed a good foundation of code that centered on vehicles only, primarily with Tanks. Tanks could fire, battle and move. However, I wanted to include all units, not just the hulking metal. This required a major re-design. The first thing I needed to do was design a class system for all units in the game. This is what I have to date...</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-oddI7MSxCRU/XoNunGfhyLI/AAAAAAAACN0/PCJN_zPmdtgioeanrvHAVsuBF_V4m8yygCLcBGAsYHQ/s1600/Class%2BStructure.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="515" data-original-width="1177" height="280" src="https://1.bp.blogspot.com/-oddI7MSxCRU/XoNunGfhyLI/AAAAAAAACN0/PCJN_zPmdtgioeanrvHAVsuBF_V4m8yygCLcBGAsYHQ/s640/Class%2BStructure.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">My class system implemented in Panzer SOLO.</td></tr></tbody></table><div><h3></h3><h3>Class Properties</h3></div><div>Every counter in the game is a <i>Unit</i>, and every unit has a number of common <span style="color: #6fa8dc;"><b>properties </b></span>such as...</div><div><ul><li>Name of unit</li><li>Data card number</li><li>Unit number</li><li>Points</li><li>Facing</li><li>Grade etc.</li></ul><div><br />Certain counters, such as vehicles, also have common properties like...</div></div><div><ul><li>Mode of traction (tracked, half-track, wheeled)</li><li>Size</li><li>Armour (front/back for basic rules)</li><li>Armour (front, front side, rear side, rear, for both turret and hull)</li><li>Track hit</li><li>Status (no damage, damaged, knocked-out, or brewed-up), etc.</li></ul><div><br />Other counters, such as leg units, have properties such as...<br /><ul><li>Quickmarch</li><li>Different modes of traction (Leg, Bicycle, Wheel, Motorcycle)</li></ul><br />For example, since a vehicle is in fact a "Unit", a vehicle inherits all of the <b style="color: #6fa8dc;">properties </b>of a unit as well. </div><div><br /></div><div>Not all <i>Vehicles </i>have weapons. My class structure differentiates between <i>Combat Vehicles</i> and <i>Non-Combat Vehicles</i>". Both are <i>Units</i>. Both are <i>Vehicles</i>. As such, they get all of the properties of "<i>Vehicles</i>" AND<i> </i>"<i>Units</i>". However, <i>Non Combat Vehicles</i> don't get weapons. That sorta makes sense.<br /><br /><h3></h3><h3>Class Functions</h3><div>Each class has its own behaviors, or "<span style="color: #6fa8dc;"><b>functions</b></span>". For example, a <i>Combat Vehicle</i> obviously has weapons, and therefore can be assigned "Fire", "Short-Halt, or "Overwatch" commands. Since a <i>Tank </i>is a <i>Combat Vehicle</i>, it inherits these functions and can perform these functions during the game.</div><div><br />Here is the class structure for the PzIII (data card G-1A):<br /><br /><b>PzIII<i> </i></b>➠<i> Tank </i>➠ <i>Combat Vehicle</i> ➠ <i>Vehicle </i>➠ <i>Unit</i><br /><i><br /></i>Breaking this down...<br /><ol><li>A PzIII is a <i>Tank</i></li><li>A PzIII is also a <i>Combat Vehicle</i></li><li>A PzIII is also a <i>Vehicle</i></li><li>A PzIII is also a <i>Unit</i></li></ol><br />The PzIII <b><span style="color: #6fa8dc;">inherits </span></b>all of the <span style="color: #6fa8dc;"><b>properties </b></span>and <span style="color: #6fa8dc;"><b>functions </b></span>of a <i>Tank</i>, <i>Combat Vehicle</i>, <i>Vehicle</i>, and <i>Unit</i>. So... we can say the following is true:<br /><ul><li><i>Combat Vehicles</i> can "Fire"<i>. </i>The <i>Tank </i>can "Fire" because it is a <i>Combat Vehicle.</i></li><li><i>Vehicles </i>have a function called "Move". The <i>Tank </i>can move because it is a <i>Vehicle.</i></li><li>The <i>Tank </i>can receive a "Track Hit" because it has the property "Tracks"</li><li><i>Units </i>have a property called "Location". The <i>Tank </i>has a "Location" because it is a <i>Unit</i>.</li></ul><div><br /></div>On the other hand, a <i>Non Combat Vehicle</i> like a <i>Truck </i>does not have weapons. A <i>Truck </i>is a <i>Non Combat Vehicle</i>, and as such, does not have the same functions as a <i>Combat Vehicle</i>.</div><div><div style="text-align: left;"><br /></div><div style="text-align: left;"><b>Truck </b>➠ <i>Non</i> <i>Combat Vehicle</i> ➠ <i>Vehicle </i>➠ <i>Unit</i></div><div style="text-align: left;"><i><br /></i></div><div>The system will not allow any <i>Non Combat Vehicle</i> to "Fire"...<br /><br /><b>Truck</b>.Fire ❌</div><div><b>Tank</b>.Fire ✅</div><div><br />However, both can move because both are <i>Vehicles</i>. Since the <i>Vehicle </i>class contains a "Move" function, both the <i>Tank </i>AND the <i>Truck </i>can Move...<br /><br /><div><b>Tank</b>.Move ✅</div><div><b>Truck</b>.Move ✅<br /><br /></div><br />Here is an example for a leg unit...<br /><br /></div><div style="text-align: left;"><b>SMG Squad</b> ➠ <i>Squad</i> ➠ <i>Leg Unit </i>➠ <i>Unit</i></div></div><div><br /></div></div></div><div>Different units fire, move, transport, and otherwise behave in different ways. A well designed class structure allows me to simply tell a unit to "Fire", "Move", "Short Halt" etc., and it behaves according to its own rules for each. I can tell a <i>Halftrack </i>to "Fire" and it will use it's own "Fire" function to carry out its fire command. Telling a <i>Rifle Squad</i> to fire uses its own fire command, because it fires differently than a <i>Halftrack.</i></div><div><br /></div><div>Halftrack.Fire();<br />Tank.ShortHalt();</div><div>RifleSquad.Fire();</div><div><br /></div><div>Tank.Move();</div><div>SMGSquad.Move();<br />TowedUnit.Move();<br /><br /><br /></div><div>You get the idea. For us programmers, this is basic stuff. Although the code can be somewhat complicated, the "coding" is not the challenge. The "design" is the thing! A good design goes a long way.</div><div><br /></div><center><table><tbody><tr><td><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-kI3pttSF8kA/XoOBD9F94CI/AAAAAAAACOw/fHcJm36eHqQhr9FwYHPdhfZytrlQcXn_gCLcBGAsYHQ/s1600/Screen00002.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="865" data-original-width="575" height="400" src="https://1.bp.blogspot.com/-kI3pttSF8kA/XoOBD9F94CI/AAAAAAAACOw/fHcJm36eHqQhr9FwYHPdhfZytrlQcXn_gCLcBGAsYHQ/s400/Screen00002.png" width="265" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Scenario design.</td></tr></tbody></table></td><td><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-n4j2Rf2gVGY/XoOBDn7J5dI/AAAAAAAACOs/nOwC1wArV3s3iTRlzilIVj5ZG-uunymdACLcBGAsYHQ/s1600/Screen00003.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="865" data-original-width="407" height="400" src="https://1.bp.blogspot.com/-n4j2Rf2gVGY/XoOBDn7J5dI/AAAAAAAACOs/nOwC1wArV3s3iTRlzilIVj5ZG-uunymdACLcBGAsYHQ/s400/Screen00003.png" width="187" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Half-track data.</td></tr></tbody></table></td></tr></tbody></table></center><div><br /></div><div><br /></div><div>Anyway, to make a long story short, my class system is working well. Although, it's not quite finished. You'll notice that off-map artillery is not modeled yet. Neither are "Sections".</div><div><br /></div><div>We'll get there!</div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]2tag:blogger.com,1999:blog-2346463757740149544.post-62796956036406293772020-03-16T16:06:00.005-04:002020-04-21T10:56:03.804-04:00Bresenham and Line of Sight in PanzerSo you say you want to calculate line of site on a hex based digital map...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-yCrzvyU5JHs/Xm_HC8FgkGI/AAAAAAAACIk/dGuP1OvaJCAhBBI5mABUwQ_OCkDaivK4wCLcBGAsYHQ/s1600/Bresenham.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="862" data-original-width="1600" height="172" src="https://1.bp.blogspot.com/-yCrzvyU5JHs/Xm_HC8FgkGI/AAAAAAAACIk/dGuP1OvaJCAhBBI5mABUwQ_OCkDaivK4wCLcBGAsYHQ/s320/Bresenham.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Lines are made up of individual pixels. But which pixels?</td></tr></tbody></table><br /><a name='more'></a><br /><br />We need to know how lines are represented on a computer. Horizontal lines are obviously constructed using pixels in a single row from point A to point B. The same can be said for any vertical line... all pixels from point A to point B from a particular column are used. Diagonal lines at 45 degrees are somewhat more complicated, but if we just travel one to the right and one up, we can cobble a fairly straight-forward algorithm together to manage these 3 simple cases.<br /><br />However, it's when we start to draw lines of different slopes/orientations that we need to come up with something clever to determine every pixel that a line contains. Fortunately, my detective work paid off and the case was solved. The magic bullet... the <a href="https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm" target="_blank">Bresenham line algorithm</a>. I know... very exciting.<br /><br />Let's back up for a second. At this point, you might be somewhat confused. Why do we need to know what pixels constitute a line on a computer?<br /><br />Let's start with how I have represented the <a href="https://www.gmtgames.com/p-749-panzer-3rd-printing.aspx" target="_blank">GMT Panzer</a> map in my project. The basic game comes with a paper map. The map is divided into hexes...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-4nspgKC8qKo/Xm_L1L5l2yI/AAAAAAAACJA/w19nwKDfeVId5ZqIfV3sjIWZzLcL6K-eACLcBGAsYHQ/s1600/hex.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="162" data-original-width="190" src="https://1.bp.blogspot.com/-4nspgKC8qKo/Xm_L1L5l2yI/AAAAAAAACJA/w19nwKDfeVId5ZqIfV3sjIWZzLcL6K-eACLcBGAsYHQ/s1600/hex.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Hex id 1006. Clear terrain.</td></tr></tbody></table><br />I took a single hex from a digital version of the map and brought it into <a href="https://www.gimp.org/" target="_blank">GIMP</a>, which is like Adobe Photoshop. From there I used the "Line Tool" and drew lines over top of the hex borders...<br /><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-gDW1kiKJiak/Xm_PUiIUhrI/AAAAAAAACJc/fiwfXS6zJjgUE3otn0cJm1jSqRdthlTWwCLcBGAsYHQ/s1600/hex2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="620" data-original-width="659" height="300" src="https://1.bp.blogspot.com/-gDW1kiKJiak/Xm_PUiIUhrI/AAAAAAAACJc/fiwfXS6zJjgUE3otn0cJm1jSqRdthlTWwCLcBGAsYHQ/s320/hex2.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Tracing the border of a hex.</td></tr></tbody></table><div><br />Now if I remove the hex image, it will leave us with just the red line I traced...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-toAxIcvTk14/Xm_QFVuTd7I/AAAAAAAACJk/ht8rmKqKCZo4tpZuJsO5TPIrPpBrKz2nACLcBGAsYHQ/s1600/hex3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="754" data-original-width="972" height="248" src="https://1.bp.blogspot.com/-toAxIcvTk14/Xm_QFVuTd7I/AAAAAAAACJk/ht8rmKqKCZo4tpZuJsO5TPIrPpBrKz2nACLcBGAsYHQ/s320/hex3.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">A single side of a hex border. We can use each pixel in this line to our advantage.</td></tr></tbody></table><br />It turns out that GIMP (and other programs like "Paint") uses the infamous Bresenham Line Algorithm (or versions of it) to draw the line I just painted. Cool. Now I can trace the entire border of a single hex...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-lqececAYyf4/Xm_Sxjx5R_I/AAAAAAAACKE/viK153Q5dJAYz9SwDSeRqALDzyDP74lowCLcBGAsYHQ/s1600/hex4.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="856" data-original-width="1036" height="264" src="https://1.bp.blogspot.com/-lqececAYyf4/Xm_Sxjx5R_I/AAAAAAAACKE/viK153Q5dJAYz9SwDSeRqALDzyDP74lowCLcBGAsYHQ/s320/hex4.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Now we can identify each pixel that is used to define the hex border.</td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div>... and manually record each pixel coordinate. This will define the border of my hex. Here's how I'm storing the hex pixel border data...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-cK9UQJKWdCw/Xm_SxeJCayI/AAAAAAAACKA/RlIeu7c_NdAVhV_zLuuy4Jmvg7kH-cL1QCLcBGAsYHQ/s1600/hex5.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="542" data-original-width="1276" height="268" src="https://1.bp.blogspot.com/-cK9UQJKWdCw/Xm_SxeJCayI/AAAAAAAACKA/RlIeu7c_NdAVhV_zLuuy4Jmvg7kH-cL1QCLcBGAsYHQ/s640/hex5.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Each hex border pixel is stored as a "Point".</td></tr></tbody></table><br />Let's take a closer look at the first line...<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-6ZbfBRC1wyg/Xm_TxLEh0eI/AAAAAAAACKQ/wTcDM4fb2TsdM4NVpAdURynSge4yFeX9wCLcBGAsYHQ/s1600/hex6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="31" data-original-width="1241" height="15" src="https://1.bp.blogspot.com/-6ZbfBRC1wyg/Xm_TxLEh0eI/AAAAAAAACKQ/wTcDM4fb2TsdM4NVpAdURynSge4yFeX9wCLcBGAsYHQ/s640/hex6.png" width="640" /></a></div><br />There are two points specified in this line. The first point (43, 0) is the upper left corner of our hex border. The second point (130, 0) defines the upper right corner of our hex border.<br /><br />The second line is as follows...<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-NCxsNqB6NjI/Xm_VfMhf2gI/AAAAAAAACKc/0sf5JfrqxsATMIytmoUCyA9zoLYDO5spgCLcBGAsYHQ/s1600/hex7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="30" data-original-width="1250" height="14" src="https://1.bp.blogspot.com/-NCxsNqB6NjI/Xm_VfMhf2gI/AAAAAAAACKc/0sf5JfrqxsATMIytmoUCyA9zoLYDO5spgCLcBGAsYHQ/s640/hex7.png" width="640" /></a></div><br />Here we have another two points (42, 1) and (131, 1), which define the left and right border pixels one row down from the top row.<br /><br />We continue to do this for each set of points in our hex borders, row by row, until we reach the bottom of our hex.<br /><br />When a line is drawn on the Panzer map for line of sight purposes, we use the Bresenham Line Algorithm to determine all of the points on that line, then compare each of its pixels to see if it falls between our pixel boundaries for each row of pixels in the hex. If one of the pixels does fall within these boundaries, the hex is in our line of sight.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-ZEQNwuuL4Bg/Xm_Z8Z3PKPI/AAAAAAAACLc/T9pFAhaUYmMhDMoYlVkU-o1bRrC6ysf0QCLcBGAsYHQ/s1600/hex8.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="162" data-original-width="190" height="341" src="https://1.bp.blogspot.com/-ZEQNwuuL4Bg/Xm_Z8Z3PKPI/AAAAAAAACLc/T9pFAhaUYmMhDMoYlVkU-o1bRrC6ysf0QCLcBGAsYHQ/s400/hex8.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Pixel points of line falling inside hex border points.</td></tr></tbody></table><br />Now that we have our starting hex with all of its border points established, we extrapolate out the border points for all other map hexes based on their map hex number. If we are determining the border points for hex 0210, we simply shift the left and right border points the 2 widths of a hex and shift the rows down "10" heights of a hex using multiplication. With a little trial and error, the system works!<br /><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/plYElqUMNGI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/plYElqUMNGI?feature=player_embedded" width="320"></iframe></div><br /></div><div><br /></div><div>Of course, there are some minor details that I haven't communicated, but I don't want to bore you!</div><div><br /></div><div>Although, if I haven't already...</div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]2tag:blogger.com,1999:blog-2346463757740149544.post-53730130539123145062020-03-12T22:23:00.000-04:002020-04-21T10:58:16.108-04:00MapThe base game comes with a single paper hexagonal map. It contains a variety of terrain features, hills, gullies, cover as well as a number of paths, roads and crossings. Villages are represented as wood, stone and brick buildings, some with alleyways. Hedgerows and walls are sparsely located, but add a level of complexity to the project.<br /><br /><a name='more'></a><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-cP4leZDjehI/XmrurkWEA9I/AAAAAAAACDI/ppToEEHADsgzbQo1w6tAwoy6LcWyCTUtwCLcBGAsYHQ/s1600/Mp.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1036" data-original-width="1600" height="414" src="https://1.bp.blogspot.com/-cP4leZDjehI/XmrurkWEA9I/AAAAAAAACDI/ppToEEHADsgzbQo1w6tAwoy6LcWyCTUtwCLcBGAsYHQ/s640/Mp.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The hexagonal base game map contained in Panzer. This will be a challenge to implement.</td></tr></tbody></table><br />Each hex on the map will need to be represented in the system. A terrain key identifies all of the existing types of terrain on the map. Each hex has a single terrain such as Woods, Scrub, Bridge, Ford, Clear, Stream, Road etc.<br /><br /><div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: left;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-NGisgqUgcWU/Xm1imxag5BI/AAAAAAAACEI/husI9UinnsE6Je1JM3AZQPIosHMoLUhgACLcBGAsYHQ/s1600/TerrainKey.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="688" data-original-width="482" height="320" src="https://1.bp.blogspot.com/-NGisgqUgcWU/Xm1imxag5BI/AAAAAAAACEI/husI9UinnsE6Je1JM3AZQPIosHMoLUhgACLcBGAsYHQ/s320/TerrainKey.png" width="224" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Terrain key</td></tr></tbody></table><br /><div style="text-align: left;">Each terrain type has different properties, listed in the Terrain Effects table below. Each type of terrain is listed in the left column.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-7P9ODaerbRo/Xm1npqMJMCI/AAAAAAAACEk/wE6Q9tz0H_wMeH2GJVm9zNfugPJy2Zr8QCLcBGAsYHQ/s1600/TerrainEffects.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="929" data-original-width="856" height="320" src="https://1.bp.blogspot.com/-7P9ODaerbRo/Xm1npqMJMCI/AAAAAAAACEk/wE6Q9tz0H_wMeH2GJVm9zNfugPJy2Zr8QCLcBGAsYHQ/s320/TerrainEffects.png" width="291" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Terrain effects table</td></tr></tbody></table>If we take a look at the "Clear" terrain type, we can determine that is has a height of "0" and a cover of "None".<br /><br />Alternatively, the "Woods" terrain type has a height of 3. The height of the terrain type might block our line of sight to enemy units. We'll cover line of sight later on.<br /><br />"Woods" also has a cover of "Medium", which allows us to hide from the enemy at certain distances.<br /><br />Additionally, if we look across to the "T,H" column, we see that "Woods" terrain type has a movement cost of "3" for any track or half-track vehicles. If our Tiger I is moving through the "Woods" terrain type, it will use 3 of the 4 movement points to do so.<br /><br />All in all, the terrain effects table is a very straight forward table to represent in my project.</div></div><div class="separator" style="clear: both; text-align: center;"></div><br />The biggest overall challenge I faced is one of "Line of Sight". Line of sight in GMT Panzer is fairly straight forward in terms of game play. The technical challenge of applying this to a computer game was, at least in my opinion, one of the tougher pieces to consider.<br /><br />In Panzer, we must be able to determine what a unit can see on the map board. After all, you can't hit what you can't see (generally speaking). So, before a unit fires a shell, bullet or volley, it must be able to see, or spot its intended target. Spotting a target requires "Line of Sight", in which we take a straight edge or piece of string and align it on the map from the center of the shooting unit's hex to the center of the target unit's hex. Centering the straight edge on each hex is made easy by the white dots in each.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-nRr9hplZV3s/Xm6Xl2C24tI/AAAAAAAACFM/IzkRWZkkNz0UN-Rxa0PXl9HLmrtTD-CBgCLcBGAsYHQ/s1600/LineOfSight001.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="512" data-original-width="648" height="315" src="https://1.bp.blogspot.com/-nRr9hplZV3s/Xm6Xl2C24tI/AAAAAAAACFM/IzkRWZkkNz0UN-Rxa0PXl9HLmrtTD-CBgCLcBGAsYHQ/s400/LineOfSight001.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Line of sight is measured from the center of the shooting unit's hex to the center of the target unit's hex. </td></tr></tbody></table><br />Once we have a line drawn from hex to hex, we verify that there are no obstructions between the units. We do not include the hexes that either unit occupies. From the image above, we can see that the Soviet SU-100 M44 (hex 1308) has line of sight to the German Tiger I (hex 1905). Our line crosses a number of hexes, including 1408, 1507, 1607, 1706 and 1806. We note that none of the hexes in which our line crosses has an obstruction. Therefore we have determined that the Soviet unit has line of sight to the German Tiger. We can also say that the German Tiger has line of sight to the Soviet SU-100.<br /><br />This is a very simple example of line of sight in Panzer. Things get a little more complicated when the line crosses very small portions of hexes. Let's look at another example...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-BQXjynzo9ss/Xm6b7QynYFI/AAAAAAAACFo/15lTWJx-nVgs5WFnBsxfeMv4Ozo7qwtNQCLcBGAsYHQ/s1600/LineOfSight002.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="413" data-original-width="755" height="218" src="https://1.bp.blogspot.com/-BQXjynzo9ss/Xm6b7QynYFI/AAAAAAAACFo/15lTWJx-nVgs5WFnBsxfeMv4Ozo7qwtNQCLcBGAsYHQ/s400/LineOfSight002.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Our line crosses parts of other hexes. Each hex crossed must be considered for obstructions.</td></tr></tbody></table><br />The example displayed above demonstrates good line of sight from unit to unit, however the algorithm will need to be able to consider whether the line touches <i>any portion</i> of a hex in order to return line of sight determination. This line of sight crosses hexes 1307, 1406, 1507, 1607, 1707, 1807, 1906, and 2007.<br /><br /><br /><b>Special Cases</b><br /><b><br /></b>Line of sight gets even more complicated. When our line is horizontal or a specific diagonal, it will be drawn across the entire side of a hex. This also means that the neighbouring hex that shares the side will also be included in the line of sight determination.<br /><br />Consider the following example...<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Flbm2JLTR3g/Xm6sifkrxLI/AAAAAAAACGo/jsJBOHmelk8DJysjw3hSKZvYADMmrKkswCLcBGAsYHQ/s1600/LineOfSight003.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="395" data-original-width="792" height="198" src="https://1.bp.blogspot.com/-Flbm2JLTR3g/Xm6sifkrxLI/AAAAAAAACGo/jsJBOHmelk8DJysjw3hSKZvYADMmrKkswCLcBGAsYHQ/s400/LineOfSight003.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Horizontal line of sight must include hexes that share borders.</td></tr></tbody></table><br />Both units have line of sight in the screen above. We need to include hexes that share a border with the line of sight. Let's start our line of sight determination with the Soviet T-34. We don't include the hex that the T-34 occupies, but we do include hexes 714 and 715 because the line crosses the entire length of each hex's sides. Moving on, we see that the line crosses through 0815. As we continue, we see that 0914 and 0915 must be included as well. This continues until we reach the German Panther.<br /><br />If you take a close look at the map, the same situation arises when we have to determine line of sight on certain diagonals. In the image below, we can see that the line crosses the entire border of a number of hexes. The hexes include 0712, 0613, 0713, 0614 and 0714.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-9XGA8G4C7sU/Xm6uv01QhQI/AAAAAAAACG0/jyqL73am6Q8IUagvCJvzugHGLQkmGxCBwCLcBGAsYHQ/s1600/LineOfSight004.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="435" data-original-width="477" height="291" src="https://1.bp.blogspot.com/-9XGA8G4C7sU/Xm6uv01QhQI/AAAAAAAACG0/jyqL73am6Q8IUagvCJvzugHGLQkmGxCBwCLcBGAsYHQ/s320/LineOfSight004.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Some special case diagonal line of sight calculations are required.</td></tr></tbody></table><br />I have identified all of these special cases and taken them into consideration. Along the way, I stumbled onto the fact that hex based maps have an offset column structure in terms of numbering. Hexes are "pushed down" every other column. This isn't exactly a perfect row and column numbering system here. I'll need to determine whether a unit is in an odd or even hex to determine the neighbouring hex numbers for these special cases.<br /><br />I think that's enough for now. I'll explain how I managed to accomplish the map generation in a future post. Meanwhile, here's a short Panzer SOLO video of line of sight in action...<br /><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/plYElqUMNGI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/plYElqUMNGI?feature=player_embedded" width="320"></iframe><br /><br /><br /><br /><div class="separator" style="clear: both; text-align: center;"></div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]0tag:blogger.com,1999:blog-2346463757740149544.post-2008646003154528972020-03-12T22:02:00.001-04:002020-04-21T10:57:06.040-04:00Units<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-zA9ooKu4Yyk/Xp0QBS8mREI/AAAAAAAACTY/6T905l8sG4w84oI3ho2_3a-wJV6WZ64oQCLcBGAsYHQ/s1600/GermanPzVIETigerI.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="132" data-original-width="132" src="https://1.bp.blogspot.com/-zA9ooKu4Yyk/Xp0QBS8mREI/AAAAAAAACTY/6T905l8sG4w84oI3ho2_3a-wJV6WZ64oQCLcBGAsYHQ/s1600/GermanPzVIETigerI.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><div style="font-size: 12.8px;">Tiger I counter represents</div><div style="font-size: 12.8px;">a single unit on the map.</div></td></tr></tbody></table>Each tank (or unit) is represented by a counter. Players have a number of counters that they command. Each counter contains various pieces of important information, including whether the vehicle has tracks, halftracks or wheels, as well as the speed of the unit across roads, paths and open country.<br /><br /><a name='more'></a><br /><br />During the course of a player's turn, they will move these counters around the map in order to tactically gain an advantage over their opponent's units, and then firing upon the enemy until the scenario is over.<br /><br />Counters are great, but the real meat and potatoes of this game are each units "Data Card". Data cards are the life and blood of each unit, describing their properties, offensive capabilities and defensive protection.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-b6JBFDo_vi0/Xmrm62MpZmI/AAAAAAAACCs/l4fJYDHefacOsM5TH9KsNaQgi_H9yrnmwCLcBGAsYHQ/s1600/TigerIData.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="400" data-original-width="500" height="320" src="https://1.bp.blogspot.com/-b6JBFDo_vi0/Xmrm62MpZmI/AAAAAAAACCs/l4fJYDHefacOsM5TH9KsNaQgi_H9yrnmwCLcBGAsYHQ/s400/TigerIData.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Data card for the German Tiger I.</td></tr></tbody></table><br />We won't get into the greasy details of the cards for the moment. For now, we'll just say that these data cards are one of the primary reasons I thought I might try to pull this project off. If you analyze each card long enough, it becomes clear on how you might represent the information in an object-oriented way.<br /><br />Each unit has a variety of defined properties, such as:<br /><ol><li>Speed</li><li>Bog modifier</li><li>Size</li><li>Turret turn rate</li></ol><div><br />Each unit also has data that can be represented as lists: </div><ol><li>List of ammunition types</li><li>List of gunnery ranges</li><li>List of armor piercing damage</li><li>List of defensive data</li></ol><div><br />We'll get into each of these in due time.</div>8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]0tag:blogger.com,1999:blog-2346463757740149544.post-36909854157447704712020-03-12T13:28:00.001-04:002020-04-21T10:57:41.025-04:00Let's get rolling!<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-zVrIik0wCsk/XmrV66S4o9I/AAAAAAAACBw/GAzpNNs42EEcCe4x7Es8KkZIaeN3qz6nQCLcBGAsYHQ/s1600/Panzer%2Bbox.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="611" data-original-width="458" height="200" src="https://1.bp.blogspot.com/-zVrIik0wCsk/XmrV66S4o9I/AAAAAAAACBw/GAzpNNs42EEcCe4x7Es8KkZIaeN3qz6nQCLcBGAsYHQ/s200/Panzer%2Bbox.jpg" width="148" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">GTM Panzer basic game. There<br />are a number of expansions that<br />are available as well.</td></tr></tbody></table><div style="text-align: justify;"><i>I want to convert the <a href="https://www.gmtgames.com/p-749-panzer-3rd-printing.aspx">GMT Panzer</a> series war game to a desktop computer game.</i><br /><i><br /></i><i>I'm going to add an intelligent system that provides an artificial enemy. </i><br /><i><br /></i><i>And then I will play this game solo.</i></div><div style="text-align: justify;"><br /><a name='more'></a><br /></div><div style="text-align: justify;">I'll be documenting as much as I can, as often as I can. The programming challenges are daunting, but we're going to give it a go...</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">What is Panzer? Without going into too much detail, it's a hex-style war game covering the second world war. The focus centers on tank warfare. Each piece on the board represents a single unit. Each player manages a formation, taking turns spotting, firing and moving until one side manages to outscore the other. What's left at the end of the game is a heaping map of twisted metal and burning hulks.<br /><br />Game play consists of a number of phases, each of which I will need to explore in minute detail in order to translate to the computer version. There are a significant amount of rules to implement. This will be no trivial task to program.<br /><br />I'm making this up as I go. Things might not be as clear as I intend, although I am not trying to explain every little rule. That's what the rule book is for. What I will do is try and demonstrate some of the complexities that must be conquered.<br /><br />Of course... complexity is subjective :) I have never created any kind of computer game let alone implement an AI system. I have never done any Windows graphics programming either. Not a great resume! But I'm up to the challenge. Hopefully at least a few will find this site somewhat interesting. Either way... I'm excited to get rolling.<br /><br /></div><div class="separator" style="clear: both; text-align: center;"></div><br /><br /><div class="separator" style="clear: both; text-align: center;"></div><br />8traxxhttp://www.blogger.com/profile/01125267570212257696[email protected]2