Showing posts with label Computer Gaming. Show all posts
Showing posts with label Computer Gaming. Show all posts

Monday, December 24, 2018

NEW GAME: Lyra

Let me tell you about Martian Cake: Through his telescope, a Martian sees an Earthman approaching in a rocket, and wants to make him feel at home. So he bakes a cake. Unfortunately, all he knows about cake is what he's seen through his telescope, so he substitutes local ingredients. It looks beautiful, but the Earthman is immediately poisoned upon eating it.

That's the design conceit of the game of Lyra. What might Chess look like if it were "re-created" by someone who's had glance at the game, but never learned the rules and doesn't even quite remember what the pieces look like, or even what size the board is? He knows that the pieces move differently from one another, and one piece is more important, but that's about it. As a result, this game is played on a 6x6 board and the movement of every piece has changed (other than the General, which moves as a King).

As might be expected, this isn't as good as "Earth cake" (Chess). However, I'm tweaking the rules as gameplay, and may introduce variants. At the end of the rules pdf I've noted a few that I'm playtesting. So far I particularly like "Pyrrhic Victory".

UPDATE: In extensive play-testing, the game wound up being too cautious. To fix this, I've added an element of chance using dice. The conceit here is that the game is 'properly' played with actual armies in combat. While in Chess, the only difference in the strength of the pieces are in their movement, in Lyra, the pieces also differ in their attack strength. Each piece attacks and defends using dice.

WHY?

Lyra game in progress
"Design conceit" aside, I wrote the game purely because I had built a very beautiful 6x6 physical board and pieces, and just wanted something different to play on it. I made the pieces visually unique because playing it with Chess pieces is mildly confusing (though it can be done).

It's named Lyra merely because I like the name.


HOW TO PLAY

You can download the rules here: Lyra-rules.pdf

Each army consists of the following:

  • 1 General. The general moves like a Chess King (one square in any direction). It attacks with a d12 and defends with a d10.
  • Assassin. This moves one square diagonally or horizontally (not forward or back. It attacks with a d10 and defends with a d8. When the Assassin captures another piece, it takes on that piece's movement in addition to its own.
  • 2 Captains.  The Captain moves 1 or 2 squares orthogonally, or 1 square diagonally. It may jump friendly pieces (but not enemy pieces). The Captain attacks with a d8 and defends with a d6. A Captain cannot be promoted.
  • 2 Lieutenants. The Lieutenant moves 1 or 2 squares diagonally, or 1 square orthogonally. As with the Captain, it may jump friendly pieces (but not enemy pieces). The Lieutenant attacks with a d6 and defends with a d4.
  • 6 Soldiers. The Soldier moves 1 square forward or sideways, and captures the same way. It attacks and defends with a d4. Upon reaching the back rank, the Soldier is promoted to Lieutenant.

To deal with attack and defense, each player should have one each of the following dice: d4, d6, d8, d10, and d12. It's best if these are colored dark and light, similar to the playing pieces. Combat is as follows:

  1. The attacking player threatens an opposing piece.
  2. The players choose the appropriate dice as described above and roll simultaneously.
  3. If the attacker's roll is higher, the defending piece is removed. Otherwise, it's a 'push', no one wins, the pieces stay where they are, and the attacker's turn is over. (You may think that the attacker's piece should be removed if the defender's roll is higher, but playtesting shows that it's enough of a penalty that the attacker has effectively wasted a turn on the attack. I've seen the defender ignore several failed attacks in order to strengthen his position. It's a big advantage.)

STRATEGY

The game itself has some interesting features:
  • The Assassin piece takes on the movement of the last piece it captured in addition to its own. 
  • Soldiers do not move or capture like pawns. 
  • Officers (Lieutenants and Captains -- and Assassins who have captured either of them) can step over friendly pieces. 
  • The pieces are designed to have weak spots. Proper play should find and exploit them.
The most important thing to remember is that this is not Chess. Very little of what you know about Chess is going to help you here, beyond some very general rules of thumb such as maximizing your mobility and keeping pieces defended. In particular, there is no onus whatsoever for a player to announce check. There is no checkmate here. It's a fight to the death, and in combat the General is the strongest man on the board.

There are two basic strategies that can prove effective. The first is to take advantage of the leaping ability of your officers to get them onto the field quickly. This allows you to clear some room to allow Soldiers to promote to Lieutenants in the endgame. The second is to use your Soldier early, holding back higher ranking officers for the endgame. Even though a Soldier is relatively weak in battle, it does stand a good chance against a Lieutenant, and has a better-than-nothing chance against any other piece. In either strategy, you'll probably find your Lyran General much more active than a Chess King would be. Because of his advantage in combat, you may find it advantageous to get him into striking distance when threatened by an officer.

With a smaller board, the pieces engage much more quickly than in Chess, so there is no en-passant. Also, since officers can step over friendly pieces at any time, there is no castling, and nothing like a Knight. And since movement is generally limited to a maximum of two steps, you won't generally find a lot of back-field infiltration in this game. It's very much a field of battle with a definite front, and draws are common. When played without dice, since the pieces are more similar in strength than in Chess, a game tends to be either cautious dancing or a bloodbath. Without the dice it's a fairly boring game. With them, it's a nail-biter.

When playing with dice, you'll find aggressive play is rewarded. Your pieces are stronger when attacking. Although a General greatly outmatches a Soldier (d10 to d4), it's possible for the Soldier to prevail. An attacking Assassin is on equal footing with a General (d10 to d10). Nevertheless, it's possible to lose the game due to chance, even if your strategy is perfect. Stuff like that happens in war. For best results, you'll want to cherish your high-ranking officers to give yourself the best chance of delivering a finishing stroke.

EQUIPMENT:

As for equipment, you can play it just fine on a chessboard. Just set the knights aside and ignore the outer ranks and files of the board. But if you'd like to make a set like mine for yourself, I'm not going to pretend this was difficult. I cut a 12 x 12" inch sheet of plywood, glued some 2" tiles (from Home Depot) onto it, and then grouted it as you would a floor. I affixed it to a 12 x 12" picture frame in place of the glass and backing. The pieces are made from bits of craft wood that I got from Hobby Lobby: balls, eggs, doll pin stands, and screw-hole caps. The dice can be gotten from any gaming or hobby store or online.

Or, you could play against a computer using Zillions of Games. Here's the file containing the game: [Lyra.zip]. Keep in mind that you'll need a copy of Zillions of Games to run it. Registration is only about 25 bucks and for that you get, as the name implies, a potentially unlimited supply of boardgames, card games, and puzzles.

I just finished creating the ruleset for Zillions this morning (Christmas Eve!). It actually plays a decent game, and follows all the basic rules, including the wonky captures of the Assassin piece, and the fact that officers can jump over friendly pieces.

I'll add some variants later, but I wanted to get this out as a Christmas present to anyone who reads this.

A nice box completes the set!


--==//oOo\\==--

If you have Zillions of Games, you might try my other games for it:
  • Jedi Chess pits a powerful Sith Lord and his apprentice against the Jedi Order. The Apprentice moves like a Chess Queen; the Sith Lord combines the moves of the Chess Queen and the Knight.
Jedi Chess
  • A variant of Jedi Chess (found in the same file) called Rebel Chess pits the Emperor and his new apprentice, Darth Vader, against an army of familiar freedom fighters. Vader moves as a Queen. The Emperor's power is waning: here he combines the moves of the Chess King and Knight.
Rebel Chess variant
  • Qui-Vive challenges you to place five pieces in any of the following arrangements: V, +, X, /, \, ̶, or |. It's harder than it sounds, because the computer is doing the same thing, and it's very good at setting two different patterns at the same time. I would say Zillions plays this at expert level. Of course, you can choose to dumb it down.
Qui Vive


Wednesday, May 23, 2018

Frogger and Lessons in Self Destruction

Back in the 1980s, when I lived in England, I would sometimes supplement my income and develop my programming skills by writing software for the TI-99/4a Home Computer. One of the programs that I wrote was a blatant rip-off of the arcade classic, Frogger. Parker Brothers later released an official version of the game, but in some ways mine was much better.

Not my version, but mine looked pretty close.
the center on mine was a grassy strip.
On the TI, Frogger was a very easy game to program. The TI-99/4a's capabilities included 32 moveable sprites, all with automatic motion and collision detection. And in Frogger, most of the objects on the screen aren't really animated... they just move. So there's not a whole lot for the programmer to do other than move the frog. That meant that after coding the basic rules, I had a lot of free memory.

So I decided to use it.

In my version of the game, instead of simply becoming an "X" or a skull and crossbones or boring instant dead frog upon a collision with a car, the frog's death was gloriously animated.

  • He flattened out. 
  • His eyes bulged a little. 
  • Blood oozed from his body in an expanding puddle, accompanied by a sound effect: "glug, glug, glug".

I worked for the better part of two days just getting that sound effect right.

Having completed the game, I had the neighbor's kids play test it for me. And after a long spate of testing, their scores were abysmal. So I watched them play.

They weren't even trying to win the game. Instead, they were deliberately sending their kamikaze frogs into the thickest traffic just to watch the poor creatures die. And then they'd do it again, and again. They'd end with a score of zero, and laugh uproariously. Seriously, I could have left all of the game mechanics out of it and just animated dying frogs, and they'd have loved it.

This wasn't what I intended.

The experience taught me a bit about game design. I should have made the winning condition even more entertaining. So with the few bytes I had remaining, I gave it a very nice animation if you succeeded in saving all of your frogs. Few players ever got that far, because killing the frogs was so damned easy and fun... and to learn about the winning condition you'd have to get past the deaths: something most players just didn't do. The result of saving the frogs was entertaining, too; but it wasn't easy.

If I had really wanted people to play the game as I intended, I would have had to change both the reward and the punishment. But I was pretty damned proud of that frog's death, and kept it in. Besides, I'd already gotten all the experience I'd needed from writing the program. A few people still bought it (I only sold a few of anything back then, really), and I imagine they happily whiled away the time killing frogs and gaining nothing.

This taught me a bit about human nature...

Why do people do self-destructive things? Because that's what people do when they believe that destruction is more entertaining than winning. And if winning is hard -- even if it's rewarding -- they go for easy entertainment, even if it means death. I've seen it happen many times over the years, and each time I think about my version of Frogger.

Sunday, June 25, 2006

New Download: Jedi Chess

In keeping with my latest post about empowerment, here's a little bit of empowering fun. While driving home with my kids the other day, we thought it would be a good idea to write a Jedi Chess program. Since I don't like to duplicate effort, I first Googled the web to see what others had done. What I found was horribly disappointing.

I found that a little hard to believe... here it is, 30 years since filming began on Star Wars, and there's not a single "Jedi Chess" game out there? There's no "Sith Chess" either, and the only "Star Wars Chess" was a knock-off of battle chess that played under standard rules. Obviously this has to be rectified immediately! So, after 30 years of waiting in darkness, you can finally download and play Jedi Chess! (cue the appropriate fanfare, preferably written by Johnny Williams).

Since I have Zillions of Games I didn't have to do the bulk of the programming. Instead, I provided Zillions with the rules and it grokked what I wanted and plays a really good game. Actually, I've recommended Zillions of Games before, but I can't say enough good things about it. Here are the rules:
  1. The game pits a standard chess army (the Jedi) against one Sith Lord and his Apprentice (the Sith). Of course the Sith take their places at the Dark Side of the board.
  2. You can play as either the Jedi or the Sith.
  3. The Sith Apprentice moves the same as a chess queen.
  4. The Sith Lord has the moves of a chess queen PLUS a chess knight. (This is commonly called an "Amazon" among chess variants). Needless to say, he is powerful in the ways of the Force.
  5. The Jedi win when both Sith are destroyed.
  6. The Sith win when the Jedi Grand Master (a King) is checkmated.
For fun, and as an homage to the game's inspiration, the game uses images of the characters from Star Wars: Episode II. Of course there is the Sith Master (Darth Sidious) and his Apprentice (Count Dooku). The Jedi are as follows: Yoda as the Grand Master (King); Mace Windu as the Master (Queen); Obi-Wan Kenobi as the Adept (Bishop); Ki-Adi-Mundi as the Knight (Knight); Annikin Skywalker as the Padawan (Rook); and Clone Troopers as pawns.

The game includes an "Episode IV" variant that pits Rebels against a less powerful Sith Master who combines the moves of a chess King with a Knight. The Sith Master is Emperor Palpatine and his Apprentice is Darth Vader. The Rebels are Luke Skywalker (King); Princess Leia Organa (Queen); Han Solo (Bishop); Obi-Wan Kenobi (Knight); and Chewbacca (Rook). Rounding out the Rebel side are Droids as pawns.

Overall, the game is similar to Maharajah and the Sepoys, except that there the death of the Maharajah is a foregone conclusion, assuming that the Sepoys play carefully. The addition of an Apprentice (Queen) in Jedi Chess makes the Dark Side formidible indeed.

(Shhh...Kaaah...Shhh...Kaaah...) Now, my description is complete.


Well, the description is, but this post isn't. This is one of the examples of what you can do when you aren't constricted by your software choices. You have a need, can't find an existing solution, and with a little empowerment you have a solution in an hour or so.

Jedi Chess is free to download and use. Obviously, all images are the property of LucasFilm, but I'm calling dibs on the game rules. They're mine, and I'm granting you a non-exclusive free license for non-commercial use.

Download Jedi Chess here. It requires a licensed copy of Zillions of Games, but don't bust a gut... Zillions only costs about $25, and you get... well... zillions of games (and you can also play my implementation of Qui-Vive). It's a bargain.

Saturday, September 10, 2005

Zillions of Games



I've "discovered" a nifty new program: "Zillions of Games". I'd say it's a collection of games, but it's not limited to that... it's a general engine for running almost any conceivable abstract board game. The program includes an AI (artificial intelligence) capable of running and actually playing any game you can specify in the language.

Qui Vive"Language?" Sure! The commercial version of Zillions has doesn't just come with dozens of games... it doesn't stop at providing you access to over a thousand more free games on the Zillions-of-Games website, either... it allows you to specify your own games as well. For about $25 you get a complete game authoring system; just add your favorite paint program. This has got to be one of the stand-out best values in commercial software.



To test it out, I implemented Eugene de Wolf's game, "Qui Vive" (not related to the commercial board game of similar name). Two hours after having gotten my registration key I had playable copy of the game. That's not an exaggeration, either. I've implemented this thing at least a half dozen times in various languages, and it's never been this easy. You simply define the board & pieces, define the moves, and define the winning conditions: the Zillions AI takes care of everything else, and it doesn't play half bad, either. If you live in the Windows world, I suggest you try it out (and it works fine under WINE in Linux).

Zillions can be downloaded as a demo that allows you to play a number of games. Purchasing a key on-line unlocks all of the game features. Oh, and if you want to try out Qui Vive, you can get it by clicking on the graphic or click here. It requires a purchased copy of Zillions to run, but you can check out the source code (it's in the 'qui vive.zrf' file).