DRUID Development Docs: codes.txt

File: codes.txt

TYPES OF CODES
--------------
arrival codes   - attached to puzzle in plaintext
success codes   - part of solution to puzzle
failure codes   - over telephone if they give up
routing codes   - over telephone to bypass one or more clues


ARRIVAL CODES: 5 digits
-----------------------
        location where found
        puzzle being solved
        boolean: if location has a transmitter

SUCCESS CODES: 6 digits
-----------------------
        puzzle being solved
        destination location

FAILURE CODES: 6 digits
-----------------------
        puzzle failed
        location encoded in failed puzzle
        destination location where they will be sent
        boolean: if destination location has a transmitter

ROUTING CODES: 7 digits
-----------------------
        new destination where they are being sent
        boolean: if location has a transmitter




loc: 5 bits (32 possibilities)
puz: 5 bits (32 possibilities)
htx: 1 bit

A-Z0-9 = 36 choices
4 chars = 1.6*10^6  ~=  20 bits
5 chars = 6.0*10^7  ~=  25 bits
6 chars = 2.2*10^9  ~=  31 bits
7 chars = 7.8*10^10 ~=  36 bits


arrival4 = loc+puz+htx      = 5+5+1     = 11  20-ll=9  bits random
arrival5 = loc+puz+htx      = 5+5+1     = 11  25-ll=14 bits random
arrival6 = loc+puz+htx      = 5+5+1     = 11  31-ll=20 bits random
success  = loc+puz          = 5+5       = 10  31-10=21 bits random
failure  = loc+loc+puz+htx  = 5+5+5+1   = 16  31-16=15 bits random
routing  = loc+htx          = 5+1       =  6  31- 6=25 bits random



9  bits = 512
14 bits = 16384
20 bits = 10^6


arrival4
    random for location
    + puzzle * 0x05 0x03 0x02 0x01
    + htx    * 0x01 0x04 0x80 0x20

arrival5
    random for location
    + puzzle * 0x04 0x05 0x03 0x02 0x01
    + htx    * 0x02 0x01 0x04 0x80 0x20

arrival6
    random for location
    + puzzle * 0x01 0x04 0x05 0x03 0x02 0x01
    + htx    * 0x07 0x02 0x01 0x04 0x80 0x20

success6
    random for location
    + puzzle * 0x01 0x04 0x05 0x03 0x02 0x01

failure6
    random for location
    + puzzle * 0x05 0x03 0x02 0x01
    + htx    * 0x01 0x04 0x80 0x20

routing7
    random for location
    + htx    * 0x01 0x04 0x80 0x20





LOCATIONS
---------
store:  name of location
        puzzle at location
        if location has transmitter
        next location (implied by order?)
dstore: actual puzzle at location
        time arrived (actually stored as time found for puzzle)
        previous location
        next location



PUZZLES
-------
score = MAX(minscore, at^2 + bt + c)
(score = 0 if failed)
t is in minutes
store:  name of puzzle (before puzzle is solved)
        name of puzzle (after puzzle is solved) (needed?)
        description of puzzle
        a,b,c,minscore for score
        hints and time for hint release (optional)
        location where puzzle is expected to be found (needed?)
        location where puzzle is expected to send them (needed?)
dstore: time found
        time solved
        location where found



This file Copyright (C) 2004 by Nathan (Acorn) Pooley
Go to DRUID Development page
Go to DRUID page
Go to JU Gadgets page
Go to Justice Unlimited homepage
Go to Acorn's personal webpage
Contact Acorn
See comments from others
Post your own comments
File created by do_doc at Wed Aug 4 18:08:32 2004