[Home]PuertoRicoOnline

ec2-35-173-47-43.compute-1.amazonaws.com | ToothyWiki | RecentChanges | Login | Webcomic

Implementation of PuertoRico by qqzm.

It has a web interface [here], based on the WikiGame/PuertoRico page.
It also has a GUI client [here] that's now finished! Or at least finished enough to play with. (Current version 0.672)
You can also download the server [here] to run your own server. (Current version 0.361)
It supports AI bots. See PuertoRicoOnline/WritingBots for help on writing bots.

Where, in that GUI, does the 5th player play? --CH
Your board is the large one at the bottom. The other 2-4 players are the four boards at the sides. --qqzm


Bug List


GUI client: Builder phase highlights available buildings, which then stays around after build.
Fixed 2005/05/22.
Web interface: Game status still shows "waiting for players" on Game 0.
I'm currently working on the list of games, currently *all* games show as waiting for players. Fixed 2005/04/26
Game: Player 1 took Settler and chose Quarry; server rebooted; Player 3 is being asked to take plantation, not player 2.
It was a combination of the 2 bugs I've listed below that meant that: if you logged in whilst it was your turn and it was the settler phase, then it would skip your turn. When I looked at it, it said it was waiting for you, but when you tried to look, it would skip your turn. --qqzm
Server: If you go to settler.html without specifying a plantation to choose, it would skip your turn.
Fixed 2005/04/27
Web Interface: The login form pointed to settler.html instead of gameinfo.html, so when you logged in it would try to settle specifying no plantation which wouldn't do anything unless it was your turn and in the settler phase, which is why I hadn't noticed it before. :)
Fixed 2005/04/27
Game: Colonist numbers on the ship and in the supply are both wrong - and wrong by different amounts --SC
Fixed 2005/04/27
Game: Craftsman phase produces goods starting with player 1, not the Craftsman. --CH
Well spotted! Fixed 2005/04/28
Distribution of Colonists wrong in Mayor phase when colonists on ship > number of players. I've fixed the bug, but need to know where you want your additional colonist Stephen, so I can correct the current game.
Fixed 2005/04/28
If I have another colonist, I'll take one out of a Grain plantation, and put it in Sugar, and put the additional colonist in Small Sugar Mill. --SC
Ok, all colonists present and correct. --qqzm
Web Client: I can't log in. I'm just getting a page saying "Access Denied" --CH.
Fixed 2005/05/02.
Game: In the Captain phase, I am being told to choose a ship (incl. Wharf) and choose a good. However, I am given no goods to choose, although there are three legal ones. 
Fixed 2005/05/06
It now says 'List index out of bounds' --SC
It did actually let you ship, it then crashed because it couldn't format the string correctly to log the use of the wharf in the game log.
Fixed 2005/05/06.
Something strange happened with the shipping: 0 barrels of indigo..... --SC (now on proxy server, which seems to be working ok)
Fixed 2005/05/11
Random Bot: Uses NumberBarrels? in settler phase, where NumberPlantations? is correct.
This is just a slightly confusing hack on my part. You need to know how many barrels of grain, indigo etc. are in the bank, but not how many of each plantation. You need to know how many quarries there are, but it has no associated barrel. I've naughtily used the same NumberBarrels? integer to store both. It being the number of barrels for IDs 1-5, and the number of quarries for ID=6. --qqzm
Game: Certain Settler phases have not every player (bot) taking a plantation. They're not trying to because of the above bug, but I believe the game should force each player that can to take a plantation.
Somebody please correct me if I am wrong, but I'm pretty sure the game rules do not require you to take a plantation. I think they say "each player may choose a plantation", but without the rules in front of me I can't check at the moment. However, RandomBot? should always try to take one if one is available. Can you send me the log file of the bot player who refused to? --qqzm
I've checked the rules, and taking a plantation is indeed optional. --qqzm
Ah, ok, it's my confusion causing the problem then. I was trying to write a bot that played a rudimetary Grain strategy, so took a Grain plantation if one was available. Since NumberBarrels? tended to be >0, copying your Quarry routine meant they always tried to take a Grain even if none were avaiable. Perhaps a function returning Boolean to indicate whether a given plantation type is available for settling? --CH
Stick the following code into your script:

function IsPlantationAvailable(Game: GameType; BotPlayer: Integer; PlantationID: Integer): Boolean;
var
  i: Integer;
begin
  Result:= False;
  for i:= 0 to Game.NumberOfPlayers do
    if GetNextPlantation(Game.GameNumber, BotPlayer, i) = PlantationID then
      begin
        Result:= True;
        Break;
      end;
end;

Thanks, that seems to work. My bot still doesn't always take a plantation, but I suspect that's my programming.
It may be because of the problem with that code I've just changed. --qqzm

Game: A player returning a request to take an unavailable plantation type in the settler phase is treated as having requested no plantation. This bug may be irrelevant, pending the outcome of the bug above.
I've changed it so that choosing a plantation of 0 will skip your turn, and choosing a plantation that isn't there will leave the game waiting for you to choose. 2005/05/12. --qqzm
Game: Can reach a state where the number of a given type of building in the game is too high (for instance, the central board shows 3x Large Warehouse, or 2x Large Warehouse and it's already been build by 2 players). Large Warehouse seems particularly susceptible, although Large Market also affected. Afraid I don't have a reliable cause for this - if I find one I'll let you know. I haven't even found if it's possible to build the third or fourth ones either.
Fixed in version 0.12 2005/05/13.
Bots: After the trade house is emptied, the next bot fails to choose a role. I think, looking at the trace, that the TakeTurn function isn't being called.
Fixed 2005/05/13. See [here] for the latest version with this fix (0.11).
(NB. In the latest version, I'm part way through changing the way the GameLog? works, so all entries show as blank lines ATM but you can read them in the saved game file). --qqzm
Game: Choosing Wharf and no good in the Captain phase results in 'Stack overflow' --SC
Fixed in version 0.22 2005/05/19.
When I go to the webpage, Firefox tells me 'Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype: http://qqzm.myftp.org:8080/English.xsl'.
Fixed in version 0.23 2005/05/24.

Todo List


Server:
Log to record all game events;
Done 2005/04/22
Implement support for more than 1 game;
Done 2005/04/30
Change the server program to run as a service;
Done 2007/03/04
Hash the passwords (currently sent in plaintext);
Only load game data when required;
Done 2005/05/19
AI player(s);
Done 2005/05/02. I've also written 1 test bot "RandomBot?" which makes random choices. It's quite amusing to start 10 games off with just bots in then sit back and watch...
Improve the way game chat is displayed in the web interface;
Done 2005/04/30.
Change web interface to use xml/xsl;
Done 2005/05/17.
Make it distribute colonists automatically if your total colonists >= your total spaces.
Done 2005/05/02.
Add extra bot utility functions requested by CH.
Done 2005/05/12.
Web Client:
Dynamic update of spare colonists when distributing them.
GUI Client:
Implement the Mayor phase;
Done 2005/05/24.
Implement the Captain phase;
Done 2007/03/02
Fix display bug in the Builder phase;
Fixed 2005/05/22.
Swap positions of the next plantations display and the bank barrels display;
Done 2005/05/22.
Implement the game starting and joining;
Done 2007/03/05.
Compress data betwen server and gui client;
Done 2007/03/01


CategoryGames

ec2-35-173-47-43.compute-1.amazonaws.com | ToothyWiki | RecentChanges | Login | Webcomic
Edit this page | View other revisions | Recently used referrers | List subpages
Last edited September 16, 2010 10:07 am (viewing revision 30, which is the newest) (diff)
Search: