Skip to content

About

A browser-based 2D urban transit driving simulator. Features realistic bus driving, passenger management, dynamic weather and day/night cycles.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

105 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸšŒ Nightline: Route Master

Urban Transit Simulator ยท v1.2.1

A browser-based bus driving simulation game where you navigate city routes, manage passengers, and maintain your bus while keeping everyone happy. Experience the challenge of urban transit with realistic driving mechanics, dynamic weather, and a full day/night cycle.

HTML5 CSS3 JavaScript Canvas


๐Ÿ“ธ Screenshots



Play the Game : ๐ŸŸขPLAY!

Download for free here : ๐Ÿ”ดDOWNLOAD!

Route Master Cover

A game by Akash Pramanik

Play on itch.io


๐ŸŽฎ Game Features

Core Gameplay

  • Realistic Bus Driving - Accelerate, brake, and navigate through city streets with authentic physics
  • Passenger Management - Pick up and drop off passengers at bus stops to earn points
  • Fuel Management - Monitor fuel levels and refuel at stops to keep running
  • Satisfaction System - Keep passengers happy by driving smoothly and obeying traffic rules
  • Dynamic Day/Night Cycle - Experience 8 time phases from midnight to night
  • Weather System - Drive through clear, rainy, snowy, and foggy conditions
  • Traffic Lights - Stop at red lights and proceed on green
  • Speed Limit Enforcement - Obey the 80 KM/H limit to avoid penalties

Visual & Audio

  • Immersive Cockpit View - Detailed bus dashboard with functional controls
  • Dynamic Minimap - Real-time overview showing route, stops, traffic lights, fuel, and satisfaction
  • Procedural Scenery - Parallax scrolling buildings, clouds, and road details
  • Weather Effects - Rain, snow, and fog particles with visual impact
  • Adaptive Audio - Engine sounds that respond to speed, braking, and game events
  • Video Intro - Cinematic introduction sequence

Game Mechanics

  • Scoring System - Earn points for picking up (+4) and dropping off (+8) passengers
  • Penalties - Lose points and satisfaction for missed stops (-300 points) and red light violations (-500 points)
  • Game Over Conditions - Run out of fuel or let satisfaction reach zero
  • Play Again - Instant restart functionality after game over

๐Ÿ“Š Game Elements

Element Description
๐ŸšŒ Bus Your vehicle - drive carefully and manage resources
๐Ÿšฆ Traffic Lights Green = Go, Red = Stop, Yellow = Prepare to stop
๐Ÿ›‘ Bus Stops Pick up and drop off passengers
โ›… Weather Clear, Rain, Snow, Fog (affects visibility)
๐ŸŒ… Day/Night Cycle 8 phases from Midnight to Night
๐Ÿ“ Minimap Shows route, stops, lights, fuel, satisfaction, speed
โ›ฝ Fuel 0-100%, refuel when stopped with R
๐Ÿ˜Š Satisfaction 0-100%, keep passengers happy
โš  Speed Limit 80 KM/H - don't exceed it!
๐Ÿ’ก Headlights Toggle with L for better night visibility

๐ŸŽฏ How to Play

1. Start Your Route

  • Click START ROUTE on the home screen
  • Press E to start the engine
  • Wait for the engine start sequence to complete

2. Drive the Bus

  • Accelerate with W or โ†‘
  • Brake with S or โ†“
  • Shift to Drive (D) to move, Neutral (N) to idle
  • Use turn signals before changing direction

3. Manage Passengers

  • Stop at every bus stop to pick up passengers (+4 points each)
  • Press 1 to request a stop, then stop to let passengers off (+8 points each)
  • Maximum capacity: 32 passengers

4. Monitor Resources

  • Fuel - Refuel at stops by pressing R (bus must be stationary)
  • Satisfaction - Keep above 0 by driving smoothly and obeying rules
  • Speed - Stay below 80 KM/H to avoid penalties

5. Follow Traffic Rules

  • Stop at red lights (-500 points, -10 satisfaction if violated)
  • Don't miss bus stops (-300 points, -15 satisfaction per missed stop)
  • Use headlights at night for better visibility

6. Survive

  • Don't run out of fuel (Game Over)
  • Don't let satisfaction reach 0 (Game Over)
  • Drive smoothly and efficiently for a high score

๐Ÿ•น๏ธ Controls

Desktop (Keyboard)

Key Action
E Start / Stop Engine
W or โ†‘ Accelerate (in Drive)
S or โ†“ Brake
D Shift to Drive
N Shift to Neutral
1 Request Stop (drop off passengers)
L Toggle Headlights
R Refuel (when stopped)
H Horn (hold)
โ† / โ†’ Turn Signals

Mobile (Touch Controls)

  • ACCEL pedal - Accelerate
  • BRK pedal - Brake
  • ENG - Start/Stop engine
  • DRV/NEU - Drive/Neutral gear
  • STP - Request stop
  • HEL - Headlights
  • REFUEL - Refuel (when stopped)
  • HRN - Horn
  • LFT/RGT - Turn signals

Note: Play in landscape mode for the best mobile experience.


๐Ÿ—๏ธ Project Structure

Route Master/
โ”œโ”€โ”€ index.html              # Main game HTML with UI overlays
โ”œโ”€โ”€ style.css               # Game styling and animations
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ images/             # Game sprites and icons
โ”‚   โ”‚   โ”œโ”€โ”€ icon.png
โ”‚   โ”‚   โ”œโ”€โ”€ cockpit.png
โ”‚   โ”‚   โ”œโ”€โ”€ 2074.png        # Bus model
โ”‚   โ”‚   โ””โ”€โ”€ [control icons]
โ”‚   โ””โ”€โ”€ media/
โ”‚       โ””โ”€โ”€ intro.mp4        # Video intro sequence
โ””โ”€โ”€ js/
    โ”œโ”€โ”€ config.js           # Game configuration and constants
    โ”œโ”€โ”€ utils.js            # Utility functions
    โ”œโ”€โ”€ entities.js         # Game entities (bus, stops, lights)
    โ”œโ”€โ”€ audio.js            # Audio system and sound effects
    โ”œโ”€โ”€ renderer.js         # Canvas rendering and drawing
    โ”œโ”€โ”€ controls.js         # Input handling (keyboard + touch)
    โ”œโ”€โ”€ game.js             # Core game logic and mechanics
    โ””โ”€โ”€ main.js             # Game initialization

๐Ÿš€ Getting Started

Prerequisites

  • A modern web browser (Chrome, Firefox, Edge, Safari)
  • No build process or dependencies required!

Installation

  1. Clone the repository:
git clone https://github.com/akash098p/Route-Master.git
cd Route-Master
  1. Open index.html in your web browser:
# Windows
start index.html

# macOS
open index.html

# Linux
xdg-open index.html

Or use a local server (recommended for best performance):

# Using Python 3
python -m http.server 8000

# Using Node.js
npx serve .

# Using PHP
php -S localhost:8000

Then navigate to http://localhost:8000 in your browser.


๐ŸŽจ Technical Details

Technologies Used

  • HTML5 Canvas - Rendering game graphics
  • Vanilla JavaScript - Game logic and mechanics
  • CSS3 - UI styling and animations
  • Web Audio API - Dynamic audio system
  • No external dependencies - Pure vanilla implementation

Key Systems

Game Loop

  • 60 FPS target using requestAnimationFrame
  • Delta time-based physics for consistent gameplay
  • Separate update and render cycles

Audio System

  • Real-time engine sound synthesis using Web Audio API
  • Dynamic frequency and gain based on bus speed
  • Context-aware sound effects (braking, horns, refueling, etc.)

Rendering

  • Parallax scrolling background
  • Dynamic lighting based on time of day
  • Weather particle systems (rain, snow)
  • Real-time minimap rendering

Input Handling

  • Keyboard input for desktop
  • Touch controls for mobile devices
  • Responsive button states and animations

๐ŸŽ“ Game Tips

For New Drivers

  1. Start Slow - Get used to the controls before driving fast
  2. Watch the Minimap - It shows everything you need to know
  3. Stop at Every Stop - Missing stops costs dearly
  4. Refuel Early - Don't wait until you're almost empty
  5. Use Neutral - Shift to N when stopped to save fuel

Advanced Techniques

  • Smooth Braking - Gradual stops maintain passenger satisfaction
  • Anticipate Lights - Slow down early for red lights
  • Plan Routes - Watch the minimap to prepare for upcoming stops
  • Night Driving - Use headlights and reduce speed in low visibility
  • Weather Awareness - Adjust driving style for rain, snow, and fog

๐Ÿ› Known Issues

  • Video intro may not autoplay on some mobile browsers (user interaction required)
  • Performance may vary on low-end devices during heavy weather effects
  • Touch controls require landscape orientation for optimal playability

๐Ÿ”ฎ Future Enhancements

  • Multiple bus routes and maps
  • Different bus models with varying characteristics
  • Passenger AI with unique behaviors
  • Multiplayer mode
  • Leaderboards and high scores
  • Achievement system
  • Customization options (bus skins, horns, etc.)
  • More weather effects and time variations
  • Traffic AI vehicles
  • Save/load game state

๐Ÿ“ Version History

v1.2.1 (Current)

  • Refined game balance and scoring
  • Improved satisfaction system
  • Enhanced audio feedback
  • Optimized performance

v1.2.0

  • Added fuel management system
  • Implemented satisfaction mechanics
  • Added headlights feature
  • Day/night cycle with 8 phases
  • Weather system (rain, snow, fog)
  • Dynamic minimap
  • Traffic lights with penalties
  • Speed limit enforcement
  • Mobile touch controls
  • Video intro sequence

๐Ÿ“„ License

This project is open source and available for educational and personal use.


๐Ÿ‘จโ€๐Ÿ’ป Developer

Akash Pramanik

For questions or support:


THE CITY IS YOURS ๐ŸšŒโœจ

Nightline: Route Master - Urban Transit Simulator

About

A browser-based 2D urban transit driving simulator. Features realistic bus driving, passenger management, dynamic weather and day/night cycles.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages