Minecraft Bingo

This is a mod for Minecraft that adds an item bingo minigame. All players are given a 5x5 bingo card with in-game items, and race to obtain the most points within a time limit. The github page can be found here, and contains the release file and details on how to play it.

Gameplay

Each player receives a card with the same 25 target items at the beginning of the game, each worth an initial number of points. As you and other players explore the world and find these items, your score increases, and the point value of the item decreases for other players. Additionally, bingos - or finding all five items in a row, column, or diagonal - award bonus points. Each player will only receive points for the first time they collect a given item. The cards each player has will update to display either how many points they receive for an item - or if they have not found it, how many points it is worth. The current score of all players can be seen in the player list (the display that appears when holding tab), alongside the time remaining in the game. This plugin also features sound effects on important game events, in case you aren't always reading the chat.

Features

Technical Details

Scorecard

The scorecards are implemented using the map item. Maps in Minecraft are 128x128 pixels, each with one of 248 possible colors (4 shades of 62 colors). The textures of minecraft items are 16x16 pixels, meaning a 5 by 5 grid of 1:1 scale item textures will fit on a map. Because there are only 248 possible map colors whereas the textures use the full range of RGBA colors, the textures cannot be directly displayed to the map. I externally processed all of the textures to convert each of the pixels to the nearest of these possible values. The pixel data is stored in a compressed format: [palette][data size][data]. Palette is 4 bytes, and contains the four most common colors. Data size is 1 byte indicating the length in bytes of the compressed data, minus 1. Because the textures are 256 pixels, the data size will never exceed 256 bytes. Data contains the pixel data. Runs of 3 or more pixels where the color is in the palette are represented by two bytes - the index of that color in the palette, and one less than the length of the run. All other colors are represented directly by one byte. The colors 0, 1, 2, and 3 are never used, allowing them to be distinguishable as a palette index. The compressed data is 153.0 bytes per texture on average, or 40% less than the 256 bytes uncompressed. The score for each item is drawn after the texture using 3x5 pixel digits.