Category Archives: Programming

The Spielmatrix Game Engine

I’ve begun work on a new game engine, inspired by Perlenspiel, but with an additional focus on modern development methodologies and the latest in Javascript. It uses the Pixi.js rendering engine, Keydrown for key handling, and likely many additional libraries as I add functionality.

You can follow the development on Github. Check out the ‘development’ branch if you want to see what I’m playing around with.

It’s not ready for general use yet, since it’s missing some major features like Audio and a solidified API. There is, however, a README that you can look at if you want to start using Spielmatrix right away.

It’s far enough along to have a Lights Out example (source code) and a fun animation (source code).

Perlenspiel: Mow Problems

Here’s my latest hit Perlenspiel game, Mow Problems. In this game, you play a lawnmower that shoots clippings out of the right side of your mechanisms when you mow over a patch of grass. You have to mow all of the green squares, but don’t let too many clippings land on one square, or else it will become impassable.

Your task is made more easier or more difficult by the things that people like to put in their lawns. Trees block your path, but you can put as many clippings on them as you’d like. Pools aren’t allowed to have clippings in them at all. Can you mow all 10 lawns without going crazy?

The below area is an iframe, so you can play the game right here! Click on the L1-L10 buttons to play the levels.

Some action shots:

 

ExSphere for Windows Phone

Here’s an early build: Link to download .xap file

Controls: Tap and hold to guide the ball to a particular horizontal position. The ball travels vertically on its own – you can’t control that axis of motion.

Goal: Break all of the bricks on the level, other than walls, skulls, and “key” blocks. You need to have the specific “key”  block activated in order to destroy most block types.

White blocks: You start out each level with the ability to break these, but there’s no key block for them, so you have to get them all first before attempting any other block types.

Ice blocks: You can always destroy these, regardless of which key block you’ve hit.

Red Bricks, Stone Blocks, Grey Bricks, Wood Boxes: These are the “Normal” types of blocks with key blocks available whenever they are present on a level.

Gold bricks: These have a key block, but with a restriction that you can’t switch back to another key block after hitting one. Because of this, you should attempt these bricks last, after clearing every other brick type (with the exception of ice blocks).

Skull blocks: You lose a life and restart at the spawn point. Your key block is reset to white.

Here are some brief instructions from the old PC version, in case the above is confusing: http://diehrstraits.com/md/exsphere/img/screen06.jpg

Since the Windows Phone version is still fresh, there isn’t a HUD to show your current key block, so you have to remember it. Thankfully, the levels are pretty small!

Let me know in the comments what you think.

Perlenspiel: Checkers

I spent part of today recreating the game of Checkers in Perlenspiel. The biggest challenge was to implement the forced moves and multi-jumps. The source code is 396 lines of code, although I’ve removed the unused Perlenspiel functions by moving them into a wrapper .js file. If you want to use this source code in the downloadable Perlenspiel, you’ll have to add those empty functions back in. Don’t mind the garish colors I chose!

Play here: http://diehrstraits.com/games/Checkers/

Source: http://diehrstraits.com/games/Checkers/game.js

Checkers game in progress.
Checkers

 

 

 

Doubloons!

Doubloons

Doubloons! Main PageDownload

Doubloons! is a game where you are a pirate captain, commanding your ship and crew to take over and plunder enemy ships. At your disposal are cannons, bilge pumps, rowboats, grappling hooks, gangplanks, and a load of angry pirates.

Your goal is to attack your opponent’s ship, steal their gold, sink it, and sail off into the sunset (in that order). You control the pirates through orders you give them, and then the pirates will complete the task to the best of their abilities. Combat effectiveness may change during battle due to grapeshot, inability to swim, and injury from swords.

The controls are listed above each ship on the play screen, start with Vs. Mode so that your opponent doesn’t do anything. You control the pirates by giving them orders.

For example you hit the “man the cannons” button and the game will pick an idle/defending pirate and make him load the cannons. Later, you can hit the “decrement cannon loaders” button and the game will remove one of your cannoneers.

The game ends when a player has no pirates left and one of the ships has sunk (Not necessarily that player’s ship!), or when one of the ships escapes from the other by sailing off the edge of the screen, or when you press ESC. After this, each player is scored by gold possessed, pirates killed, damage dealt, and whether their ship survives or not.