Skip to content

zidlera/Traffic-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Traffic Flow Maestro

Traffic Flow Maestro is a browser-based traffic control puzzle inspired by the Commodore 64 classic Traffic. The entire experience lives inside index.html with inline HTML, CSS, and JavaScript.

How to run

Because the project relies on browser APIs like localStorage and audio unlocking gestures, it is best served over HTTP. From the repository root run:

python3 -m http.server 8000

Then open your browser at http://localhost:8000/index.html and click the Start button to begin.

Controls

  • Left click a traffic light to cycle through phases.
  • Shift + Click forces red; Ctrl + Click requests green (only when safe).
  • P toggles pause, R restarts the level, N advances after success.
  • Bottom HUD buttons provide mouse-accessible equivalents, including mute and debug toggles.

Saving & determinism

The game persists highscores and mute preferences via localStorage. Gameplay randomness comes from a seedable PRNG – adjust the seed in the top-right HUD for deterministic sessions.

License

Released under the MIT License.

About

A browser based traffic light game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages