In short, Toybox is my proposal for a boardgame emulator. A simple, multiplatform, multiuser program with a highly intuitive and customizable interface, designed to reduce the excercises of designing and playing tabletop games over a computer to one as simple and flexible, if not moreso, than working with the actual physical materials.
Given the nature of it, the result of this project, along with the source code and any extras will be made available on this page as things progress.
Personally speaking, there are two main reasons I wish to bring this project about. First, as an aid in game design. When I was working on my first professionally published game, The Massive Vs. The Masses, I was lucky enough to have a friend enthusiastic enough about the whole thing to code a java version of the game, and keep it up to date with the current version of the rules as I constantly revised them. This was IMMENSELY helpful to me on a number of levels. Most notably, the game involves two decks of cards, whose effects needed constant tweaking for proper game balance. Were I primarily using physical cards to do my testing, I'd first have to go buy a stack of posterboard, cut it down to a usable size, hand write the card text (which is quite long in some cases) in ink to keep it legible, and constantly throw out and replace cards as revisions are made (something I was eventually forced to do anyway to bring the game to cons, but that was after the balancing was done). Being able to simply rewrite a line of text (or replace an image file) is far less work, and wastes no art supplies. More importantly, when a computer shuffles a deck of cards, it does so instantaneously, and does a far, far better job of randomizing them than I ever could. Having a program to shuffle cards alone easily shaved a minute or two off the time it took me to run through each game while testing (which adds up to a couple of hours in this example). Being able to instantly revert the board to its initial setup was also a nice timesaver. At present, I'm also developing a tabletop war game, whose level of complexity is currently surpassing my ability to test it by virtue of the numbers and levels of complexity of the units. Being able to drop as many custom images as I want onto a gif of a map and move them around would be far easier.
There were, however, two distinct flaws in my testing system for MvM. First off, while rapid repeated testing was made easier, the effects of every card had to be properly programmed in, causing a fair number of headaches and wasted time (although it WAS an excellent way to make sure all possible rules interactions were accounted for). Second, this system only works with ready access to a programmer with copious amounts of free time, a near-mythical creature.
Hence, the concept Toybox. We keep all the timesaving benefits of having the program shuffle our cards, the ability to quickly swap out art and text at will, and the effectively infinite tablespace and supply of minis (with 0 chance of a bumped table ruining things), but we don't waste time teaching a computer program any of the rules to the games we're playing. As long as we can move pieces, draw cards, and roll dice, we can follow the rules without help. The only thing this setup doesn't allow for is making it impossible for people to cheat, but honestly, that's not a concern with what this program is designed for.
The secondary goal of the Toybox project is to make it easy to play absolutely any tabletop game with friends via the internet. There are plenty of options available to you if you want to play a quick game of D&D over an internet chat program, between IRC die rolling scripts, websites dedicated specifically to hosting character sheets, and so forth (and as an interesting update, it seems WotC actually has a D&D specific concept not unlike the Toybox project in the works to boot), but what if I want to play Deadlands with my friends in England? I need a shared deck of cards for everyone to draw from for initiative, I need a big sack full of poker chips for them to pull from, I'm constantly going to be re-uploading maps and asking them to refresh a web browser... we'd either all get taken out of it by the various stopgaps, or I'd have to freaking write a whole program just for playing the game. There's even bigger headaches with anything that relies more on physical elements. Just try and play a game of Citadel online, or Kill Dr. Lucky, or Munchkin... There's a few programs out there like BrettspielWelt and Gamut which specifically cover a few games, but again, we're now just porting these games to the PC. With the sort of thing we're describing here, I could just spread some cards and boards on my scanner, import the resulting images, set a couple options up real quick, and tada. All set to play in 10 minutes tops, no programming experience necessary.
Ideally, the following should be an accurate rundown of what it's like using the final Toybox program.
I start up the application, for the first time, and get taken straight to the preferences, where I can set a default name for myself, fine tune the standard internet connection options if need be. That being taken care of, it's time for me to either connect to someone else's table, or start one of my own (via the file menu, or an onscreen popup visible only when I don't have any tables open). Offhand I can't think of any reason not to allow multiple tables open at once, but for now, let's just concentrate on the hosting end of things.
I am now looking at the standard table view. At the top we have a nice little title bar showing something like "Googleshng's Table (Hosting: [insert my IP address here])" which is roughly what others connecting would see upon selecting to connect to it and entering my IP (or whatever the current standard for peer to peer networking is, I haven't messed with multiplayer games without central corporate hosting in forever). As the host, I should also have a toggle up here to leave the board public (anyone can connect) invitation (when someone tries to connect, I get a popup with their name and IP asking if I want to allow it) or private (nobody who isn't already connected can connect). Alternatively, this can go down with the connected user list. Below the title bar, we have most of our screen occupied by the public portion of the table (ideally with some controls around the edges to zoom in, zoom out, and pan around it). This is the big open space we're going to be putting all our boards and cards and dice and so forth in so everyone can see them. For simplicity's sake, we'll just refer to this as the table from here out. To the right of the public portion, we have the significantly smaller private portion, which we'll call my hand. Anything I drag from the table to my hand disappears from the view of anyone else connected, and everyone connected has their own hand. The main purpose of this should be obvious from the name. I can, for instance, drag some cards over here, flip them over, look at them all, drag one back into the table. Kinda like how nearly every card game tends to be played. When someone disconnects, if their hand has any contents, we make a new special item that gets dropped on the table that looks like a tiny shipping crate named Whoever's Hand. Select it on it and we get the option to delete it, dump it (putting all its contents roughly where it's located on the table/our hand, probably making a mess) or open it as a new floating window so we can empty it out in a less sloppy fashion. While we're at it, might as well let people drag and drop things into the icon for it, and treat it as a container, which we can also just make as a standard item, but again, we're getting ahead of ourselves.
Below the table and hand, we have the chat interface. Ideally, just build a slightly moddified IRC client into the program, and stick the results here, near the bottom of the screen. The only extra thing needed here is a way for me (as the host) to toggle people between player (letting them move stuff around and have a hand and all that) and observer (they can chat and see the table, but that's it). By default, everyone first connects as an observer, but in the preferences, this can be changed (or even set to a different default depending on whether the table is public/invitation/private). I can, of course, also kick and ban people from here. If we want to get really fancy, we can throw some voice chat in here too, but I can live with needing a second program open for that.
Finally, in whatever space is left under the chat interface, we have the default list of Drawers open. A drawer is a seperate floating window containing a nice little grid of thumbnailed images we can mouseover to see the names of, and drag out onto the table. You can make a new drawer from the file menu (or with a hotkey) and drag things into it, and save it and all that good stuff. The pre-existing default drawers are just all the items on your computer, sorted into different drawers by item type (dice, cards, boards, pawns, minis). The actual resources for these are stored in a similar directory tree somewhere, for ease of finding and deleting things cluttering up your hard drive.
It's pretty likely that I'm going to be making most of the items I'm going to be using myself, but there are a number of things which came standard when I installed the program that may be handy. We have boards for chess/checkers, go, parcheesi, and a few varieties of grids (square, triangle and hex, in a few different scales). We also have both a standard deck of playing cards as well as a tarot and hanafuda deck (technically, the items found in this Drawer are containers, each of which contains all the cards found in that set, and a deck, one of the weirder items, but we'll get to that). We then have a drawer of dice, with the standard variety of sizes and in several different colors, various shapes of generic little chits/markers in the same variety of colors, a drawer of pawns (featuring the standard ball-on-a-peg image of many game pieces, in the same colors we've been mentioning) as well as a full compliment of standard iconic chess pieces (in both white and black). Next we have the Counter drawer. This (again, in our standard color selection) features a number of items which feature a text field in the center displaying a number, and small + and - buttons sticking off the sides (see the visual aid below for a better idea). Clicking the buttons to either side adds or subtracts a number in the text field (which alternatively can be selected and new values can be inputted manually, with any attempt at entering non-numeric values doing nothing). Also found in this drawer is a simple calculator, and a special totaller we'll get into later. Finally, we have the Pen drawer (ideally at any rate), which let's us directly type and draw on the table (in, you guessed it, our standard color selection) and erase such graffiti.
Aside from their contents, each drawer has a title and close box at the top of it, a scrollbar if it's too small to display all its contents, and a text field at the bottom which, again, only accepts numbers (defaulted to 1). If we enter a higher value before we drag an item from a drawer onto the table (or hand, or some container) we actually end up with that many copies of the item stacked on top of each other. This is to allow such things as setting aside a particular number of pieces before starting a game of Go, or just getting our hands on some large piles of things we'll be needing for a game so we can eliminate the clutter of all these open drawers. New drawers can of course be created or opened view the menu bar (presumably backed up by a hotkey).
Of course, at the moment, I don't feel like playing one of the classic simple games allowed by these pre-existing components. So I'll have to make some items of my own. Again, there is a hotkey/menu bar option allowing this. It opens a new window with a few fields to fill in: Item name, a dropdown to select the item type, a file path to the image to be used for the icon, and a button to open a standard file opening dialog to hunt around with as an alternative, a preview of the selected image, controls to add, remove, and switch between alternate images (a card for instance would use image 1 for the card back, and image 2 for the face, while a die would use use a number of images to represent each possible result, etc.), and a rather odd field in which a number can be entered called Scatter. The idea behind this is that any time you drop the item somewhere, if the Scatter number of it is above 0, the item will move itself a bit off center (I'm thinking, move it about 10 pixels in a random direction- up down left right, one of the 4 main diagonal options or not at all a number of seperate times equal to the Scatter value). The idea behind this is that it gives us the option to simulate impercision if we're playing the sort of game that features rules for dropping something onto the field of play and doing something to anything it lands on. Then of course we have buttons to save or cancel our new item. Saving it creates a new item resource in the appropriate directory, adds it to the proper drawer, and places a copy of it in the center of the table.
Any time I create a new item, or place an item onto the table which a connected user does not have in their local directory tree, they see a little animated "Downloading New Item" icon where it should be while it automatically uploads to them from my computer. Isn't this a massive security hole? You bet, but if someone is going to try and use this to distribute worms or somesuch, why would you connect to their table? An extra option in the preferences to always ask before downloading may be warranted, but it would slow things down too much to make such a security check manditory.
Most of our item types are really just here for the sake of organization and convenience. For the most part, every item is simply an on-screen icon which can be selected and dragged about the screen, individually or by dragging a selection box around multiple items. We may as well also feature the ability to shift-click items to add or remove them from the list of what's currently selected. A count (perhaps in the title bar) of how many items are selected at a given time should always be on screen. In addition to moving them about, selected items can be acted upon with the following basic commands (either by hotkey or menu selection... possibly also by some sort of "right click" menu):
A few item types have some odd behavioral quirks and special options available to them in addition to the basics:
Finally, this program requires the ability to save table states (including the exact position and shown-image of all items, and all hands), for various obvious reasons. Simple sound effects for most actions would be nice too.
It is now September 2009, and my cousin has embraced this project and begun some serious work on it. The most significant difference between his implementation and my original concept is that it is a completely web-based program, which restricts the interface concepts I had in mind somewhat, but makes it that much more accessable, and lets you make use of it from anywhere you can access a halfway decent web browser. In light of this, and some experience with some of the other programs along these lines out there, I have some new thoughts, mainly regarding the addition of new objects to the game.
First and foremost, secure log in code is pretty much required at this point. When you have something totally web based like this, you have spammers and trolls to deal with, and a generally high priority to constantly be saving various little things you do. Password lockable private rooms for serious testing or just, you know, not being interrupted when playing a game by random people is also a plus.
Next, my original vision here was for a full screen program, never really leaving the table view, with anything not related to playing the game tucked away inside a drop down or floating menu, or cluttering the edges of the screen. As the project now stands, it seems splitting things off into a few different modes is a better way to go. So, here's what I want to see now:
Chat we haven't really gotten into, but it's pretty simple. I have a name, presumably the one I logged in with. I type things in the chat box, everyone sees MyName: What I typed. If what I typed is "/me does something" they see MyName does something instead. There's a list of who's in the room (which I'd rather officially call "the table" than "the room" really). Here's some extra bells and whistles though!
OK. The short version of what we're doing here is, we're taking images (either direct uploads or from an url) and importing them in to use for Stuff. Then we're doing things with them. OK, maybe that's too short. Point is, source images have 2 roads in, and we need to filter them to make sure they're actually image files of decent sizes, to keep things from breaking or people from getting sleazy here. Probably want to rename everything as we go too so things don't accidentally get overwritten on the server. Oh, and for the REAL quick and dirty stuff? Let's even let people create stuff right in here, as either text wads or using the same sort of white board deal we're going to use for map doodling. Actually getting that saved as an image file strikes me as tricky though.
Next, we need to let people clean these things up. We've got variable levels of zoom here, images come in lots of different sizes. We want our new image to appear on/next to a grid which we zoom in and out without resizing the image, to set an appropriate grid-size for it. If it's a pawn, it should probably be just 1 grid space. If it's a board, probably a good 50x50 or so. If it's a big ol' strategy game map, it should be way huge. I don't want to be a nazi about this stuff, but it should have big red warnings if we're getting away from rough standards of appropriateness here.
Now, we've got this image nice and clean and proper sized? Cool. Time to do something with it. If it's a pawn or a map, we're probably done. We tag it, we name it, we set a place in our personal file directory for it that's easier to recall than just our personal massive master pawn pile. All well and good. We might want to do more with it though!
Cards we're going to want to make in batches pretty much always. Uh... we probably want to force people to pick what they're creating before they start uploading anything. Cards need all kinds of big ol' warnings that it's important which image is the front and which is the back. Basically though, we start off with the card back image (and SERIOUSLY give people a way to flip it over if they accidentally do a front first despite the warnings). Anyway, we standardize our size based on that and, after double checking that it is the back image, we use that as the back for a bunch of cards with a button array like "Save and new card with this back, save and new card same scale different back, save all cards as a deck (which is purely an organizational concept in this context really) and finish.
Now, here's the real freaky feature. What say we're doing something where facing matters. Well, we have a means of handling that detailed above, with the whole twisty unit idea. Since I'm still fairly sure realtime free rotation is out the way things are handled, but here's a notion. Take an image, and a number of facings. Pipe that off to, say, a perl script. It opens the image with some image editor, grabs the first pixel, sets it as the background color, rotate, save as, undo, repeat, tada! Tosses all those up as the appropriate rotation variations, effort saved. Holy cow, we DO have access to realtime free rotation. Rock on.
This mode also needs the ability to edit objects in your personal inventory willy-nilly, and the ability to send them to other people. Ideally by taking whole personal directories and dumping them, directory tree intact, into an inbox directory for that person. Then just have an option to send such things to the public use box, where someone can scan through, verify that something should be made available to everyone by default, and set it as such. "Someone" probably being anyone with clearance to do so who wants to do a sweep.