EveryGame iPad Blog

Sunday, August 29, 2010

Sample Game with "Free" Piece Movement

We've just posted a new game called AmoebaWar.ege to the EveryGame Google group.


To open the .ege files, remember that you can download them, rename them to .zip, and then double click to open them.

AmoebaWar isn't a complete game -- more a work in progress / technology demonstration. It should give you some good ideas for implementing a miniature or wargame. In particular, it has examples of:
* Simulating free movement with a grid of small squares
* Selected different terrains by picking them from a tab-based menu
* Tapping pieces to show their movement / attack range

AmoebaWar also makes use of several features that will only become available once EveryGame version 1.3 is out. You won't be able to see them until it's available, but a peak in the xml file will give a preview. You'll get more control over tab placement and naming, the ability to annotate pieces with their names, and a whole lot more!

Thursday, August 26, 2010

Creating Dice in EveryGame

A user was recently asking us about how to create dice in EveryGame, so I thought I'd share my response with everyone, since there's certainly lots of games that need them!

The simplest dice would look like this (a 6-sided piece, with a tap action to pick a random side):

<single_tap action="random_side" args="v2,0_1_2_3_4_5">
<sides paths="game_1.png,game_2.png,game_3.png,game_4.png,game_5.png,game_6.png>

It can be hard for that simple case to see if when you tap, you've rolled the same value, or just missed. People have come up with a few solutions. One is to use two pieces, one with sides, and one always blank (to represent the "ready to roll" state). Each tap will flip between these.

<initial_location name="dice_location">
<single_tap action="send_to_back">
<sides paths="game_1.png,game_2.png,game_3.png,game_4.png,game_5.png,game_6.png>

<single_tap action="send_to_back">
<single_tap action="random_side" args="v2,0_1_2_3_4_5,dice">
<sides paths="game_blank.png>

When the blank piece is on top, tapping it will send it to the back of the stack (hiding it), and roll the dice. When the dice is tapped, it's sent to the back, showing the blank piece.

If you want an example of the fancier setup, I suggest you look in the backgammon game's xml file. You could even use its dice images if you want.

Monday, August 16, 2010

Free Piece Movement in EveryGame

Recently, we've gotten a couple of questions regarding creating games by loading on pieces, without needing to create individual board spaces for them, so I thought I would share one of my responses with everyone.

Right now, you do have to define locations for the pieces to live it. The underlying engine is created in such a way that one giant location, where you drag pieces around to an arbitrary location inside of it would be possible. However, there's lots of extra code and debugging needed to actually implement such a thing. I think it could happen in the future, but it won't be available in the next few releases.

However, there are tricks to get close to that. With the "rows" and "cols" specifiers in the location tab, you could easily make an entire grid that covers the entire background. Just make the cells 20x20 or so perhaps, and start them at coord (0,0). Pieces can actually be much larger than the location that holds them, and now you could drag them around the iPad, and while they'll rigidly snap, it'd only be a small distance to the nearest cell.

The only difficulty is that you actually have to tap in the location to select a piece to tap / move. This means that if your locations are too small, it can be hard to pick them. So the smaller the location, the closer approximation to free movement, but the more difficult it is to grab pieces. One clever trick I saw was to put a dot, or other "handle" in the center of the image for each piece. Since the center of the piece will correspond with the location (where you have to tap), it makes it much more evident where you grab the piece from, and lets you easily work with pieces much larger than their grid squares.

Hopefully that gives some of you an idea of how you could set up free pieces movement in your own games. I'm out and about typing this entry from my iPad now, but I'll try and upload a simple game that demonstrates this technique to the Google Group soon.

Friday, August 13, 2010

Getting Images for EveryGame

Based on a comment on the last entry, I thought I'd post a couple of tricks for getting images for EveryGame.

One great resource for images are Vassal files. If you've never heard of it, Vassal is a program similar to EveryGame, that runs on desktop computers. It's been going much longer though, and there's quite a library of games built up for it. Many can be found here:

You can download any of the .vmod files from that site, rename it to .zip, and then expand it. Inside, you'll find all the images you need to to create your own version in EveryGame.

Another easy way to get game images is just to take a top-down picture with your digital camera. The results have been surprisingly good just by taking pictures of the pieces, and cropping them to create the images for EveryGame. A scanner works too obviously, though it's hard to get the whole board in there!

Wednesday, August 11, 2010

AI in EveryGame

We got an email about the possibility of adding an AI to EveryGame recently, so I thought I'd share our thoughts with everyone.

While adding an AI might be possible eventually, it's probably not something that will be coming soon.

One of the largest problems is actually the AppStore rules.  One of the distinguishing features of EveryGame is that people can create their own games.  However, Apple has strict rules against running interpreted code inside of apps, which means people likely could not create AI's for their own games.

If Apple does relax its policy, we've at least got an idea or two about how an AI could be added (though it would still be no small task!).

What you are likely to see soon are ways to improve the ability to play with other people.  We're looking into options for Bluetooth play, internet play, play-by-mail and the like.  Plus, there's a bunch of other new features, likes clocks for chess, better hand-tabs, and easier game creation we're working on too!

Friday, August 6, 2010

Coming up Next

We're hard at work on the next release of EveryGame. It should include much better support for various display options. The last release focused on game debugging. This one is focused on display. You'll finally be able to name and position the tabs for off-board hands. We're also greatly expanding how text is displayed. Previously, locations would just list a piece count or score, but you'll get options to control whether and how the text is displayed. You'll even be able to display e piece name, giving a way to distinguish stacks of otherwise identical pieces.

Got more ideas? Let us know! Email eggy.everygame@gmail.com

Thursday, August 5, 2010

EveryGame Reviewed on TUAW

The Unofficial Apple Weblog (TUAW) has posted a lengthy review of EveryGame. It's exciting to see it mentioned on a high-profile website, particularly one that we read everyday anyway.

Read it here!