DAILY BLOCKS v2026.10.9.4
A daily falling-block challenge door all BBS systems
alexcorris@outlook.com bbswordle.com https://bsky.app/profile/bbswordle.com
======================================================================

Every day the door deals ONE board.  Every caller gets exactly the same
pieces, in the same order, in the same starting well, and one try at it.
Best score wins the day; scores add up over the month and all-time.
Missed days can be made up from the calendar while they are still open,
and late in each month the rest of that month can be played ahead.

BBSes can also play each other: point the door at a Daily Blocks league
server and every BBS in the league gets the same boards and one shared
set of scoreboards.  See INTERBBS LEAGUES below, and LEAGUE.TXT if you
want to host a league yourself.

As long as it's up, you can use bbswordle.com as your inter-bbs
League game!

RUNNING
----------------------------------------------------------------------

  Use the correct exe for your system, chmod +x for Linux style installs

  dblocks                      Linux
  dblockspi		       Linux ARM Systems (Raspberry Pi)
  dblocks.exe		       MS-DOS
  dblocksW32.exe               Windows 32-bit
  dblocksW64.exe               Windows 64-bit

  dblocks -D<path>DOOR32.SYS        (or DOOR.SYS, DORINFOx.DEF, BBSDEV.DRP)
  dblocks -N<node> -S<socket>
  dblocks -L                        local mode, asks for a name
  (no -D and BBSDEV_DRP set in the environment also works)

Extra switches:

  -U           local mode on Linux: send UTF-8 instead of CP437 so the
               blocks look right in a modern terminal
  -PName       local mode: log in as Name without the prompt (_ = space)
  -TYYYYMMDD   pretend today is that date - for testing only

The door needs ANSI and an 80x24 (or bigger) screen.  Players are
identified by alias (real name if the drop file has no alias).
All data lives in the directory the executable is in, wherever the BBS
happens to run it from.


DBLOCKS.INI
----------------------------------------------------------------------
  PiecesPerDay=50     pieces in each board (20-500)
  MakeupDays=30       how many days back a missed board stays open
                      (0 = no make-ups)
  PlayAheadDay=22     from this day of each month, the rest of that
                      month can be played ahead (0 = never, 1 = the
                      whole month is open from the 1st)
  SpecialBoards=1     1 = some days start with blocks in the well
  BoardSeed=<number>  this BBS's own number; picked at random on first run
  StartDate=YYYYMMDD  first day of play; set automatically on first run

PiecesPerDay, SpecialBoards and BoardSeed change the boards themselves.
Pick PiecesPerDay and SpecialBoards once and leave BoardSeed alone.  If
any of them changes later, old and new scores are not comparable.

YOUR BOARDS ARE YOURS.  The board for a day comes from the date plus
BoardSeed.  Every caller on your BBS gets the same pieces and the same
starting well that day; a caller on somebody else's Daily Blocks gets
something different, because that BBS drew a different number.  Nobody
can practise today's board on another system.

The number is drawn the first time the door runs and written to
dblocks.ini.  If two or more BBSes ever WANT identical boards (a
league, say), they can agree to use the same BoardSeed, PiecesPerDay
and SpecialBoards.

  BoardSeedFrom=YYYYMMDD   only appears on an install that already had
                           scores when BoardSeed was first drawn

Boards dated before BoardSeedFrom keep the original pieces, so a
make-up day is still the same board for the callers who play it late
as it was for those who played it on time.  Do not change it.

StartDate is the day the door first ran, so a brand-new install has no
make-up days yet.  Set it earlier if you want to open past days.

PLAYING AHEAD.  From PlayAheadDay to the end of each month, every
remaining day of THAT month can be played early from the calendar - so
a caller who will be away over the 30th and 31st can finish the month
before leaving, but nobody can clear a month out on day 1.  Next month
never opens early.  PlayAheadDay can be changed at any time; it does
not touch the boards or any score already on file.

A score played ahead is SEALED until its own day arrives: it is banked
in dblocks.dat and its owner sees it on the calendar, but it is left
off every scoreboard, standing, record, streak and "score to beat"
until that date.  On the day it simply appears, marked "early".  So
the scoreboards always read "as of today", and nobody can tell how
beatable a day is before it has been dealt.

INTERBBS LEAGUES
----------------------------------------------------------------------
JOINING.  Get the server's address from whoever runs the league, then
in dblocks.ini set

  InterBBS=1
  LeagueServer=bbswordle.com        (add :port if they say so)
  BBSName=Your BBS Name

and that is it.  The next caller's door says hello to the server, and
the server hands back the league's board number and rules; the door
writes them into dblocks.ini by itself.  Nobody has to agree on a
number, and nothing needs opening on your side - the door only makes
outgoing connections (TCP, port 3255 unless told otherwise).  Windows
and Linux builds only; the MS-DOS build stays local.

WHEN IT STARTS.  A league has a first day, set by its host - often the
1st of the month.  On a new install, league boards begin on that day,
so your callers can make up every day the league has dealt so far (as
far back as its make-up rule allows) and those scores count in the
league like any other.

On a BBS that has already been played, days your callers have played
keep the boards they were played on, and league boards begin the day
after the last such day: tomorrow if someone has played today, later if
someone has played ahead.  The home screen says when.  Your local
history is untouched and stays on the local scoreboards.  (If you would
rather have the league's back days than your old scores, delete
dblocks.dat before the next caller comes in.)

WHAT THE LEAGUE DECIDES.  The boards (seed, pieces per day, special
boards) and the two rules that affect fairness: how far back a day can
be made up, and the play-ahead day.  While InterBBS=1 the league's
MakeupDays and PlayAheadDay are used instead of your own.

WHAT CALLERS SEE.  Once league boards have started, everything about a
league day - the leader on the home screen, the score to beat, your
place - is league-wide, and the scoreboards open on the league, each
row showing the player and the BBS.  L on the scoreboards switches
between the league and this BBS's own scores, for the rest of the call.
A tie goes to the quicker game, on every BBS alike.

B on the scoreboards is BBS vs BBS: one line for every BBS in the
league, ranked for the month.  A BBS's score for a day is the BEST game
any of its callers played on that day's board, and its month is those
added up.  So a BBS is not on top simply for having the most callers:
one good player who turns up every day keeps a small board in the race,
a missed day costs a whole day, nobody can pull their own BBS down by
playing, and anybody can be the one who lifts it.  Beside the score:

  Days      days this month the BBS put up a score
  Wins      days its best game was the best in the league
  Players   callers who played this month
  Games     boards they played between them
  Average   their average game (every game, not just the best ones)

, and . look at other months; B or ESC goes back to the players.  A BBS
that has joined and not scored yet is listed too.

BBS NAMES ON SCREEN.  League rows trade a lesser column for the BBS
name, and the columns are narrower than the 30 characters a name may
have.  A name that does not fit its column first loses a leading "The",
and is then cut: "The Underground Railroad BBS" in a 20 column space
reads "Underground Railroad".  A name that fits is shown as it is.  The
tightest spot is the Records board, at 16 characters.

IF THE SERVER IS DOWN.  The game carries on.  The door keeps everything
it has collected in dblocks.lgr and shows that, with a note on the home
screen; your own callers' scores are always there because they come
from your own play file.  It tries the server again five minutes later
and posts whatever was waiting.  A caller never waits more than a few
seconds on the network: about three if the server does not answer, and
then not again for five minutes.

WHEN SCORES MOVE.  When a caller enters the door, comes back to the
menu, opens the scoreboards or finishes a board - at most every two
minutes unless there is a score to post.  A score played ahead stays
sealed on your BBS and is posted on its day.

THINGS TO KNOW
* Same boards on every BBS means a caller could look at today's pieces
  on one BBS and then play them on another.  The door cannot prevent
  that; every league row shows handle and BBS so it can be seen.
* Scores are reported by each BBS's door.  The server refuses
  impossible ones but has to trust the rest.
* Your BBS name is yours once joined: the server gave your door a key
  (LeagueKey in dblocks.ini) and will not accept the name without it.
  Lose the key and the league's host has to release the name.
* To change your BBS's name, change BBSName; the league follows.
* To leave, set InterBBS=0.  Your callers keep the boards they have
  been playing (the door goes on dealing the league's boards); it just
  stops swapping scores.  Leave the League... lines where they are.

HOW IT PLAYS
----------------------------------------------------------------------
Default keys
           Left/Right (A D, 4 6) move      Up (W X, 5) rotate
           Z rotate back                   Down (S, 2) soft drop
           Space (8) hard drop             C or H hold / swap
           G ghost on/off   P pause        Q or Esc quit the board

Each caller can change these from "Keys & Controls" on the main menu:
ten actions, up to four keys each.  A key can only do one thing, so
giving it to a new action takes it away from the old one.  The set is
saved per caller in dblocks.key and comes back at every logon; the
in-game help line and the How to Play screen show the caller's own
keys.  ESC always quits a board whatever is set.  Only the in-game
keys can be changed - menus, calendar and scoreboards are fixed.

Scoring    Single 100, Double 300, Triple 500, Tetris 800 - times level
           +50 x level for each extra clear in a row (combo)
           Soft drop 1 per row, hard drop 2 per row
           Whole well emptied: +2,000
           All pieces placed: +1,000, plus 50 per empty row left
           Level goes up every 10 pieces and the pieces fall faster

Boards     Classic    empty well
           Rubble     3-5 junk rows on the floor, with gaps
           Scatter    10-16 stray blocks in the lower well
           Pillars    3-4 stone columns
           Deep Well  4-6 packed rows with one open shaft
           Roughly 45% of days are Classic.

The piece order is a shuffled-bags-of-seven sequence seeded from the
date and BoardSeed, so the same date gives the same board on every
node of your BBS, whatever platform the door was built for.


RULES WORTH KNOWING
----------------------------------------------------------------------
* One try per board.  The board is claimed the moment the pieces start
  falling, and the score is written to disk after EVERY piece.  Quit,
  hang up, time out or get the door killed: the score so far stands and
  the day is used.  Nobody gets to see the pieces twice.

* Pausing (and the quit prompt) hides the well, the next pieces and the
  hold piece.

* Make-ups count in full - for the day's ranking, the month, streaks,
  everything.  That means a day's winner can still change until its
  make-up window closes; the scoreboards mark such days "open".

* Hitting Play when today is done offers your open make-up days and
  any days open for playing ahead, or tells you to come back tomorrow
  if there are none (and, before PlayAheadDay, when play-ahead opens).

* Playing ahead follows the same one-try rule, counts in full once its
  day arrives, and keeps a streak going while you are away.

* Whatever piece is on hold when the bag runs out must still be played.

* A tie on a day goes to the quicker game.

SCOREBOARDS
----------------------------------------------------------------------
  1 Day        ranking for any single board
  2 Winners    who won each day of a month
  3 Month      monthly standings (total, days, wins, average, best)
  4 Champs     the champion of every month
  5 All-Time   lifetime standings
  6 Top Days   the 50 highest single boards ever
  7 Records    hall of records + the caller's own numbers

Left/Right switches board, , and . move through days or months.
Any list longer than the screen scrolls: Up/Down a line at a time,
PgUp/PgDn (or Space) a page, Home/End to the ends.


MAINTENANCE
----------------------------------------------------------------------
Delete dblocks.dat to wipe all scores.

Do not delete dblocks.ini on a BBS that is in use: BoardSeed lives
there.  Without it the door draws a new number that takes effect from
the next day, and any older day still open for make-ups goes back to
the original board set - not the one your callers already played.
Keep a copy of the BoardSeed line with your backups.

Delete dblocks.key to put every caller back on the default keys.
A stale dblocks.lck directory after a crash is harmless; the door takes
it over after three seconds.

DO NOT change the random number code once the door is in use:
Every past board would become a different one.

