Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This software was written in the few weeks before the hunt.  And
during the hunt.

A note on groups: Both the web server and the Django management
commands should be run from the same group.

Don't forget to add the following to your crontab, set to run every minute:
  python release
  python release_production_stuff (if using the mh2012 app )

This is designed to be run behind Apache.  Apache will handle
authentication, using htaccess files generated by prestart (or start)

A sample apache config is in the file apache-config.

(1) Puzzle files live in PUZZLE_PATH -- one per directory.  They get
symlinked into TEAM_PATH upon unlock.

(2) Puzzles live in the database in the solving_puzzles table.  Their
ID is generated by hashing their pony name.

Pony name?  Yeah, every puzzle has an associated My Little Pony.
Inspired, of course, by The Sport of Princesses from 2011.

But there's (almost) a good reason for this -- it allows puzzles to be
swapped by changing the title without changing the pony name.

(3) Terminology:

Points (solving_team.score, "chutzpah", in 2012) are a pure function
of the number of solves (plus the number of productions produced;
sorry for that encapsulation breakage).

Event points ("bupkis", in 2012) are used for buying answers.

An unlock batches is a set of puzzles that is released at the same
time.  Metapuzzles should be released before their associated puzzles,
so that the index pages are populated.

(4) Relevant URLs are:

For solvers, simply going to / and logging in with their
username/password will show their team's index.  This is set up by prestart (intended to be run at ~ 11:00 the day of the hunt)
and start (run at ~12:30, to actually start the hunt).

Also for solvers, /callin?puzzle=ID_of_puzzle
gives an appropriate callin page.  Of course, we'll need to template
that a bit.  /contact_hq gives a general callin page with
a list of specific reasons that someone might want to call in.

We also generate a bunch of javascript:

points.js shows the number of points and unlock points a team has, as
well as the number of minutes that will be gained by a successful solve.

solved.js includes a map from id to title and title to id.

release.js is a symlink to release-nnnn.js, where nnnn is the most
recently released unlock batch.  release-nnnn.js is generated

team-data.js is used by the appengine framework; please see the
documentation there.

achievements.js is used by the achievement system.  This didn't get
used in 2012; the notion was that we would use it for "award
nominations", but (a) we weren't organized enough and (b) it's hard to
coordinate a policy on which things are awardable.  Maybe you'll use

Event points can be also seen on the callin page, where they are used
to buy answers.

(5) Admins (those logged in as ADMIN_NAME/ADMIN_PASSWORD)
are treated a bit differently.  They can't see the hunt, but they can
see the admin site.

Django has its own user and permissioning system; it is recommended that
there be few superusers and many plain users.

The admin interface is at /dynamic/admin .  This lets admin users mark
requests as handled.

When a correct answer is called in and marked as handled, the release
function (in is called -- this lets the software release
puzzles according to the release rules.

Admins can also track teams' progress on the big board at
/dynamic/admin/board .  That won't really show much until there are
some puzzles and metapuzzles in the database.  For each team, it shows
each meta, in green if solved, with the number of round puzzles solved
for that round.  For matrixed metas, it would be nice if it also showed
the number of matrixed puzzles solved, but that broke at some point.

The admin site supports physical object distribution, answer callin, and
general request callin, as well as puzzle admin.

It would be nice if future versions did scheduling for various events

(6) Event point tokens: During the 2012 hunt, these failed.  But I
think I have since fixed the code.  python
generate_event_codes will generate some images and HTML in /tmp/codes
; print it and cut on the dotted lines.  Um, don't call it bupkis.

(7) The design of the system is intended to be simple and relatively
robust.  In case of emergency or error, you may manually frob the
database and/or the team directories.  We did this a number of times
during the 2012 hunt.