Board games

Published May 17, 2007
Advertisement
So, I think I've settled on the project that I want to undertake next year. It's a system for the rapid development of board games.

The first part of the project will be to design a domain-specific language for describing board games. I want this language to be a subset of English; when a board game is described it should read like the rules leaflet you find inside a game box. Internally, it's a descriptive language that is used to identify game states and the legal transitions between them. It's also fundamentally object-oriented; playing pieces are the objects, and each supports properties and methods. A six-sided dice would have a 'roll' method and a 'value' property; this maps directly into rules like "Roll the dice and move the piece forward by a number of squares equal to the value of the dice." Common game objects - like dice, counters, and boards - would be available in libraries.

The second part of the project will be to develop a compiler/interpreter/simulator for these games. They take the game description as input and build a working model of it. The model can then be used to explore available gamestates, either automatically (i.e. generating a graph of all possible game states and the transitions between them) or interactively (i.e. 'playing' the game).

The third part of the project will be a GUI for the interactive mode - i.e. a proper client for playing the game. Wiring game objects up to graphics might be tricky, but it's probably doable. I'd also like to add network support to this mode so that you can play the game against others over the network.

The final part of the project - something I probably won't get onto - will be to start getting into things like static analysis. Using the machine-literate game description the computer can start doing things like identifying dominant or recessive strategies, finding points of articulation, finding loopholes or conflicting/ambiguous rules, and looking at balance issues.

And finally, there's the grand prize, which is to write an AI that can use these static analysis results to play any board game described to it in the system.

For testing I'd want to be able to play the following games using the system:

  • Tic-tac-toe
  • Snakes and Ladders
  • Chess
  • Go
  • Mancala
  • Risk


What do you guys think?
Previous Entry More feed!
0 likes 9 comments

Comments

_the_phantom_
hmmm, it's indeed a good idea sir; I likely alot [smile]
May 17, 2007 01:27 PM
sirob
Sounds like a great idea.

Did you deliberately leave the option of using cards out? Having cards would allow you to do anything from FreeCell or Solitaire to a full blown Monopoly :).

At any rate, it sounds cool.
May 17, 2007 01:35 PM
jollyjeffers
Final Year Project, right? I like the natural language rules definitions - very cool!

Sounds like a good'un to me - just be careful not to get too ambitious [smile] Everyone does it and ends up with some super mega crunch period for a month up to the deadline where you realise you have to write 20,000 words about a project you haven't even finished [lol]

If I re-did mine now (well I suppose writing my section of a book probably was) I'd cut out a load of bits just so that I could go for 'quality over quantity' instead...


Jack
May 17, 2007 01:38 PM
johnhattan
What I think is that you're reinventing Zillions of Games. Not that that's a bad idea --it's a product that's ripe for reinventing. The existing Zillions of Games is a terrific product that's hampered by a lack of updates and a GUI and graphics that are a holdover from Windows 3.1.

My opinion - Reinvent it as a web-based product. Write the engine and the game-builder in ActionScript 3 and allow people to hook into it from a completely web-based interface. Then build a community around it. The Zillions folks have a community, but it's based around trading ZRF files that people upload, and that's just so 2001. People should be able to design, implement, update, share, and challenge their friends to games without leaving their browser.


Oh, and this is as ugly as mud. Just FYI.
May 17, 2007 03:21 PM
Ravuya
I could swear I've seen something similar to this beforehand, but certainly not this elaborate.

Domain-specific scripting, though -- that's a big win. You could get yourself into a Byond level of game sharing then.
May 17, 2007 04:33 PM
Daerax
I would be interested in following this project. Especially what tools and paradigims you use. The AI - natural language parcing and state searching stuff sound cool too.
May 17, 2007 08:49 PM
superpig
sirob: Cards could be supported somehow. They have a suit and a value, and would need to have faceup/facedown supported, I guess.

jollyjeffers: Well, third year - final of the BSc, but perhaps not final for me as I may go on to do a Master's. And I hear you on the crunch.. though I'm advised that the hardest part is actually fitting it into the 10,000 word limit [smile]

JohnHattan: Rats! Hmm. Well, I could adopt ZRF as my input language instead of creating a new one, though looking at it it looks like some variant of Lisp that is not particularly friendly to non-programmers. It also looks like it adopts a more imperative approach, while I intend mine to be more declarative/descriptive. Theirs is explicitly for playing games, while I want mine to also be a good format for analysis of games.

As for how it publishes... yeah, a web frontend to it would be very nice, maybe I should do that instead of a native GUI. The actual simulation engine itself would probably be written in C or something, just as a straight library to be linked to, so one could easily build a server-side process that communicated game state and moves to a Flash-based in-browser client.

And yeah, the RSS feed looks slightly better than it used to (with all the html escaped) but to make it truly valid RSS I should be stripping all HTML from it.

May 18, 2007 10:09 AM
Endar
This sounds like a really good idea. Let me (as in us, GameDev) know when you get to the testing stage so we can help by writing some simple (or complex) games. I'd be really interested in attempting to develop a board game like this.

Definately sounds like a win.
May 20, 2007 07:46 AM
The Reindeer Effect
I've thought about this too. You should take a look at Stanford's GGP language (http://games.stanford.edu/). Of course, this isn't what you want users to program the game in, but it is actually a fairly powerful way to express finite games like the ones you mentioned. It basically follows the state machine approach. The language itself follows the logic programming paradigm; I happen to disagree with the approach taken as it is verbose and doesn't scale well -- on a state transition you basically have to construct an entirely new set of propositions, even if you don't make significant changes to the old ones. They do this because hypothetically it maintains monotonicity, although they aren't fooling anybody.

At one point in time I completely rewrote portions of the language to be useful for actual game development, but I never actually went anywhere with it. But using horn clauses and inference for board games like you mentioned can really save time as opposed to implementing every single rule by hand in a different language.
May 28, 2007 11:36 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement