Tuesday, October 22, 2013

server updated - resync, new avatars, robot gameplay in Euchre

This morning, I applied some updates to the server. These are the changes:

1. Resync

The first change gives players some feedback when a "resync" occurs. What's a resync? It has to do with the hourglass that you may see if you take too long to play a card.

When playing with other people at a real table, if you make people wait too long, someone will give you a nudge or make a comment. But on the internet, there's no way for other players to do this. For a game site with multiple players interacting, there has to be some way to deal with this.

To impose a level of fairness on everyone at the table, there's a timeout period. If you take too long to play, the hourglass shows up. When the hourglass runs down, the server picks a card for you to play, and sends a message to your computer to play it.

Since internet connections are sometimes slow, it may happen that you will play a card while the server is sending a message for you to play the card that it picked for you! In this case, the server has to overrule your picked card. It maintains the integrity of the table for all players; otherwise, there would be chaos. So if the server sees that it overruled you, it sends a "resync" message to your browser - telling it to redraw the cards on the table so that they correctly display the state of the game as it is managed by the server.

Up until now, there was no way for a player to know when their picked card had been overruled by the server. They might see some cards jumping around, and be confused about what happened. Now, you will see a reddish-pink message in the lower right corner to let you know what happened. This is shown in the screenshot below:

The message says "Your view of the table is out of sync with the server and is being reset." That's shorthand for the detailed explanation given above!

2. Improved robot gameplay in Euchre

I've had some complaints that robots are not leading with the right bower in Euchre. This is generally considered to be a good strategy, and I've modified the robot code so that they now do this.

I'll be working on more improvements to robot gameplay in Euchre and other games over the upcoming weeks.

3. New avatars!

There are nine new avatars available!  Since Halloween will soon be upon us, I've added five Jack O' Lanterns for players who want to celebrate the day. Enjoy!