{"id":28762827,"url":"https://github.com/foxzool/last-stop","last_synced_at":"2026-04-30T06:32:59.193Z","repository":{"id":297378670,"uuid":"995277796","full_name":"foxzool/last-stop","owner":"foxzool","description":"Connect the city, master the flow","archived":false,"fork":false,"pushed_at":"2025-06-17T07:46:11.000Z","size":7465,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T06:32:50.529Z","etag":null,"topics":["bevy","bevy-game"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxzool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-03T08:34:23.000Z","updated_at":"2025-08-23T06:46:04.000Z","dependencies_parsed_at":"2025-06-05T08:03:19.996Z","dependency_job_id":null,"html_url":"https://github.com/foxzool/last-stop","commit_stats":null,"previous_names":["foxzool/last-stop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foxzool/last-stop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Flast-stop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Flast-stop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Flast-stop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Flast-stop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxzool","download_url":"https://codeload.github.com/foxzool/last-stop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Flast-stop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32457110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bevy","bevy-game"],"created_at":"2025-06-17T09:00:25.677Z","updated_at":"2026-04-30T06:32:59.175Z","avatar_url":"https://github.com/foxzool.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Last Stop - Bus Route Puzzle Game\n\nA bus route planning puzzle game built with the Bevy engine, where players place route segments to connect stations and\nhelp passengers reach their destinations.\n\n## 🎮 Game Overview\n\n### Core Gameplay\n\n- **Route Building**: Place and rotate bus route segments (straight, curves, T-junctions, etc.) on a grid map\n- **Passenger Transport**: Passengers travel from origin stations and need transfers to reach destinations\n- **Chain Reactions**: Each new route affects the entire traffic network's passenger flow distribution\n- **Smart Bus System**: Autonomous buses using advanced pathfinding algorithms\n\n### Key Features\n\n- 🚌 **Intelligent Bus System**: Buses automatically discover routes and operate\n- 🔄 **Dynamic Transfers**: Passengers can switch between different lines at transfer points\n- ⏱️ **Real-time Simulation**: Passengers have patience values requiring timely transport services\n- 🎯 **Diverse Objectives**: Multi-dimensional challenges including efficiency, cost, and time\n- 📊 **Detailed Analytics**: Complete passenger and operational data tracking\n\n## 🛠️ Technical Implementation\n\n### Architecture\n\n- **Bevy ECS**: Modular architecture based on Entity Component System\n- **Smart Pathfinding**: A* algorithm-driven route planning system\n- **State Management**: Complete game state and scene management\n- **UI System**: Responsive user interface and audio system\n\n### Core Systems\n\n1. **Route System** (`route_segment.rs`)\n    - 6 route segment types: straight, curve, T-split, cross, bridge, tunnel\n    - Dynamic rotation and connection validation\n    - Terrain restriction handling\n\n2. **Pathfinding System** (`pathfinding.rs`)\n    - A* algorithm implementation\n    - Multi-modal path calculation (walking, bus, transfer)\n    - Real-time path optimization\n\n3. **Bus System** (`bus_pathfinding_system.rs`)\n    - Intelligent route discovery\n    - Autonomous driving and station stops\n    - Dynamic passenger management\n\n4. **Passenger System** (`passenger_boarding_system.rs`)\n    - Smart boarding/alighting logic\n    - Waiting and riding state management\n    - Patience and satisfaction systems\n\n## 🎯 Level Design\n\n### Progressive Difficulty\n\n1. **Tutorial Level**: Learn basic operations and connection concepts\n2. **Transfer Challenge**: Master multi-route coordination and transfer mechanics\n3. **Network Optimization**: Find optimal solutions under constraints\n4. **Time Pressure**: Test quick response and adaptation abilities\n\n### Scoring System\n\n- **Base Points**: Complete basic objectives\n- **Efficiency Bonus**: Optimize transfer counts and path lengths\n- **Speed Bonus**: Complete challenges quickly\n- **Cost Bonus**: Save construction costs\n\n## 🕹️ Controls\n\n### Basic Operations\n\n- **Left Mouse**: Place selected route segment\n- **Right Mouse**: Rotate route segment\n- **Delete/X Key**: Remove route segment at cursor position\n- **WASD/Arrow Keys**: Move camera\n- **Mouse Wheel**: Zoom view\n- **Escape**: Pause/Resume game\n\n### Debug Hotkeys\n\n- **F1**: Show detailed debug information\n- **F2**: Passenger spawn statistics\n- **F3**: Manually spawn test passenger\n- **F4**: Smart bus route discovery\n- **F5**: Smart bus status debugging\n- **F6**: Passenger boarding system debug\n- **F7**: Passenger movement state details\n- **F8**: Connection system debug\n- **F9**: Score calculation debug\n- **F12**: Test game over interface\n\n## 🚀 Build and Run\n\n### System Requirements\n\n- Rust 1.75+\n- OpenGL/Vulkan compatible graphics card\n\n### Build Steps\n\n```bash\n# Clone repository\ngit clone \u003crepository-url\u003e\ncd bus-puzzle-game\n\n# Development build (includes debug features)\ncargo run --features dev\n\n# Release build\ncargo run --release\n```\n\n### Web Build\n\n```bash\n# Install trunk\ncargo install trunk\n\n# Build WASM version\ntrunk build --release\n```\n\n## 📁 Project Structure\n\n```\nsrc/\n├── main.rs                 # Main entry point\n├── bus_puzzle/             # Core game module\n│   ├── mod.rs              # Module exports\n│   ├── components.rs       # Game component definitions\n│   ├── config.rs           # Game configuration constants\n│   ├── level_system.rs     # Level system\n│   ├── pathfinding.rs      # Pathfinding algorithms\n│   ├── bus_pathfinding_system.rs  # Smart bus system\n│   ├── passenger_boarding_system.rs  # Passenger boarding system\n│   ├── connection_system.rs        # Connection validation system\n│   ├── interaction.rs      # Player interaction\n│   ├── ui_audio.rs         # UI and audio\n│   ├── debug_info.rs       # Debug information\n│   └── ...                 # Other system modules\n└── dev_tools.rs            # Development tools (dev only)\n```\n\n## 🎨 Assets\n\n### Texture Assets\n\n```\nassets/textures/\n├── routes/                 # Route segment textures\n│   ├── straight.png\n│   ├── curve.png\n│   ├── t_split.png\n│   └── ...\n├── stations/              # Station textures\n│   ├── bus_stop.png\n│   └── ...\n├── passengers/            # Passenger icons\n│   ├── red.png\n│   └── ...\n└── terrain/              # Terrain textures\n    ├── grass.png\n    └── ...\n```\n\n### Audio Assets\n\n```\nassets/audio/\n├── background_music.ogg\n├── place_segment.ogg\n├── passenger_arrive.ogg\n└── ...\n```\n\n## 🔧 Development Features\n\n### Debug System\n\n- Real-time connection status visualization\n- Passenger behavior tracking\n- Performance metrics monitoring\n- State machine debugging\n\n### Hot Reload\n\nThe game supports asset hot reloading for convenient development and debugging.\n\n### Extensibility\n\n- Modular component system\n- Configurable level data\n- Plugin-based feature extensions\n\n## 🎮 Game Mechanics Deep Dive\n\n### Chain Reaction System\n\n- **Passenger Flow Chains**: New routes redistribute passenger flows\n- **Transfer Chains**: Multi-route intersections create new travel possibilities\n- **Time Chains**: Bus intervals affect passenger waiting experience\n\n### Smart Buses\n\n- Uses passenger-validated pathfinding algorithms\n- Automatically discovers optimal operating routes\n- Dynamic turnaround and round-trip operations\n- Intelligent passenger loading and station stops\n\n### Passenger Behavior\n\n- Realistic waiting and riding states\n- Patience-based abandonment mechanism\n- Smart boarding/alighting decisions\n- Diverse travel demands\n\n## 📈 Performance Optimization\n\n- ECS architecture ensures efficient system updates\n- Intelligent path caching mechanisms\n- Optimized rendering pipeline\n- Memory-friendly resource management\n\n## 🤝 Contributing\n\nContributions are welcome! Please ensure:\n\n1. Follow existing code style\n2. Add appropriate documentation comments\n3. Include necessary test cases\n4. Update relevant documentation\n\n## 📄 License\n\nThis project is dual-licensed under:\n\n### Apache License 2.0 or MIT License\n\nYou may use this project under either license:\n\n- **Apache License 2.0** - See [LICENSE-APACHE](LICENSE-APACHE) file\n- **MIT License** - See [LICENSE-MIT](LICENSE-MIT) file\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as\ndefined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n## 🙏 Acknowledgments\n\n- [Bevy Engine](https://bevyengine.org/) - Excellent Rust game engine\n- Game design inspired by classic transport planning games\n\n---\n\nEnjoy building your bus empire! 🚌✨\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxzool%2Flast-stop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxzool%2Flast-stop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxzool%2Flast-stop/lists"}