This project renders a simple Timberman-style game using only HTML (no JS/CSS at runtime). The page is generated from a Jinja template and uses HTML popovers and buttons to drive the flow between frames.
- Install dependencies
pip install -r requirements.txt- Generate the page and frame copies:
python3 create_game.pyThis will:
- Generate a valid tree sequence
- Clear and repopulate
static/game_frame_copies/with per-step GIF copies - Render
index.htmlfromtemplates/game.html
- Serve the site locally (any static server works). For example:
python3 -m http.server 8000Then open http://localhost:8000 in your browser.
- Tree rules: A string of characters is generated to represent the tree. Possible characters include
N(no branches),L(branch on left), andR(branch on right). The generated tree string starts and ends withN. EveryLorRis separated byN(no adjacent L/R). - Sequence structure: For each step
i(except the final victory frame), the generator builds:
sequence[i] = [
[correct_button, main_gif_basename],
[wrong_button, death_gif_basename]
]The template uses this to decide which popover to show next and which GIF to display. Main frame GIFs are copied to static/game_frame_copies/ as <basename>_<i>.gif.
- Source frame GIFs:
static/game_frames/ - Per-run copied frames:
static/game_frame_copies/(auto-cleared/repopulated) - Template:
templates/game.html - Output page:
index.html
This project is an educational, non‑commercial recreation. All credit for the original Timberman concept, design, and assets goes to the creators of Timberman. No ownership is claimed over the original IP, and this project is not used for monetary gain.