FORWARD BASE B

"Pay my troops no mind; they're just on a fact-finding mission."

Category Archives: gaming

My Parser Computer Game

Programmed in Python 3:

https://github.com/GiovanniDannato/Do-Anything-Text-Game

Growing up I had a special affection for games where you could type commands into a parser because unlike a mouse interface you could attempt anything you could possibly think of and play with language itself.  In puzzle games this made it so you had to actually think things through and no clickfest could save you.  One could try to cheat by typing “use x with y” for every combo of items in your inventory but designers were usually more clever than this.
Frederik Pohl’s Gateway, one of my favorite games of all time, had limited graphics but understood the fun and capricious nature of the text interface better than any other.  The designers actually made an effort to think of all the dumb stuff you might type in. Here’s a couple of screen shots I just made:

messing around in Frederik Pohl’s gateway

 

 

What’s more, Gateway was a very well-made game when you actually took it seriously.  I loved that kind of depth.  For years I wanted to make something similar.  So I did as a way to learn some python a couple years ago.  I’m sure my code is terrible by any professional standard but it seems to work.  There are still bugs of course.

I tried to add some of the whimsical flavor I loved so much back in the day from games like Zork and Gateway. Come to think of it, death sequences were definitely inspired by reading too many Choose Your Own Adventure books as a kid.  I have monsters, puzzles, and an ending.  The player character can take 3 hits before dying.  There is an optional item that will improve your chances at the end but solving that puzzle requires thinking a bit immaturely. If a monster seems overwhelmingly difficult, you probably haven’t found the right item/solved the puzzle yet. If you have a weapon but use the word “hit” you will still be attacking with your hands. For those who have never played these kinds of games:
‘i’ =”look at inventory”
‘n, s, e, w’ = “go x” direction
‘l’ = “look at room”

Finally got around to putting it on github:
https://github.com/GiovanniDannato/Do-Anything-Text-Game
DoAnything is the executable and it should run in python 3.

The Importance of Strategy

Whether chess, go, RTS, MOBAs or any of the tests we face in real life, there are eternal constants of strategy that optimize the likelihood of victory.
Any society, I think, should groom its bright and curious children for societal leadership from an early age through education in strategy.  Strategy should be one of the core pillars of education in a post-Enlightenment era just as rhetoric was in ancient times.  Games of strategy help teach the mindset required to make important, difficult decisions from a detached and rational perspective.
I will use chess and league of legends for examples.  Chess is a turn based game individual game that requires one to think ahead in discrete steps.  League of legends is a real time team game that requires making correct judgment calls within fractions of a second.
I will try to address some of these great constants.

Don’t Get Greedy

This is probably the first and greatest lesson every game of strategy teaches.  When we’re children or just trying it out for the first time, we try what seems intuitive and simple and fall flat on our asses.  You have an objective you have to achieve whether it’s checkmating the king or destroying the enemy base but if you try to take your objectives by trying to grab it all at once or simply lashing out emotionally, you lose.  You lose every single time; it’s like fighting against a law of physics.
In chess your attacks are obvious and impotent without planning ahead.  Lashing out impulsively merely exposes you to attack and quickly loses you the game.
In League of Legends harsh experience teaches you to know exactly what level of risk and what price is worth paying to achieve any objective in a given situation.  It is very easy to get greedy in the moment and succumb to the temptation to try to get those last few hits on a turret when you know you will probably be surrounded by the enemy team and killed if you wait those extra 2-3 seconds and still fail to capture the objective in a pointless self-sacrifice.  Anyone who’s played the game awhile will have had this kind of frustrating experience many times over towers and dragons.  Knowing exactly how much closer you can move to your goal without getting greedy and overextending that extra inch is the difference between victory and defeat.
I can’t think of a single contest of strategy that doesn’t harshly punish greed.  It’s a law of the universe and therefore one of the most useful lessons for dealing with real life challenges.

Sunken Cost Fallacy

Humans are really bad at dealing with sunken costs.  Our first impulse when we have material or emotional investment is to keep investing.  Then we find ourselves drained dry with nothing to show for it.  That’s how you lose.  Every game of strategy requires you to clear your head when you suffer a loss and keep going without panicking or throwing good after bad.
In chess you can quickly end a game by throwing a tantrum when your piece gets captured by retaliating recklessly until suddenly you realize you traded at a disadvantage and now your army’s gone.  Soon you learn to think ahead and only make trades you think will improve your position.
In league of legends, everyone has tried to rescue that one teammate who always seems to be out of position only to get killed along with them and make the situation even worse.  At a point you start to develop the snap judgment to know when to cut your losses and understand your teammate will get themselves killed no matter what you do.  You learn exactly how much power you have to change a situation and when you must retreat.
Every game of strategy forces the player to deal with sunken costs.  It teaches us to confront one of the universal weaknesses of the human mind and develop the discipline to deal with losses proportionately rather than emotionally.

Finding the Golden Mean

All strategy games require finding the right balance of aggression and defense.  Not attacking at all leaves the opponent free to go for a fatal blow at the time and place of  their choosing.  Attacking recklessly opens one to instant defeat.
Every strategy game is about finding the right shades of gray while extremes of any kind are typically losing strategies.
In real life, inflexible idealists lose to pragmatists every time.
Strategy allows us to test a conflict scenario over and over in a controlled environment until we find where that sweet spot lies.  All too often, that sweet spot is relevant to real life.  We learn not only to moderate our strategy appropriately, but know exactly when to change our approach.

Choose The Battlefield

You have the advantage when you have the initiative and control the terms of engagement.
In chess, you are in control when the opponent is forced into merely reacting to your moves.
In league of legends, your team has a huge advantage when you are about to take an objective and you know the enemy team has to try to stop you.
When the opponent is forced to react, you know exactly what he will do next while he has no such knowledge of your intentions.
When you dictate when, where, and how an engagement takes place, you of course always occupy the most favorable ground.

Learn to Balance Multiple Needs

In the first few games of chess, it quickly becomes apparent that controlling more space on the board is advantageous, so you advance your pawns to tighten the noose…until you realize that stretching out too far exposes your entire army to attack if a mobile enemy gets behind your lines.  Having the right structure to defend behind your lines is as important as moving forward.  It is a good thing to control more space, but there are other considerations to take into account simultaneously and arrive at the move that best serves these multiple needs.
In league of legends, it is good to get lots of kills.  It gets you tons of gold, disrupts the enemy’s ability to get gold, and reduces the ability of the enemy team to act.  But it is ultimately a team game that’s decided on teamfights and control of objectives, not individual prowess.  A one-sided strategy is a losing strategy.

Opportunity Cost

There are often many choices we can make that will bring us closer to victory, but the ideal is to make the single best choice.
In chess, focusing too much on dislodging an enemy pawn from an important square can lull the player into thinking small and not focusing enough on bigger goals.
In LoL, the position of jungle best emphasizes this problem.  The jungler is a troubleshooter who is responsible for events anywhere on the map and has to have the judgment to know when and where their presence is most likely to give their team the greatest possible advantage.  Merely avoiding disaster is not enough.  The price of sub-optimal decisions is defeat.
In real life everything we do carries a price when we could have been doing something else instead.  Strategy invites us to reflect on this eternal principle.
This one especially addresses the most insidious pitfall of modern life.  With just a smartphone we could google anything we wanted for the rest of our lives and we wouldn’t even scratch the surface of the content that’s out there.
The abundance of information and stimulation makes it especially important for us to be able to inhibit our impulses and make strategic decisions about where to most effectively invest our extremely finite time and attention.

Keep Cool When Things Are Going Badly

When a queen breaks through the front line in chess and has the king in check with multiple other pieces in jeopardy, it can be easy to panic and by doing so pretty much forfeit the game.  Panicking when there’s a setback ensures defeat.
If you keep your composure it’s possible you may still lose, but there is then still a chance you can
-turn things around–maybe even turning the situation against your opponent, by persevering and winning the trade,
-or simply control the damage as best you can and wait for your opponent to make a mistake.
In a team game like LoL, dealing with group dynamics is hugely educational.  There’s always that player who despairs at the first minor setback and types in “gg ff20″(surrender at the first opportunity) when the other team gets first blood or the first dragon.  If you’re in bottom lane, you’ll always have that support or ADC who criticizes everything you do.  If you’re jungle, there’s always someone, or even more than one person that blames you when they lose their lane.  This situation tests your ability to stay focused and keep the big picture in mind even when there’s chaos and dissent all around you.
Whether on your own or in a group, training in strategy prepares the mind to treat adversity in real life as a momentary setback that can be dealt with if we just stay calm.  Just once coming back to win a game you thought was lost, and were tempted to quit, is an experience that changes how you think forever.

Practice Ahead of Time

Anyone who’s ever been in a real-time or fast-paced contest of strategy has learned the hard way why armchair generals are worthless.
Mike Tyson may have summed it up best: “Everybody has a plan until they get punched in the mouth.”
It’s a perspective-changing experience to freeze up and fall apart under pressure while getting completely destroyed.  Losing like this destroys delusions of grandeur and forces us to acknowledge exactly what our capabilities are, no more, no less.
Then we learn the game and practice until we begin to be able to react appropriately when things start happening fast.
Strategy games teach us that the intuition that fails us so spectacularly at first can be trained until we can make those split second decisions under pressure.  That intuition is itself an algorithm derived from previous experience.  To function, it needs the appropriate conditioning.
It teaches the worthlessness of talent without experience.  Starting out a game like league of legends or starcraft, there are legions of toxic morons that destroy you effortlessly simply because they know how the game works and you don’t.

Your Hand is Better Than You Think

When you first play any game of strategy, you get crushed by anyone with even a bit of experience and it seems a monumental endeavor.  The opposition seems invincible.  But by the time you win your first victories, you begin to see everyone else has flaws and doubts they constantly struggle with.  When you see people with good jobs and pretty women in the real world, it’s easy to be jealous with inexperience.  But when playing games of strategy vs. humans you get glimpses of your opponents’ character and realize even those who may be better than you are just people who have their own baggage to contend with.  You learn to value the advantages you have and exploit them to the fullest against your opponents’ weaknesses.  Once you start thinking like this, you ponder how to turn the situation to your advantage instead of getting jealous.
Strategy teaches you not just to avoid overestimating your own capabilities–even more importantly it gives you the imagination to not see any opponent as inevitable or invincible.  Once you internalize this, you find yourself capable of much more than you thought possible.

Conclusion

Strategic training and ability should be absolute prerequisites for any position of responsibility in a competent society.  Games of strategy simulate high stakes struggles with both sides evenly matched.  The ability to repeat the experience in a controlled environment with nothing real at stake teaches lessons in a few months that would normally be hard-won over decades or even generations.  One can make the many blunders of inexperience with pieces on a board instead of with real people.
A simple game doesn’t approach the complexities of real life, but that’s the point.  Like with any other experiment you remove as many variables as you can so you can isolate the individual moving parts.   This works because the laws of physics are always the same, even if we are faced with the complexity of a giant pool table with thousands of balls colliding.
Above all, learning the principles of strategy changes the way we think, allowing us to override the simian kneejerks that dominate the vast majority of human responses and actually become capable of behavior that is somewhat rational.

See Also:  Life Lessons From Starcraft 2

Life Lessons from Starcraft 2

Computer games can be time wasters when we’re just playing against a computer. MMOs tend to be a waste in the absence of an end goal in an environment that’s deliberately designed to be aimless and addictive.

Games of strategy, however, tend to exercise the mind and spirit, especially when your opponents are other humans. This is a role Starcraft II fills admirably with its server packed with thousands of people, a game against fresh opponents always ready to play in a few seconds. Each match has clear objectives and an ending, unlike MMOs. In an hour one can play 3-4 different matches finding out what works and what does not.
One quickly finds even at the lowest level of play human opponents are far more dangerous and unpredictable than any AI.
About every 15-25 minutes you can go through life’s conflicts in miniature. It doesn’t take long to see certain patterns emerge, that certain philosophies work optimally while others are mediocre or fail outright.
I will try to list some of the lessons I’ve learned from starcraft that have proved valuable in real life:

1. Experience trumps wits.   Some idiot who’s simply spent more time playing the game will beat you when you’re new, no matter how fast and clever you think you are. You might think you’re smart, but it’s not as much an advantage as you think if you haven’t put in the time and effort.
Coasting on raw ability alone fails miserably in a contest that relies on learned skills. An ordinary guy who knows an optimal build order to execute a sound strategy will destroy a genius who’s trying to figure everything out for the first time.
This is why there’s plenty of average joes doing well in life while everyone knows that “smart” guy who’s losing at life.
Starcraft 2 teaches there’s no such thing as “potential” only results.

2. Success is a numbers game. You have to lose (a lot) to ever be a winner. As you get better the matchup will try to move you up the ladder to people who are your equal or better in ability.
You lose your ego fast when you constantly go up against opponents who you’ll lose to half the time. You’re never allowed to just stay comfortable crushing people who are below you. Every time a new game begins, you’re up against someone you can’t take lightly. By the time you learn enough to play even half decently, you’ve suffered dozens of humiliating defeats and know what it feels like when the winner decides to be an asshole.
Even if you get good, you know there’s no shortage of people who can slap you around effortlessly. You realize gloating in victory is for children who know little of life. A real life Big Man is above such silliness.

3. Time is the most important resource. A dumbass who’s simply faster than you will destroy you every time. If you aren’t ready when he comes for you, if you can’t react fast enough, that’s it, you’re dead. All your boasting and bragging how you’re a master strategist is for naught. Knowing kung fu makes no difference if you’re dropped right away by a swift punch to the jaw.
Imagine getting extra moves in chess! You’d be able to destroy players monumentally smarter and more skilled than you. The day is often decided simply by getting there first with the most.
The importance of time in deciding conflict can’t be doubted if we glance at the American Civil War. A bit more speed would have prevented the rebel armies from uniting at Manassas. A bit more speed could have threatened Washington after First Manassas. A bit more speed could have destroyed Lee’s army at Gettysburg. Longstreet saved Lee from defeat at The Wilderness by arriving at exactly the right time. A little more speed and there would have been no months-long siege of Petersburg…
Starcraft drills this lesson into your head mercilessly. If you’re playing terran and that bunker is completed just a few seconds too late before that zerg rush hits, it’s game over.

4. To everything there’s a golden mean. Goldilocks and Aristotle had the right idea. Too aggressive, you die. Not aggressive enough, you die. Starcraft teaches you the hard way to have a feel for exactly what kind of approach a situation calls for. When we’re first learning to drive a car, we sway back and forth in the lane, compensating then overcompensating. Soon, we drive straight.
In real life, though, we tend to make a major mistake that causes us to overcompensate to an equally faulty extreme. Then we waste years of our lives compounding our error until continuation becomes so painful we’re forced to re-evaluate our strategy. A few decades later, the lucky among us are finally able to drive that car somewhat competently, the rest never learn.
With starcraft, it becomes possible to see a model of that grand learning process in miniature.

5. Your brilliant ideas mean nothing until you try to execute them. Even a simple plan falls apart when you’re under pressure. Being adaptable in the moment is more valuable than making grandiose complicated plans. This is why armchair generals fail. A game like starcraft becomes a laboratory to test your hypotheses about what will work and what will not.
In real life, we can’t formulate a philosophy and then have a series of 20 minute tests to see if it really works as a guide to our actions. But starcraft allows us to come somewhat close to that. Through trial and error we learn that some approaches are objectively better than others. After trying something 20 times and getting your ass kicked every time, you’re forced to stop rationalizing. That approach doesn’t work. Now, no demagogue, ideologue, or politician will ever convince you otherwise; you’re immune to their poisonous talk of relativism because you’ve experienced objective truth for yourself, often painfully.
In real life, winning conflict requires the same principles as engineering. You want the simplest, lowest investment solution that effectively solves the problem. The more complexity, the more points of failure. Evolution shows us this philosophy is one of the underlying laws of reality. A “fit” living thing accomplishes its goals as efficiently as possible with as few points of failure as possible.
The pages of history are littered with egotistical generals who broke this universal law, thinking themselves military geniuses to the bitter end.

6. Always go for decisive objectives that put your opponent under mortal threat, which forces him to try to stop you with all his resources. As with chess, you want to risk your army for proportionate gains. A new player might wreck his opponent’s new expansion base only to find his own main base is now being gutted. Dealing a painful but not mortal blow allows the opponent to retaliate—and they might well kill rather than wound you. If the opponent is constantly forced to prevent unacceptable losses, you control the game. It’s hard to be aggressive in chess when the King keeps getting put into check! If you can seize the initiative, you’ll usually win.

7. The line between defeat and victory is a narrow one. If you forget detectors, that could cost you the game when cloaked units show up. One small oversight and you instantly lose the game, even if you were otherwise in a position to finish your opponent. In real life, battles both literal and figurative are often decided by the smallest mistakes. This is another great lesson that crushes the ego. It’s hard to be an arrogant victor when you’re keenly aware one small mistake would have reversed the outcome.

8. Decisiveness wins. Even the poorest strategy will sometimes succeed if someone commits to it completely and without hesitation. With indecisiveness, we divide and conquer ourselves. In real life, a weak faction like the North Vietnamese can defeat even an overwhelmingly strong faction that is indecisive, uncommitted, with no clear objectives. Without a clear mission to fulfill or a clear course of action to achieve it, there is no such thing as victory.

9. Starcraft teaches us to be less critical of those who have great responsibility. Even a mere game that shows how easy it is to screw up teaches perspective. Bad luck and small mistakes can easily bring disaster even to the competent. Even those who prove incompetent at the highest levels often stand far above the average guy on the street. You begin to realize that herdbeasts who mock and complain endlessly about their betters are just misbehaving children. They have never known leadership or great responsibility themselves yet deign to criticize as if they were equals.

Conclusion:
Starcraft 2 is certainly not a perfect microcosm of real life. For one thing, the playing field is far too orderly and predictable. We never have that much information when making real decisions. If two opponents played 100 different strategy games against each other for the very first time barely knowing the rules, that would be much more like real life. In fact, I think sloppy bronze league play may simulate real life best. But the controlled environment of starcraft allows us to test ideas more extensively. It invites us to reflect on our own lives and contemplate how the mindset we learn playing battle after battle applies to real conflicts we face.
Looking over the battlefield, what are the most effective actions we can take to defeat the obstacles before us? What objectives are vital and which are distractions?
Many now seem to view life as some kind of sentimental TV drama, but to me it is perhaps just another game, the Great Game.

terran, wall, 6 pool, cheese, stop, block

Terran wall blocks early game allins such as Zerg’s “6 pool”. The SCV stands by to repair any attempts to make a breach. Reacting quickly and keeping cool under pressure is critical to survival.

Inspirations of Nobuo’s Final Fantasy Music?

Many of you may have heard the opening theme to Final Fantasy X known as To Zanarkand.

Perhaps not so many have heard Humoresque No. 7 By Antonin Dvorak a Czech composer who lived in the 19th century.
You’ll know what I’m talking about about 1:20 into the song.

Dvorak is one of my favorite composers period. It shouldn’t surprise me to discover that Nobuo Uematsu got some ideas from him.

This is the original fight music from the very first final fantasy game.

Now compare to Tchaikovsky’s Slavonic March

Adventures in Computer Game Music: Heroes of Might and Magic V

Paul Anthony Romero is easily one of my favorite computer game composers.

He’s been composing scores for Heroes of Might and Magic games for over a decade now.

He has an uncanny ability to take musical styles from throughout the history of orchestral music and make them his own.
He’s done variations of a human, demon, or necromancer town at least half a dozen times now and still comes up with something new each time.

Here he uses an epic Wagnerian style to great effect with similar but contrasting themes.

I’ve always liked this sort of juxtaposition. Even when I was a little kid, I remember watching the Sound of Music and hearing how the evil Nazi theme was something of a minor key version of Good Night, Farewell.

First for the good guys:

Then for the bad guys:

Wasn’t Hegel A Nazi?

Troll Appoints Self “Official Trainer” on Black Ops Server, Rage Ensues

As a Yank, I enjoy hearing the different accents and slang from all over the UK in General Minus’ griefing videos.
“You nob’ead!”

Minus’ patronizing attitude is made worse by the fact he has a comparatively posh London area accent. He always gets the Geordie and Scouse players stirred up into a rage by seeming to look down on them as chavs.
In one of his videos he actually calls them all ‘peasants.’

Minus is a master manipulator, maneuvering his marks into qualifying themselves even when he is obviously the one in the wrong.
He gets them to surrender their moral high ground by getting them to curse at him furiously while he sticks to superficially polite language.
Time after time, he gets them to lose their cool and from that moment, he’s the one in control.

He may start out with mere team killing, but by tacitly threatening to kill teammates, he forces them to kill him, causing them to lose points. Worse, this leaves his teammates without a clear pretext to get him banned.

Perhaps the best for last: He bluffs that he’s about to leave the server but doesn’t. Everyone obviously wants him to leave, so he toys with them keeping them in a state of suspense until he’s finally satisfied.

Objectivism and Bioshock: The Art Deco Connection

Here’s the typical art deco cover for an Ayn Rand book.
It was first published in 1957 but I think this edition came much later. Perhaps someone in the publishing industry saw a common thread between the attitudes of elites in the 1920-30s and the objectivists. Or perhaps because that’s the era that produced Ms. Rand?

Now here’s an art deco style angel from real life. This one is a monument to humanity attaining a divine level of mastery over nature at the Hoover dam. It’s a relic of a world where people saw humanity headed ever upwards with man on the verge of becoming God. This unbridled optimism only seems all the more horrific to us in retrospect as Western civilization was running straight for the cliff’s edge even as everyone was celebrating.
Something seems to have broken in the Western spirit after two suicidal world wars and a great depression.
Ever since then, we’ve seen the growth of a Modern Art that tries to actively destroy beauty and meaning and the spread of existentialism and atheism.

In retrospect, art deco seems creepy, tragic, naive, fallen, and above all hubristic.

It’s now usually portrayed in a dark and/or sinister way in modern culture.

Batman’s Gotham city is a good example.

Better still is the aesthetic of the computer game, Bioshock in which a Randian superman founds an underwater dystopia in an effort to leave behind the slave morality of our society and achieve human perfection and godliness on Earth.
The main villain of the game looks rather like a piece of art deco statuary by the end of the game.
And his name is ‘Fontaine’ French for ‘fountain’ I believe. Certainly not a coincidence.

Picard Harasses A Ventrilo Channel

Frederik Pohl’s Gateway: The Parser Game

This is parser gaming at its best.

Inspired by some of the basic ideas in an(excellent) science fiction novel, it has a plot that includes virtual reality hacking, existential philosophy, and dangerous space exploration. Better yet, all the puzzles logically make sense if you think everything through.

The programmers thought of just about every command you could type in, especially the vulgar and violent ones. Finding these easter eggs is definitely part of the fun.

It can be downloaded for free here.

http://www.abandonia.com/en/games/540/Gateway+-+Frederik+Pohls.html

And it can be played using an emulator like DosBox

Sid Meier’s Alpha Centauri : Quotes From The Game

There are two kinds of scientific progress: the methodical experimentation and categorization which gradually extend the boundaries of knowledge, and the revolutionary leap of genius which redefines and transcends those boundaries. Acknowledging our debt to the former, we yearn, nonetheless, for the latter.

  • Academician Prokhor Zakharov, “Address to the Faculty”
Some would ask, how could a perfect God create a universe filled with so much that is evil. They have missed a greater conundrum: why would a perfect God create a universe at all?

  • Sister Miriam Godwinson, “But for the Grace of God”
Technological advance is an inherently iterative process. One does not simply take sand from the beach and produce a Dataprobe. We use crude tools to fashion better tools, and then our better tools to fashion more precise tools, and so on. Each minor refinement is a step in the process, and all of the steps must be taken.
  • Chairman Sheng-ji Yang, “Looking God in the Eye”
Resources exist to be consumed. And consumed they will be, if not by this generation then by some future. By what right does this forgotten future seek to deny us our birthright? None I say! Let us take what is ours, chew and eat our fill.
  • CEO Nwabudike Morgan “The Ethics of Greed”

http://en.wikiquote.org/wiki/Sid_Meier%27s_Alpha_Centauri

Warhammer Fantasy Battle Report: Orcs vs. Skaven

Gladiator: The Real Story

He(Commodus) renamed Rome Colonia Commodiana, the ‘Colony of Commodus’, and renamed the months of the year after titles held in his honour…

I always think of poor dear Commodus when I change the name of my capital city/planet in turn based strategy games.

Megalomania to the point of bathos and hilarity.  I love it.

“EVERYONE TO TEH CHURCH”

Minecraft griefers visit a server where all the players are compelled by the admins to periodically attend a church, make donations, and get baptized.  The griefers’ mission: send this heavenly server to hell.

%d bloggers like this: