Lines of Fire: Thinking about modular board game design

Long time no blag. Last time I wrote about a board game I’m working on. I actually let the project lay dormant for a few months, because I wasn’t completely happy with the design and was hoping to come up with new ideas after a pause. Which I did, but I’ll talk about those on some later date.

The idea for Lines of Fire started with Bomberman and the first prototype wasn’t much more than the multiplayer Bomberman formula turned into a turn based, physical game. Later I started adding a completely different theme, which might actually end up working quite well. I also experimented with other additions that had nothing to do with Bomberman. And I think I’m going to continue on that route, because maybe Bomberman isn’t such a well-designed game after all, or at least doesn’t directly translate into a well-designed turn-based game (or at the very least, my translation was poor). I think this might let down the players who already played it and liked its similarity to Bomberman, but if I manage to turn it into a better game than it was, then that’s fine. The core of the game will still retain some (or even a lot of) resemblance to the first prototype, though.

At the moment I have several new ideas that I think are really cool, and I wrote them down as a preliminary additional rules document. I stress “additional”, because I want to keep the game modular. It’s mostly because I have done so much experiments with variants that I’ve later reverted that I just don’t have a vision for a single set of rules that would be the one true embodiment of the game idea. Maybe the lack of such vision means that I shouldn’t be designing this game in the first place, or should just do my best with one variant, but at the moment I’m hoping I can in fact come up with some set of modules that players can combine to play the game the way they want to play it. This idea crystallized for me today, after listening to a recent 3MA episode about modding, modularity and house rules in board games.

Modularity and moddability make me think about software. I think we understand software modules pretty well, and why not try to actually create the game rule/component modules as software modules. Modelling a game as software should give it another desirable property: as long as I’m modelling the game systems well enough as type-safe code, I should be able to find problems in the rules that I won’t find if they are just paragraphs of text in a document. I should also be able to find corner cases, and verify properties about the software (although I’m not going quite as far as to use something like Coq for this, I’m probably sticking with Scala) which implicitly verifies the game rules as long as they are directly based on that software. It should also help me test changes to the rules by myself without having to do a lot of work and setup with physical game pieces.

As a result of such thinking, I have in mind a small project to start turning the current game rules into a set of software modules. I should have a tool that lets me play the game digitally, with just a crude visual representation and ability to control multiple players in turns. The game components and rules should be modular, so that for each play I can turn some modules on and off, or modify their parameters. When I have implemented the game in its current state, I can find problems with the rules and hopefully simplify them by refactoring or modifying the program.

What I want to achieve in the end is that the modules being represented in software actually enable me to find the best places for the module boundaries, and a way to get to a really small core module that can be learned and played quickly, with other modules that can be layered on top of that to make the game more interesting. I’m also hoping that I will then find a good way to lay out the modular rules in a linear rulebook so that the modules are easy to combine and the book itself easy to use for reference.

Mayhaps I will document this process somewhat on this blog, or on BGDF.

Lines of Fire — Evolution of a Prototype

During my vacation this summer, I somehow ended up designing a board game. The idea came to me strangely — I had seen a board game in a dream, but all I could remember when waking up was an image of what the board looked like. I thought it looked a bit like Bomberman, and that’s when I had the idea — why not take the gameplay from Bomberman and put it into a board game.

Creating the first prototype took only a few hours, and I thought I had a somewhat fun game. I called it Bombarena.

A lot of testing followed, first by myself and then with others. I’ve put tens of hours into it since then and made tens of smaller and larger improvements. Version 0.2 got only a couple of play tests, but I took some suggestions from the players and it was soon replaced with version 0.3, which added cards to spice up the game.

Version 0.4 is in progress and for now I’m mostly focused on simplifying, clarifying, balancing and polishing. I gave the game a new name “Lines of Fire”, rewrote the rules (PDF), which should be pretty solid for the main game variant now. I imagine that the basic rules will not change too much any more — what remains is mostly balancing; further play testing will tell if I’m right. I also created new tokens and improved the look of the board (making set-up related elements stand out less).

The next version will probably focus on balancing the ability cards and I hope to make it available for wider play testing soon, in a Print & Play form. I’m finding that open source/free software (such as Inkscape, Scribus, Foxit Reader) has all kinds of issues with printing, though, so making good printable documents available is a bit of a challenge.

Klang: Classes and Math Notation

Just got started with adding classes to Klang. At the moment, only immutable classes can be created and there is no inheritance.

The fields and methods are more separated than usual — the data is defined in the beginning of the class body as a single tuple type. On the other hand, there is a uniform access principle and both field accesses and method calls are represented the same way internally and in syntax. Actually the field access is implemented similarly to an intrinsic method call. Intrinsics in Klang usually translate to a single LLVM instruction and I’m going to expose some of them to users as well.

Here’s a sample program with a class:

class Vector2 {
  data (x: Double, y: Double)

  // other methods skipped

  def +(v: Vector2) = Vector2(x + v.x, y + v.y)
  def length() = √(x² + y²)

  alias |…| = length
}

def computeVectorLength(): Double = {
  val v1 := Vector2(1, 1)
  val v2 := Vector2(2, 3)
  | v1 + v2 |
}

def main() = computeVectorLength().toInt

Vector2 is a class whose data is represented as (x: Double, y: Double). Reusing tuples again :) The compiler also generates a no-op function named Vector2 that takes the same tuple type and returns an instance of the class. It’s a no-op because the instances of classes are still held in LLVM registers (LLVM has an infinite number of registers) simply as the data they represent.

Mathematical syntax

There is also some nice syntax resembling mathematical notation in the example. I want to allow as much mathematical syntax as can be represented in plain Unicode text, but also provide aliases for those who prefer plain English words. I took some ideas from Fortress, but I don’t want to go into that double-syntax stuff where the written syntax is weird, but can be rendered into readable mathematical notation.

I defined some specific characters as left/right braces that when surrounding an expression get turned into a specially named method call on that expression:
| v1 + v2 | is turned into (v1 + v2).|…| (the ellipsis is a single character, not three dots).

Unfortunately, I think using | as a left/right brace makes it hard to use | in the or meaning or allowing it as a regular identifier. Maybe it’s possible, but I’m not yet good enough with grammars to know for sure. Anyway, I think actual words and and or might be better than & and |. Certainly ^ as xor doesn’t make much sense. Of course, since I want to enable mathematical syntax, , and are aliases for and, or and xor as well.

The above code example doesn’t actually parse yet — until I improve the parser and the lexer, there is some additional spacing and parentheses needed. For example √((x ²) + y ²) would compile.

If you know any programming languages which are good at mathematical notation in plain text, let me know in the comments.

URL Alphabet

When FireFox 3.0 (or was it 2.0 even?) added the new location bar, I was initially not so happy with it. But I got used to it pretty quickly and now it saves me a lot of typing when I want to visit my favourite sites. Typing one letter is usually enough. I thought I’d write down the whole English alphabet and what the location bar shows first for each letter. I think this sums up my current interests pretty nicely. Except some sites in this list are not really my favourite, they just happen to start with an uncommon letter.

Update: Oh man, I’m so behind the times. Seems that this was a meme in 2006.

A is for http://adventuregamers.com/

B is for http://www.box2d.org/forum/

C is for http://city24.ee/ (real estate portal)

D is for http://dzone.com/

E is for http://eurogamer.net/

F is for http://frictionalgames.com/forum/ (still checking every now and then to see if someone solved the mystery)

G is for http://google.com/ (surprise!)

H is for http://hansa.ee/ (although they are now SwedBank, I still use the old URL out of habit)

I is for http://www.idlethumbs.net/ (in it’s current incarnation an awesome video game podcast by Chris Remo, Jake Rodkin, Nick Breckon and occasionally Steve Gaynor)

J is for http://jazz.net/

K is for http://kv.ee/ (real estate portal)

L is for http://localhost:8080/ :)

L is also for http://listofdomainnamespointingtoidlethumbsdotnet.info/

M is for http://mail.google.com/

N is for http://news.google.com/

O is for http://www.offworld.com/

P is for http://planeteclipse.org/ (and some other planets follow)

Q is for http://www.infoq.com/

R is for http://rockpapershotgun.com/ (the best of PC-focused games journalism)

S is for http://scala-lang.org/

T is for http://twitter.com/

U is for … wow. Nothing interesting for U

V is for http://villane.wordpress.com/wp-admin/

W is for http://wired.com/

X is for http://xkcd.com/

Y is for http://youtube.com/ (another big surprise!)

Z is for http://www.escapistmagazine.com/videos/view/zero-punctuation (awesome video game reviews by Ben “Yahtzee” Croshaw)

What’s your URL alphabet?

Is Blogger easily hackable?

I hadn’t checked my old blog at Blogger for a few weeks and when I tried to log in to Blogger yesterday I found I couldn’t access it. They now consider my blog a spam blog and it will have to be reviewed by a human before they can restore my access to it. WTF, I thought, and proceeded to check the site (I won’t link to it, you can guess if you really want to or maybe you remember for some reason). Indeed, it was filled with porn advertising and my content was gone. I’m not sure what will happen next, but for the moment I’m locked out of my blog while it’s displaying porn spam. All I can do is remove links to it from wherever possible.

I’m not sure what the moral of the story is, but it surely raises a question for me: is Blogger easily hackable? If whoever hacked it would have guessed/sniffed my password somehow, they would also have access to my Gmail account, which would be quite a bit more worrying, but that doesn’t seem to be the case. Of course, I changed my Google account’s password after this.

I do remember one time when logging into Blogger with my account, I actually gained access to someone else’s blog, who was probably coming from the same IP address as I. Might they be doing any security checks based on IP? At that time I did nothing about it, but in hindsight I probably should have notified Blogger about that incident.

In any case, I’m moving my blog to villane.wordpress.com for the moment, also considering moving it to my own server later.