Project 1

Reading and Preparation

Start by reading the lab material and the given code - make sure you understand how the worlds and the universe interact, how the messages are generated and passed between them. Make sure you can get the program running at least within one computer.

Tonight (Tuesday) I will post instructions of what I would like you to prepare for the next class. During the first week we will focus on brainstorming, deciding what game may be appropriate for this environment, identify the information the worlds and the universe need to represent, and define the data that represents this information.

Assignment

Think of a multi-player game that would be suitable for the univers/world setting.

Bring your game description to the class on Tuesday, January 19th at 6:00 pm -- room TBA, or if you cannot attend the class, e-mail it to me.

Sample Game Description

The war game is designed for two players.

Each player (each world) keeps a deck of cards it has (a list of cards). When the user hits the space bar, the world plays the top card in the deck. It sends a message to the universe notifying the universe of the card it played.

The universe starts with no players registered for the game. When the first or the second player registers, it adds the player to the list of current players and sends the player the deck of cards that have been dealt to him (a list of cards). The universe keeps track of the number of cards dealt to each player.

When a third player registers, the first player is disconnected and is sent a message done, the new player is added to the end of the list of players, and is sent a deck of cards that have been dealt.

When the universe receives a message with a card that has been played from any player, it sends back a message with the list of cards that contains only the card that has just been played.

When the player receives a message from the universe with a list of cards, it adds the cards to the end of its list of cards (on the bottom of the deck).

If a player ends up not having any cards left, he stops playing

If the universe detects that the player has not cards, the player is disconnected and a message done is sent to him.

The design anticipates more than two players, the dealer shuffling cards, the dealer waiting to deal the cards until all players have registered (to know how many to deal), and to decide on a winner among all cards played in one round.

Of course, the next extension would add the rules for the tie resolution - which is what makes this game interesting.

Note 1: This may not describe exactly the game I have implemented. However, it shows what are the issues you need to address.

Note 2: Be careful when thinking of games that rely on the timer. The timers running in the two or three worlds may not be synchronized, even if you choose the same tick rate. It may be that the universe will need to keep the time - though that may increase the amoung of information the messages contain.

Universe

Lab text that explains how to use the universe teachpack: lab1pdf and lab2.pdf


Programs and resources