Jump to content

Photo

Panzer Strike


152 replies to this topic

#1 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Mon Oct 13, 2014 4:14 PM

So as I was waiting in the hospital lobby area for 5 hours for my wife's surgery to be completed (she did fine thankfully), I decided out of the blue to design an XB wargame, something I could (maybe) have ready by Faire time in November. Besides, what else was there to do anyway???

Out came the notepad, and 10 pages of furious scribbling later, I had a detailed outline for a tank battle simulation game, including an AI.

It will pit 5 tanks on each side, each of which will have characteristics such as fire power, side-dependent armor plating, and range. Damage will vary depending on the facing tank side (front is strongest, back is weakest, and sides are mid-range). Full line of sight and fog of war is implemented, along with the ability to send out reconnaissance aircraft. The battlefield will consist of plains, hills, forests and rivers, and will be fully editable.

There will be a scenario editor where one will be able to create a battle map and set the tank characteristics then package it as a complete scenario.

The objective of the player will be to occupy and hold a target square within the enemy (computer AI) area and hold it for 3 turns. The AI on the other hand will of course sweat silicon trying to stop you.

I believe I have most of the salient details worked out on paper, and I'll start the actual coding this week.

This game will be in the same spirit as Clear For Action. Whether I will also need to chain multiple code segments together remains to be seen.

More to come.

 

UPDATE:

Attached is the completed program package including the .dsk file, source and manual. This latest version as of October 2015 fixes an important bug in the rotation of the player tanks where it was possible to rotate to the right in excess of the allotted movement points.

Attached Files



#2 unhuman OFFLINE  

unhuman

    Stargunner

  • 1,135 posts
  • Location:Vienna, VA

Posted Mon Oct 13, 2014 4:20 PM

Best to you and your wife!



#3 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Mon Oct 13, 2014 4:30 PM

Thanks :)



#4 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 3,966 posts

Posted Mon Oct 13, 2014 4:34 PM

Best to you and the wife from here as well.

 

I also like the game concept--the AI trying to retake that square will not only sweat bullets to get it back, it'll lob a huge amount of iron into that space in a concerted attempt to vaporize anything that is foolish enough to actually be there. It sohould make for some interesting defensive/armor use strategies for the player trying to hold that space against a full-blown assault.



#5 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Mon Oct 13, 2014 4:48 PM

Best to you and the wife from here as well.

 

I also like the game concept--the AI trying to retake that square will not only sweat bullets to get it back, it'll lob a huge amount of iron into that space in a concerted attempt to vaporize anything that is foolish enough to actually be there. It sohould make for some interesting defensive/armor use strategies for the player trying to hold that space against a full-blown assault.

 

Thanks :)

You have definitely outlined here the main AI response when the target square has been occupied: throw everything at the occupying tank! Obviously, if the player makes an early bee line for that square, he will have to face the full intact brunt of the enemy force, likely with deadly effects. A better strategy is to try to ambush and pick off the enemy tanks one at a time, utilizing terrain features whenever possible. For example, a tank tucked away in a forest will be completely undetectable, even from the air. However, that tank will also be blind unless it is right on the edge of the forest. There is also a very large movement cost for entering and moving into forests for tanks. Of course, the AI will not be sitting idle and will have a few effective tactics up its sleeve.



#6 Iwantgames:) OFFLINE  

Iwantgames:)

    Stargunner

  • 1,771 posts

Posted Mon Oct 13, 2014 5:03 PM

This game sounds cool :) hopefully we get to play it soon ;) but your wifey comes first and hopefully she doing ok :)

#7 am1933 OFFLINE  

am1933

    Stargunner

  • 1,033 posts
  • Location:U.K

Posted Mon Oct 13, 2014 5:10 PM

Sounds good, sounds very good!

 

Tanks-now your talking my language, are you going to give it a historical element?, a WW2 setting would help to define the response of each side if the turns were linked to the years passing.

 

eg-Germans advance into USSR and get shocked by T34's, Germans respond with up-gunned Panzer IV's, Tigers and Panthers, Russians ht back with KV's, T34-85's and IS II's etc etc.

 

How big an element would air power take in the game?-after all, if you gain air superiority, all tanks will in effect become useless.



#8 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Mon Oct 13, 2014 6:38 PM

Sounds good, sounds very good!

 

Tanks-now your talking my language, are you going to give it a historical element?, a WW2 setting would help to define the response of each side if the turns were linked to the years passing.

 

eg-Germans advance into USSR and get shocked by T34's, Germans respond with up-gunned Panzer IV's, Tigers and Panthers, Russians ht back with KV's, T34-85's and IS II's etc etc.

 

How big an element would air power take in the game?-after all, if you gain air superiority, all tanks will in effect become useless.

 

Well, the historical element could potentially be somewhat recreated using the scenario builder where custom battle maps could be design based on historical ones. The tank characteristics do not go down to the level of specific gun elements, weights etc..., but rather use general attributes to try to emulate them at a high level. For example, the attack potential of a tank goes from 1-3, and can be used to represent a superior or inferior main gun power. You can assign different armor strength (0-4) for the front, sides and back of a tank, again trying to emulate the the same level of protection that a historical tank had. Movement potential varies from 2-8, however this one is automatically calculated based on the attack potential and the total armor value, because a bigger gun and heavier armor mean more weight and thus generally less mobility. As you probably well know, tank design has always been about finding the right balance between fire power, armor, and mobility.

As for the air element, it is only restricted to a single reconnaissance sortie per game per side. The effect of a sortie is to uncover all of the opposing tank positions for one turn, except the ones hidden in forests. But there is a catch. There is always a chance that the plane will be shutdown before its mission is complete, more so if the side ordering the sortie is losing and less so if he is winning, thus trying to represent a certain level of disorganization or morale boost of the affected side. 

So all in all, one should be able to create a descent historical recreation of a WWII tank battle, and I will try to include at least a couple of those with the game as a start. Maybe I'll have Rommel and Monty battle it out :)



#9 am1933 OFFLINE  

am1933

    Stargunner

  • 1,033 posts
  • Location:U.K

Posted Tue Oct 14, 2014 6:45 AM

It would be great to have a game based on the tank battle at Kursk, we only need to find some way of getting about 5,000 sprites on the screen at the one time. ;)



#10 Stuart OFFLINE  

Stuart

    Dragonstomper

  • 647 posts
  • Location:Southampton, UK

Posted Tue Oct 14, 2014 7:44 AM

It would be great to have a game based on the tank battle at Kursk, we only need to find some way of getting about 5,000 sprites on the screen at the one time. ;)

F18 Mk II.  ;-)



#11 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Tue Oct 14, 2014 8:26 AM

Just remember that this is a platoon based simulation, so it will be kind of hard to recreate large battles.
What I have decided to do though is include a number of preset WWII tanks in the scenario builder whose characteristics will try to be as close as possible to the real thing from a firepower and armor perspective. This will help increase the accuracy of the simulation when setting up historical scenarios and reduce guesswork.
Furthermore, I have replaced the fixed gun range with a variable one which will depend on the main gun characteristics of the tank being emulated, thus adding a little more realism.

#12 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,036 posts

Posted Tue Oct 14, 2014 9:37 AM

Ambitious! I like it. :)
 

Removing my earlier comments... I see that you are familiar with chaining XB programs and the difficulties of variable passing already. :)

 

Some other thoughts... having a fog of war is going to be very slow processing. By the description you wrote it sounds like each tile has the following properties:

 

  • Terrain Type (Forest, hill, plain, road, river, etc.) Can be stored as an ASCII display character for speed
  • Covered/uncovered in FoW (boolean)
  • Is owned by Enemy (boolean)

Ownership is only checked for victory conditions, so that should be easy to store in a numeric array. Although that's a HUGE waste of memory... Come to think of it, wouldn't it be better to have a "point" of control, like a city or fortification that your tank has to "occupy"? That would be far cheaper and easier to track... and you could set up scenarios with 1-5 points of control, meaning if you lose too many tanks you can't achieve victory.

 

The fog of war could be painful, though. I assume tanks "uncover" area as they move, or aircraft do around enemy tanks? One good way to do a fog of war that way is to just store "blank" characters next to your actual ones. If you cut your set size in half (4 instead of 8 ) then you can just initialize your map screen all in blanks. As a tank moves around, you use GCHAR to get the characters around it, add/subtract one, and VCHAR it back to expose the tile.


Edited by adamantyr, Tue Oct 14, 2014 11:49 AM.


#13 Willsy ONLINE  

Willsy

    River Patroller

  • 2,950 posts
  • Location:Uzbekistan (no, really!)

Posted Tue Oct 14, 2014 9:43 AM

This sounds like something I would play. I like it!



#14 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Tue Oct 14, 2014 12:36 PM

Yes, I am very familiar with program chaining from my earlier work with Clear For Action. All it really involved was storing the relevant variables on a temp disk file and having the chained program retrieve them. Since the screen is preserved during chaining, the process is transparent to the user.
The way I am implementing fog of war is 2 fold: each own tank is checked against every enemy tank that is alive for distance (d=SQR ((x1-x2)^2+(y1-y2)^2), and if it exceeds 10 then the enemy tank is invisible for that particular unit. Otherwise, a virtual Bresenham line is drawn from the enemy tank to the originating tank, checking along the way for any obstruction. If none is found, then a check is made for facing because a tank can only detect objects within 45 degrees from the centerline. Only then if all the conditions are met that a tank is made visible and it's position is broadcast to all friendly tanks.
This process will be repeated for the computer side as well.
All this is done prior to the movement phase. When it's the computer's turn to move, it's tanks are temporarily hidden until movement is complete, then another round of visibility checks will be made for each side since movement will very likely change the visibility of some tanks.
I know all this sounds complicated, but it will be iterative and I will try to make it as efficient as possible.
As for square ownership, I only need to track the target square, and that is easy to do. All other squares are irrelevant.

#15 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,146 posts
  • Location:Silver Run, Maryland

Posted Tue Oct 14, 2014 2:40 PM

... for distance (d=SQR ((x1-x2)^2+(y1-y2)^2), and if it exceeds 10 ...

 

Maybe you are already doing this; but, you do not need to waste CPU cycles taking the square root—just compare d2 to 100.

 

...lee



#16 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Tue Oct 14, 2014 3:02 PM

Yes of course :)

#17 InfernalKeith OFFLINE  

InfernalKeith

    Dragonstomper

  • 620 posts
  • Location:Toledo, OH

Posted Thu Oct 16, 2014 6:48 PM

This sounds awesome, Walid!  I am embarrassed to say I haven't played Clear For Action yet.  I am gonna rectify that tonight, I'm on the road for work and in a hotel in the middle of nowhere, North Dakota, so I'm glad to have found some entertainment for the evening.  :)



#18 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Thu Oct 16, 2014 6:51 PM

Hope you enjoy it :) 



#19 am1933 OFFLINE  

am1933

    Stargunner

  • 1,033 posts
  • Location:U.K

Posted Fri Oct 17, 2014 9:19 AM

panzer_general2_screenshot1.jpg

Whilst we are all in a wargame mood-just a little indulgence on my part, Panzer General II-possibly the best strategy game ever.

 

683539515.jpg

 

And now-Panzer General III, probably the worst sequel ever to a perfect game engine.(oh how my heart sank as I played this for the first time) :_(

 

 

Sorry for the partial thread hi-jack.



#20 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,036 posts

Posted Fri Oct 17, 2014 10:52 AM

You've inspired me to write a little XB game of my own... details to come soon! ;)



#21 InfernalKeith OFFLINE  

InfernalKeith

    Dragonstomper

  • 620 posts
  • Location:Toledo, OH

Posted Fri Oct 17, 2014 3:04 PM

I delved into Clear For Action last night.  It's a very impressive game!  I feel like it would take me weeks to get the hang of all the variables and figure out how not to get my butt kicked.  I'm not well versed in the war games and Avalon Hill titles that inspired it, though, so I'm coming at it as a real noob.  It's a very intriguing game, though, and the level of complexity you managed to work into it is pretty impressive.  

 

This is the sort of project that makes me feel bad that more people aren't playing the games that get created (as was being discussed in that other thread).  If nothing else, you also inspired me to get off my butt and work on the AI for my (much simpler) game I posted about a few weeks ago.  Got some more hotel downtime this weekend and I'm looking forward to coding, and to playing Clear For Action some more.



#22 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Fri Oct 17, 2014 4:44 PM

You've inspired me to write a little XB game of my own... details to come soon! ;)

 

Excellent! Looking forward to it :)



#23 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Fri Oct 17, 2014 4:47 PM

I delved into Clear For Action last night.  It's a very impressive game!  I feel like it would take me weeks to get the hang of all the variables and figure out how not to get my butt kicked.  I'm not well versed in the war games and Avalon Hill titles that inspired it, though, so I'm coming at it as a real noob.  It's a very intriguing game, though, and the level of complexity you managed to work into it is pretty impressive.  

 

This is the sort of project that makes me feel bad that more people aren't playing the games that get created (as was being discussed in that other thread).  If nothing else, you also inspired me to get off my butt and work on the AI for my (much simpler) game I posted about a fIew weeks ago.  Got some more hotel downtime this weekend and I'm looking forward to coding, and to playing Clear For Action some more.

 

Thanks :) It's certainly not everyone's cup of tea, but like most programmers here I tend to write the programs I want to play. 

I hope you can get your AI algorithm up and running. At first building an AI can seem like a daunting task, but the key here is to break it down to very simple principles and you'd be surprised how much apparent complexity can arise from just a handful of axioms.



#24 InfernalKeith OFFLINE  

InfernalKeith

    Dragonstomper

  • 620 posts
  • Location:Toledo, OH

Posted Fri Oct 17, 2014 7:03 PM

I feel like I approached it the right way this time, at least, in that I built the main game loop with no bells and whistles, in two-player mode, then just played it a bunch myself.  That approach showed me a few different strategies an AI could take, and also made me redesign a few elements of the game to remove some easy 'cheats' to winning.  The game itself will be more compelling, and the AI will be 'smarter' and possibly have a few distinct options that the human player can choose from.



#25 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Fri Oct 17, 2014 9:11 PM

The scenario builder is half way done, with the map building section completed. Next is the tank designer. You will have the ability to pick a ready to go tank design from a list of the 10 top WWII tanks (according to this site http://armedforcesmu...-tanks-of-wwii/) or you could create your own custom characteristics.

The scenario builder is a standalone program separate from the main game, and I should have it completed within the next few days.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users