TetriNET is a multiplayer falling-blocks game. Up to six players connect to a server and play the typical falling-blocks game; when lines are cleared, some blocks randomly turn into "special blocks," which can be used to assail your opponents (add a garbage line, remove random blocks, cause an "explosion" around special bomb blocks, switch block fields with another player) or save yourself from impending doom (consolidate your blocks, totally clear your block field, switch block fields with another player). The default theme is a little annoying because it identifies the blocks by letter, so I made a theme that uses colors and symbols to tell them apart instead. But that's not what this is about.
I'm using Andrew Church's Linux console version to run a server on a friend's machine for a few friends, but the games keep coming down between me and a particular friend who's played the game for quite a while; the person who introduced us to the game, actually. They just go on and on while we use our special blocks to get out of, so these long games would get really boring for anyone else who happened to want to play: they'd just sit there, watching. Fortunately the Windows client/server author st0rmcat found this problem too, so in 1.1a beta added a feature where, after a certain number of minutes, the server would start giving people garbage lines. Unfortunately, I'm running the server on a friend's Linux box, not st0rmcat's original Windows software, so we didn't have this feature.
But the Linux console version is public domain--so I added it. The lines and blocks marked with /*mp*/ are the ones I changed; you still need the other code from Andrew Church. Unarchive it and drop my server.c in, then make tetrinet or make tetrinet-server and it's all good. It'll default to one minute before adding lines (which is actually too short--the Windows version defaults to five) and 10 seconds between adding lines (which is the Windows TetriNET's default), but you can add an addlineswhen minutes_before seconds_between line to your .tetrinet configuration file to say how long to wait.
The only problem is, at least in the Windows client, it doesn't give a name for from whom the extra lines come. Somehow the Windows client can say it comes from the server... but since I don't have access to the source, and can't get the ports worked out for my one machine (maybe I can do VMware magic, but not tonight), I don't know how it does it. So hopefully there aren't any clients it'll actually outright crash.
Comments
comment
If it’s helpful — if you want to run the Windows server at some point, you and I can play a game and I’ll just tcpdump the output to see what it sends out.