From: London, Surrey, United Kingdom
How did your Excel game work out -- encounter any limitations on numbers of graphical objects that could be used?
Graphical objects...? I think you're overestimating how sophisticated I got with this thing.
Attached is a screenshot; the numbers mark the position of the unit on the map, then conditional formatting colours it red or blue to show the faction, with three shades of grey to show rough unit strength (everyone here is pretty fresh so you don't see the faded grey for weaker units). The cell borders display unit facings which are drawn when the unit turns, though this is pretty hit-and-miss: you'll note that when 33rd turned to its left to face 1st, it erased the frontage of 2nd which is also facing it to the north. As a result you sometimes need to refer to the OOB list off to the right to understand what's actually going on. The player uses the controls to move, turn or attack with the unit in the active cell, and clicks to select a different unit. It's not designed to be used by a rogue player so there's nothing to stop you selecting a unit from the other force in the middle of your turn.
The main thing here is the AI, which is a series of "if" statements telling each AI unit how to act depending on what units are deployed around it. In this scenario, blue (me) has refused the eastern flank while pushing a number of reserve regiments into the western flank, with a view to enveloping red (ai) while avoiding a collapse on the other end of the line. The AI is able to follow up to attack but, but not smart enough to flank or to shift reserves over to the weak part of the line (you can see the second line on red's right is just dumbly following up rather than shifting over as a player would). In fact, when Blue's flank move caused 41st to become isolated from the rest of red's line, the AI's response to an isolated unit was to pull it back to safety, which here looks like the unit is fleeing the battlefield. I could theoretically add more "if" statements to look for friendly units to either side to help it consolidate the line.
The setting I had in mind was more like a hoplite engagement, so everyone is melee, and there is no terrain whatsoever. I was going to expand it either to be a beer and pretzels strat game or to include ranged units, but I lost interest.
The point of this exercise was twofold:
1) it was a cool way to learn VBA, which you never know might one day be useful
2) work was quiet, and I thought having Excel up in front of me would look more like I was busy than something more obvious
I'm actually a lot happier with my Excel RPG... that's actually a complete game, where the player explores three levels of procedurally generated dungeon, collecting treasure and XP on the way to the exit (or more often untimely death).
< Message edited by golden delicious -- 6/18/2021 2:45:06 PM >
"What did you read at university?"
"War? Huh. What is it good for?"