Sunday, June 27, 2010

UnholyWars: Battle Round Minigame



Artists: Trever Barger & Jackie Crofts
Programmer: Douglas Atkinson

This is the basic working version. I haven't added code for effect or timing, but the basic premise is there. Since it's a part of a larger game, I randomized the values for troops and the nation invaded, as well as the terrain type. From the values, the game determines who is weaker, and consequently, defending. Once those values have been established, the real battle can start.

Since raw numbers can usually overpower an army, tactics can be chosen at the beginning of each combat round. The tactic advantage is set up as: Flank dominates Pincer, Charge dominates Flank, and Pincer dominates Charge. If tactics are equal, no advantage is applied.

The 'die roll' hits are multiplied by the tactic advantage or disadvantage and then applied as actual hits. If the hits are more than your troops, all units are removed and God wins the battle. Otherwise a hit selection screen is added to allow player selection of casualties. Once all hits have been allocated, the kill button will appear to remove the casualties.

Gods units are then checked against hits, and victory is applied or units are removed, and a new round begins. The process repeats until a victor is determined. Restart is then enabled for repeating play of the demo.

Enjoy!

0 comments: