Yagga Whitepaper

 

Everything can be found at www.yagga.net

written 19th august 1999

what is yagga...

Yagga is a complete environment in which to write, configure and run "server" programs for multiplayer games.

Yagga is free, and can be freely used. For the moment we don't release to the public the source code. Please feel free to use and download and test it. Any comemnt is welcome. If you use it in anything commercial however, please contanct us and remember to specify that Yagga is our copyright, and put a link to this site.

Yagga can be used for strategic or tactical games, not for action games such Doom or Quake. The range of game is very wide: from strategy games played by e-mail (galactic conquest, diplomatic trachery) to small puzzles, such as 4-in-a-row or chess, including classical board games such aerial dogfighting etc...

In general, every game that can be split in turns (where every turn is more or less always made of the same "parts") and that can be played by one or more player should be modelled using the Yagga environment.

..and what is not...

Yagga can't be used to model action games and real time strategy games such as Starcraft.

Yagga enables you to write only the server part of the game. It includes functions to communicate with a client program, it doesn't include facilities to write client programs.

...and what it needs!

Yagga and related packages require Java version 1.2 (or Java2) to run. They can thus run on any Java-enabled platform.


How to model a game server

THe Yagga environment includes a language, named PbML, used to describe the game server.

PbML is a small size object-oriented language designed with turn-oriented multi-user games in mind. The Yagga environment uses PbML files to describe the simulated world and its interaction with the players. It is an event-oriented language, and moreover it supports extensions and plug-ins. PbML syntax is very much similar to the one of C++ or Java.

Basic structure of a PbML world

A game designer uses PbML to write down one or more ".PbML" files to describe its fantasy world in which players will play and struggle for victory.

It is clear that plug-ins will be basically PbML files "installed" in the game server file system.

A typical game is made up of several turns. Each "turn" the Yagga environment collects all the info from the players (commands), read up the world's data, make the world evolve one step, writes down the data (the new status for the next turn) and sends players the updated information that belongs to each one of them.

Once players have read the info, have decided new commands to give to their units, they send back the info to the Yagga environment (the server) and the cycle repeats...

This cycle can happen once in a while (such as in play-by-e-mail games) and so Yagga is used as a one-shot program: you launch it and it calculates the new turn, or it can happen continuously, and so Yagga can act as a real server, waiting for user commands, evolving the world, sending back user info and so on, without ever quitting the Yagga environment.

Phases

PbML is driven by events. Events are predefined (and thus we refer to them as "phases"). A turn of a game written for yagga is always made up of the same phases (more or less, there is some flexibility). The Yagga environment knows these phases and starts from the forst one to the last, invoking all the methods that are written to "handle" a certain phase.

Once all the methods that handle the last phase have executed, the turn is terminated.

This works in a simulated-parallel way, that is all the methods called to handle a certain phase are run in parallel, on the same set of data, and modifications to the data are applied at the same time once all the methods of a certain phase have terminated their execution.

Commands (Player -> Server)

Commands are the way players communicate their strategy to the Yagga server. These are basically invokations of specific methods with user-decided parameters. A player can issue commands only to objects she owns. Commands belongs to specific phases and are executed along "normal" phase handlers.

Views (Server -> Player)

A PbML world interacts with the player by sending them "views".
A View is a set of generic info about something that the client program uses to present the player info a bout the world.
Thus, the actual data are not sent to the player's client program, instead the game designer must specify what to send to the player. Of course the information sent via the "views" can be anything, can reflect the actual status of the world, can cheat the player into believing s/thing is s/thing else and so on. Views are just a mean to send information to the player.

The client program (not implemented by Yagga) must show them to the player in a human-readable form, but the client doesn't know anything more about the gamethat what can be found in the views. If the game designer forgets to issue a command that sends the player at least one view, then this player won't see absolutely nothing.


This whitepaper is (C) & maintained by Walter Gamba