GitHub - bcantrill/BattleTris: Two-player networked tetris with a twist · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
bcantrill
BattleTris
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star<br>14
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>31 Commits<br>31 Commits
usr/src
usr/src
.gitignore
.gitignore
LICENSE
LICENSE
PORTING.md
PORTING.md
README.md
README.md
history.txt
history.txt
View all files
Repository files navigation
BattleTris
BattleTris is a two-player networked game based on Tetris. Players<br>collect money to purchase weapons, which in turn make the other<br>player's game more difficult. Examples of weapons include flipping the<br>opponent's screen upside down, swapping boards with your opponent,<br>"spying" on your opponent, giving your opponent disjointed pieces, etc.<br>Each player's record is maintained in a database, and players are<br>ranked based on their performance.
If a player wants to hone his or her<br>skills, he or she may also play the computer (though not for ranking).
History
BattleTris was written at Brown University as a CS32 final project in<br>spring 1994 by Bryan Cantrill, Charlie Hoecker and Mike Shapiro.<br>It was revived several times between 1994 and 2001, and then<br>exhumed in 2026 by Adam Leventhal. (A fuller history -- including<br>the inspiration for BattleTris in Wesleyan Tetris -- can be found<br>here.)
Requirements
BattleTris is a bit of a time<br>capsule of Unix on the desktop ca. 1994: it was originally written for<br>Solaris on SPARC, using X11 and<br>Motif.<br>This version works on both<br>MacOS (via XQuartz and OpenMotif)<br>and on Linux. To compile BattleTris, you should be able to<br>(more or less) run configure.
Note that BattleTris dates from a time that the highest resolution<br>monitors were 1600x1280; those on modern (higher resolution) displays<br>may find that the resolution of output needs to be manually lowered to<br>make the game playable.
To play against someone else, you will need to be able to directly<br>connect to one another's IP address, and each of you will need to connect<br>to a host running an instance of btserverd (which can be found in<br>usr/src/daemons). This keeps a player database that can be manipulated<br>with btref.
To play against the computer, you do not need to be networked at all;<br>run BattleTris -X.
Gameplay
After connection is established, each player begins by playing Tetris<br>normally. The difference is that in addition to the standard pieces,<br>there exists a die piece. This is a one block piece that has a value<br>from 1 to 6 pips. Whenever a player gets a line, his or her "funds" go<br>up by the number of pips in the line (it's important to note that a<br>"double" earns twice the number of pips in the double, a triple earns<br>triple, and a tetris earns quadruple). It is also important to note<br>that there is a small probability that the piece will be a one by one<br>happy face. Should the player get a line with the happy face on that<br>turn, their funds will increase by 150. If they miss, however, the<br>happy face will turn into a frown.
The opportunity to spend funds comes whenever the two players between<br>them get 20 lines. At this time, both players go to a weapons bazaar,<br>where they each purchase weapons to make the other's game more diffi‐<br>cult. Examples of weapons are flipping the opponent's screen upside-<br>down, giving them disjointed pieces, depriving them of long pieces, de‐<br>pleting opponent's funds, etc.
Once both players have left the bazaar, play continues. Players may<br>launch weapons by pressing the number key which corresponds to the num‐<br>ber of the weapon in the arsenal (which is displayed on-screen). The<br>weapon will last for a specific duration, measured in lines. Typical<br>durations range from 3 to 30 lines.
The first player to die loses.
Future directions
Graphics
The intent is to keep game play more or less as it was in ~1994,<br>including the use of Motif. It would be entirely reasonable to rewrite<br>BattleTris for modernity, of course, but this version will remain true<br>to its mid-1990s roots.
Networking
An entirely...