Bright Backgammon

Playable Backgammon set, with two player, player v bot, and bot v bot modes


Bright Backgammon is an interactive, playable backgammon set for Second Life.

Though attractive just as scene dressing, it allows people to play each other, or test their skill against the built in, backgammon playing bot.

You can even have it play a bot vs bot demonstration game, or automatically play such games when idle, while still allowing visitors to stop such a demo game with a click, and play backgammon themselves.

The game implements all the rules of Backgammon, and makes play easy by making clickable components glow when available. So when it is a player's turn to roll their dice, their dice cup will glow. When the dice have been rolled, those checkers which can be legally moved will glow. And if they have a choice of points to which they can move, these points will glow. Even new players will immediately know how to play.

Animation and sound make these moves more immersive. Sounds accompany the dice rolling onto the board, checkers clicking against each other as they move, and dice being picked up and dropped back in their dice cups.

Each player has an "undo" button, so that moves may be modified until the player decides to pick up their dice to end their turn (as is the rule in real world backgammon), and a "help" button, which provides a notecard explaining the rules of the game.

Bright Backgammon also understands "gammon" and "backgammon" wins of 2 and 3 points respectively, and provides a doubling cube, used exactly as in real world backgammon, and multiplying the points won in a game. You can even make offers to double when playing a bot!

The points won can be displayed on a scoreboard provided with the set. This is a small disk you can place independently of the board, projecting floating text listing the accumulated scores of both the 100 top scorers, and 100 newest players. Run a league table, and encourage revisits, and competition!

You can rez Bright Backgammon for public use, and you can keep a copy in your inventory to "Add" to your avatar as an attachment. When you do, it will float in front of you, allowing you to play backgammon against other people *anywhere* in Second Life, even in no-rez areas!

And the set is highly configurable. A simple settings menu allows you to set its size, from a tiny 68cm to a full 34m across - a board you and your opponent can walk around in as you play! There is a selection of preset themes (including options like "Shipboard", with a gnarly timbered frame, and "Hobo" with a suitably weather-worned look), and options to individually set checker colours and board textures.

You may also set the amount of floating text to "full", "brief", or "none". Full floating text can be helpful to spectators, showing the player's names, dice rolls, rolls left, and so on. Brief text simply shows help to the players, telling them when to click their dice to roll, or click checkers to move, and so on. But if you find floating text ugly, Bright Backgammon is designed to be playable without it, even by those using it for the first time.

This is a full, loving implementation of the game of Backgammon, helpful to beginners, but implementing all the rules and features of the game as understood by aficionados. It adds charm and interest to the tables in your bar or cafe, it is a gorgeous addition to your home's decor, and, above all, it is a fun way to play one of the world's greatest games!


To unpack your set, find the object "Bright Backgammon boxed" in your inventory. Drag it to the ground to rez it, then right-click and select "Open" to display its contents window. Click the "Copy To Inventory" button at the bottom of this window, to create a new folder - also called "Bright Backgammon boxed" - in your inventory.

Inside, you will find three items:

Bright Backgammon
Bright Backgammon note
Bright Backgammon Scoreboard

Drag the "Bright Backgammon" object onto the ground to rez it.

Below are detailed instructions for using and configuring the Bright Backgammon set.




Note that there is a "help" button on the board itself. When a player clicks this, they will receive a notecard titled "BRIGHT BACKGAMMON HELP", which contains the same text as sections 1 and 2 in the list above.


If you already know the rules of backgammon, this section will explain how to use the Bright Backgammon Set. But if you are not familiar with the game, please read the section below, from "The Game Of Backgammon".


To play using the Bright Backgammon set, first click the board. You will see this menu:

Would you like to play backgammon?

[Play Human] [No Thanks]
[Play Bot] [Play Self] [Bot vs. Bot]

Click [Play Human] to play against another avatar. Then you will have to wait for someone else to click the board and join your game.

Click [Play Bot] to play the Bright Backgammon "Bot". The board itself will play against you.

Click [Play Self] to play both sides yourself, throwing dice and moving for one side, and then the other.

Click [Bot vs. Bot] to begin a game between two bots. They will play entirely without intervention until one of them wins, or until someone clicks the board to display a control menu, and selects an option to stop their game and reset the checkers.

If you find the board left in the in the state it was in at the end of the last game played, click the board. You will be asked "Do you wish to reset the board?". Click "Yes, Reset". Then click the board again to start a new game.

If you find the board playing an automated "Bot vs. Bot" demonstration game, just click the board. You will be asked "Do you wish to stop the bots playing and reset the board?". Click "Yes, Reset". Then click again to start a new game.


In general: click where it glows.

So when it is your turn to play, your dice cup will glow. To play a turn:


Your dice will roll. Checkers which you can legally move will glow.

If there are none, you will receive the message "You have no possible moves" - go to step 5.


If the checker you clicked has two possible moves, both the points to which it may move will begin to glow - go to step 3.

If the checker you clicked has only one possible move, it will simply move there immediately - go to step 4.


Your checker will move to the point clicked.


If you do, you have more moves to make, go back to step 2.

If not, you have either used all the moves you rolled, or the remaining moves cannot be made - go to step 5.


This will pick up your dice from the board, allowing your opponents turn to begin.


a) If you make a mistake, click the UNDO button to reverse the effect of your last click. No move is final until you reach point 5, and click the dice cup to end your turn.

b) To double, click the doubling cube. You may only double when it is your turn, before you roll your dice, and the cube must be in the centre of the board, or on your side of the board under your control.

c) To stop the game, click the QUIT button. The game will announce that you have abandoned the game, and the checkers will be reset.

The QUIT button is provided because, in practice, there may be a good reason you cannot play on. But please be polite - this is equivalent to walking away from an unfinished game in real life, so do explain to your opponent why you must leave.

If during a game, you walk further than 10m from the board, or teleport away, the game will respond as if you had pressed QUIT.


The Bright Backgammon Set has a built in bot system, and you can play against a bot, or have two bots play against each other.

Bots know the rules of the game, and are constrained to make legal moves exactly as human players are.

And you can offer a bot a double. Much like a human opponent, they will accept or reject it according to their assessment of their chance of playing on and winning. If they refuse, you win the game.


The first mention of the word "backgammon" dates back to 1635, around the time the game emerged from the family of "table games", which is more ancient still.

Simple rules define a game which can be quickly learned, but which offers sufficient depth to allow years of study and improvement. Individual games are relatively short, can be fast paced, and offer a perfect blend of skill and chance.


Backgammon is a two player game.

Each player has 15 round pieces, or "checkers", distinguished by colour. Different sets use different pairs of colours, but these these notes assume they are red and black.

The game begins with the checkers arranged in standard starting positions across 24 triangular "points" on the board: 12 points along one side, and 12 along the other. The points are further divided into four groups of 6 by a "bar" running down the middle of the board.

Players stand on opposite sides of the board, and take turns throwing two dice, and moving their checkers over the number of points shown on the dice. The position of the points P01 to P24, the bar, and the players, are shown in this diagram:

Red player stands this side

P13 P14 P15 P16 P17 P18 |bar| P19 P20 P21 P22 P23   
|   Movement of red's checkers
|   (black's move opposite way)
P12 P11 P10 P09 P08 P07 |bar| P06 P05 P04 P03 P02 P01

Black player stands this side

Red begins the game with 2 checkers on P01, 5 on P12, 3 on P17, and 5 on P19, and black with 2 on P24, 5 on P13, 3 on P08, and 5 on P06.

So for instance, if a red rolls a 3 and a 1, they might move one checker from P01 to P04, and another from P17 to P18. Or they could move a single checker twice: moving (for instance) a checker from P01 to P04, and then again from P04 to P05.

Red moves their checkers from lower numbered points to higher, taking a clockwise path around the board from P01 to P24. Black move their checkers in the opposite direction, moving anticlockwise from P24 to P01.


The last six points of player's a journey form their "home board". P01-P06 are red's home board, and P19-P24 are black's.

When a player has all their checkers in their home board, they may begin to move them beyond the last point, and so off the board entirely. This is called "bearing off".

So if all black's checkers are on points P19-P24, and they roll a 2 and a 1, they may move one checker of the board from P23, and another from P24.

The first player to bear off all their checkers wins the game.


If the same value appears on both dice, a player may make four moves.

So for instance, if a player throws a 5 and a 5, they may make four moves of 5 points each.


A point may carry any number of checkers.

You "make" a point by moving two or more of your checkers onto it. You may not move a checker onto any point made by your opponent - that is, any point already carrying two or more of your opponent's checkers.

If a player cannot move any of their checkers the number shown on a die, then that die is simply ignored. So for instance red rolls 2 and 2, but the points two points away from all red's checkers have been made by black, then red must skip their turn entirely.


A single checker on a point is called a "blot".

If you move your checker onto a point holding a blot left by your opponent, then your opponent's checker is moved onto the bar in the middle of the board. This is called "hitting a blot".

If you have one or more checkers on the bar, you may not move any other checkers until you have reintroduced those on the bar to the board.

Red moves from the bar to P01, and black to P24 - so once a checker has been hit, it effectively restarts its journey right from the beginning.

For instance, if black has a checker on the bar, and rolls 2 and 4, they may reintroduce that checker to P23 or P21 - providing that red has not made either of those points.


The United States Backgammon Federation (or USBF) describes this rule as follows:

"A player must use both numbers of a roll if this is legally possible (or all four numbers of a double). When only one number can be played, the player must play that number. Or if either number can be played but not both, the player must play the larger one. When neither number can be used, the player loses their turn. In the case of doubles, when all four numbers cannot be played, the player must play as many numbers as they can."

If you ever find that a checker, which you had expected to be able to move, is not glowing, this rule is usually the reason. The set will only allow you to make moves which use all your rolls; or, where that is impossible, as many of them as possible; or, where you must choose between two rolls - only the larger.


If two players decide to play a series of games, each win will normally be worth one point.

However, if one player wins by bearing off all their checkers before their opponent has borne off any at all, they win a "gammon", worth two points.

And if a player bears off all their checkers before their opponent has borne off any, and while their opponent still has checkers on the bar, or in the winner's home board, they win a "backgammon", worth three points.


In the centre of the board is a "doubling cube", with sides showing 2, 4, 8, 16, 32, and 64.

At the beginning of a player's turn, before they roll their dice, they may choose to "offer a double" to their opponent - making the game worth two points rather than one.

So if red felt they were in a strong position, and were confident of winning, they might offer a double to black.

If black refused, red would win the game immediately, securing one point.

But if black agreed, the doubling cube would turned to show 2, and placed on black's side of the board. The game would then continue normally, but be worth 2 points to the eventual winner.

Black is now said to "control" the doubling cube. Red may not double again, but black may if they wish. If they did, and red accepted it, the doubling cube would be turned to show 4, and placed on red's side of the board.

In principle, this might continue until the cube showed 64, and the game became worth 64 points: but this is rare.

Note that doubling also multiplies the points won by a gammon or backgammon. For instance, if the doubling cube shows 4, and red wins by a backgammon (which is normally worth 3 points), they win 4 x 3 = 12 points.


The following features are only available to you, as the owner of your Bright Backgammon set.


If you are somewhere in Second Life where you cannot rez, you can still play Bright Backgammon by wearing it as an attachment.

Right-click the object "Bright Backgammon" in your inventory to display its context menu, and select "Add". (Note: do not select "Wear", as it may displace part of your avatar. Always select "Add".)

The board will appear, floating in front of you.

Using the set is now much as was described in the sections above. Click the board to display this menu:

Unfortunately, the game cannot begin without an opponent.
Would you like to wait for someone, or play against a bot,
or play both sides yourself?

[Play Bot] [Play Self] [Bot vs. Bot]

To play someone else, have them click the board to become player 2.

To remove the board, right-click it to display its context menu, and click "Detach".


Click the "set" button to display this settings menu:

Players: RED vs BLACK
Textures: EBONY frame, BLACK LTH. board
Lining colour: RED, Title colour: WHITE
Text: FULL length, WHITE colour
Checker size (board size): 10 (1.70m)
Sound: ON
Timer: No demo games, 10s restarts

Changing settings will reset any game in progress.


Click the button corresponding to the setting you wish to change.

THEMES: Displays a submenu buttons carrying the names of preset visual themes for the board: BLACK&RED, LATTE, MONO, HOBO, SCHOOL SET, OLD LEATHER, SHIPBOARD, SCIFI, LUXURY, DEEP PINK, and CANDYSTRIPE. Clicking one of these buttons instantly changes the boards colours and textures to match the chosen theme. Try them all, see which you like most!

PLAYER 1/PLAYER 2: These buttons display a menu of colours for the chosen player: RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, PINK, COPPER, GOLD, WHITE, and BLACK.

FRAME/BOARD: These buttons display a menu of textures which may be applied to the board's frame, or to the playing surface itself: BLACK LTH., BROWN LTH., TAN LTH., HEX GRID, SILVER, SCIFI, PALE WD., OLD WD., GNARLY WD., HICKORY, and EBONY. (LTH. = leather, WD. = wood)

LINING/TITLE: These buttons display a choice of colours for the lining of the narrow trays to either side of the board, and the game titles in the middle of the playing area. The colour options are the same as those for PLAYER 1/PLAYER 2 above.

TEX LEN: Displays a menu of options for the length of floating text. There are three options: FULL, BRIEF, and NONE. Full text shows the names of the players, the last numbers rolled, the moves not yet taken, and so forth. Brief floating etxt shows only player instructions, like "BLACK to choose which checker to move... click a highlighted checker.". NONE suppresses all floating text. Floating text can be helpful, but the game can be played without it, particularly as the parts of the board to click are always highlighted by glowing.

TEX COL: Displays a menu of colours for the floating text. The colour options are the same as those for PLAYER 1/PLAYER 2 above.

SIZE: Displays a menu of options for the diameter of an individual checker in centimetres. The board will be scaled to suit the chosen checker size, so the overall size of the board is also shown on each button, in metres. The options are 4 (0.68m), 5 (0.85m), 7 (1.19m), 10 (1.70m), 15 (2.55m), 20 (3.40m), 30 (5.10m), 50 (8.50m), 75 (12.75m), 100 (17m), and 200 (34m). Clicking any of these buttons will instantly resize the board, and you can try multiple sizes to see which suits the setting best. Be sure you have a little space around you, and will not startle nearby avatars, before you try resizing the board to be very big. These huge board sizes can be a fun addition to an outdoor venue, allowing people to walk on the board, among the checkers, as they play.

SOUND: Clicking this button turns the dice and checker sound effects on and off.

TIMER: Displays a choice of values for two timers. The first timer measures the gap between playing demonstration bot vs. bot games while the board is idle. These demo games can be fun to watch, and in a public venue, may encourage people to try using the set for themselves. Options are "No demos", "1min gaps", "5min gaps", "60min gaps", and "120min gaps".

The other timer determines how long after a game has been finished, the checkers should be moved back to their usual starting positions. The options are "No restart", "10s restart", "30s restart", "60s restart", and "120s restart". If you select "No restart", the checkers will simply be left in the position they were in at the end of the game. However, players may start a new game simply by clicking the board, even if the checkers have not been reset to their starting positions automatically.

Note also that if players begin a game, but then before it is finished, one of them walks more than 10m away, teleports away, or simply doesn't make a move for 15 minutes, the board will be reset to its starting position automatically. While actively playing, players have exclusive use of the board. But there is no way they can - intentionally or accidentally - indefinitely prevent other visitors using it.


In the "Bright Backgammon boxed" folder you originally unpacked into your inventory, you will find an object called "Bright Backgammon Scoreboard". Drag it to the ground to rez it.

It takes the form of a small disc, only 20cm across, with a projector lens facing upwards. Above this, apparently projected by the lens, is floating text, showing the names of backgammon players, and their accumulated scores. Naturally, this list will initially be empty, but each time a human player wins a game - against another player, or a bot - their name, and their score, will be added to this list.

So if Jane Doe wins her first game by a gammon, doubled to 4, the line "Jane Doe - 8" will appear in the list. If she then wins another game, for a single point, this will be updated to "Jane Doe - 9".

Though the scoreboard only shows 10 players at a time, clicking the disc below it will cycle through all the players whose scores have been recorded. It will first show new players, 10 at a time, with the most recent at the top. Then, it will show the top scorers, also 10 at a time, in high-score order. When left unattended, it will cycle through these lists automatically, showing the next 10 names every 30 seconds.

When someone wins a game, the scoreboard will revert to showing the top of the most recent players list, so that they can see their own name has been added to the top.

Note that neither bots winning games, nor human players playing against themselves, will appear on the scoreboard. But human players winning against other people, or bots, will.

Such scoreboards are invaluable for creating a sense of competition and progress, and so encouraging repeat visits. People like to see their names in league tables, and many will be ambitious first to appear in the top scorers' list, and then to improve their ranking.

As owner, you have access to a settings menu, which can change the scoreboard's operation. If you click the lens on top, you will simply advance the list display much as others do. But if you click on the black disc beneath the lens, you will see this menu:

Players recorded: 0
List: 100 top scorers, 100 new players
Keep best or total score: Total
Logs scores in range: 9999m


ADD PLAYER/DEL PLAYER: As the scoreboard's owner, you may manually add and remove players from the lists. So for instance, if a player has been banned from your venue for cheating, you can click DEL PLAYER, enter their name, and remove their listing. Or if you played a personal game against Shan Bright in a different region, you can manually add her score to the scoreboard by clicking ADD PLAYER and entering "Shan Bright, 1", which will be recorded as if she had won a one point game locally. Nor are you restricted to real avatar names. You could manually add a record for "Macuilxochitl, 1000", giving the Aztec god of games 1000 points on your scoreboard, and offer special prizes to any players who beat his total.

CLEAR ALL: Click this to remove all player records from the scoreboard.

RESET: Resets and restarts all the scripts in the scoreboard. All your player names and scores will be kept: this option simply forces the scoreboard to restart.

REPORT/EMAIL: These options will produce a report of the data recorded by the scoreboard. Players will be listed in alphabetical order, with their score, the date and time they most recently played in "unixtime" format, and the number of days ago that was. Each line takes the form of a comma separated value list (or "CSV"), as this allows the data to be easily transferred to most spreadsheet programs. Clicking "REPORT" will let you "hear" the report in local chat in Second Life. Clicking "EMAIL" will cause the report to be sent to you as an email, to the email address you registered with Second Life. Note that the Second Life function to send emails takes 20 seconds to run, so there will be a slight pause after clicking "EMAIL" before the email is sent, and the menu is redisplayed.

TOP SCORERS/NEW PLAYERS: These buttons allow you to decide how many top scorers, and how many new players, to list. So you might decide to list the top 40 all-time top scorers, and the last 60 people to have played. The total number of players which might be recorded, obtained by adding the number of top scorers to the number of new players, may not exceed 200.

BEST/TOTAL: This setting determines whether the scoreboard will list best individual game scores, or totals scored across all games. Initially, this will be set to record totals. This promotes engagement, as each game a player wins will increase their total score. But if you wish to record only the best single game score achieved by each player, set this to "Best".

RANGE: A scoreboard record scores from any Bright Backgammon set you have rezzed in same the region, within a certain range. Initially, the range is 9999m, effectively meaning that it will record scores from *any* backgammon set you have rezzed in the region. But if you wish to rez a scoreboard which only accumulates scores from a particular board, you may reduce the range to include only that board. Or you may choose to rez multiple scorers, each recording scores from a cluster of boards around them, with a single "master" scoreboard accumulating all scores.

LIST STYLE: This menu allows you to change the various titles, and text colours, used in the list. By default, headings are in yellow, player names and scores in white, and the lists is titled "BACKGAMMON/TOP SCORERS/Player - Points" and "BACKGAMMON/NEW PLAYERS/Player - Points".

API: Clicking this button will display information about the format of the API messages the scoreboard expects to receive with player and points information. This cannot be changed: it is locked to work with the Bright Backgammon set.


This section will only be of interest to script writers, who wish to develop scripts which can respond to the results of games played on a Bright Backgammon set.

Bright Backgammon announces the results of games using a simple API, or "Application Programming Interface".

When a game ends, a message will be sent on channel -248163264:

BBG, winnerUUID, loserUUID, pointsscored

For instance, let us say that Shan Bright (UUID 4b16ad11-0a56-4627-8eb6-4c88a9850fb5) has just won a game against Iggy Hyx (UUID 1344f4d1-aa87-4936-9f9b-a87f66cb6b3a). She won by a gammon, with the doubling cube set to 4, winning 8 points.

Bright Backgammon will send the following message on channel -248163264:

BBG, 4b16ad11-0a56-4627-8eb6-4c88a9850fb5,
1344f4d1-aa87-4936-9f9b-a87f66cb6b3a, 8

"BBG" is simply an abbreviation of "Bright Backgammon". You can use this fixed string to double-check that the message your script has received was actually sent by Bright Backgammon, and is not simply a message from some other object which was coincidentally sent on the API channel.

To make such coincidences even less likely, we deliberately chose a long, apparently obscure channel number, -248163264. But it is easily remembered, as it is taken from the sides of a backgammon doubling cube: 2 4 8 16 32 64.

If either player was a bot, their UUID will be the UUID of the Bright Backgammon set itself. In other words, their UUID will match the message sender's UUID.

No API message will be sent if the winner and the loser UUIDs are the same: in other words, if a human player was playing against themselves (controlling both sides), or it was a bot vs. bot game.

So in your script, you might write:

            llListen(-248163264, "", NULL_KEY, "");

        listen(integer channel, string name, key id, string message)
            list api_data = llCSV2List(message);
            string bbg_marker = llList2String(api_data, 0);
            key winner_uuid = (key) llList2String(api_data, 1);
            key loser_uuid = (key) llList2String(api_data, 2);
            integer points = (integer) llList2String(api_data, 3);

            if (bbg_marker == "BBG") // ie. Ignore if not from Bright Backgammon
                if (winner_uuid == id) // Bot (message sender) won the game
                    llOwnerSay("Winner: bot");
                    llOwnerSay("Winner: " + llKey2Name(winner_uuid));
                if (loser_uuid == id) // Bot (message sender) lost the game
                    llOwnerSay("Loser: bot");
                    llOwnerSay("Loser: " + llKey2Name(loser_uuid));
                llOwnerSay("Points won: " + (string) points);
                if (points >= 4)
                    llOwnerSay("Congratulations on a big win!");


* If rezzing Bright Backgammon in a public space for your visitors to use, set it to play demonstration bot vs. bot games when idle. These will attract attention, and let visitors know that the set is not merely decoration, but can be played, and even has a bot available for them to play against.

* Set up a scoreboard! Put it within view of the board (or boards) you rez, so that players can see that their achievements are being recorded. This hugely encourages play, competition, and community.

* In a large, open air venue, a huge backgammon board - 17m or even 34m across - can be fun. Players can even walk around the board, amongst the checkers, as they play. No one will be struck by moving checkers or by dice, as these moving components have no physics setting, essentially being "phantom".

* When you meet someone new, ask them if they like backgammon! If they do, wear the board as an attachment as explained above, and invite them to play. You can do this anywhere, even in places where you cannot rez!


Shan Bright
Chief Executive Officer