3.5 KiB
3.5 KiB
🚂 Railtrack Pro
A web-based railway construction game featuring track building, junctions, signals, and 3D driver's eye view.
✨ Features
- 🚂 Track Pieces: Straight, curved, junction, and signal tracks
- 🌍 World Grid: Interactive grid system for precise placement
- 🎮 Construction Interface: Click-to-place track building
- 👁️ 3D View: Full 3D driver's eye view with camera controls
- 🔌 Junction Logic: Connect multiple tracks at junctions
- 🚦 Signal System: Railway signals for traffic control
- 💾 Save/Load: Game state persistence (coming soon)
- 🎨 Visual Effects: Dynamic lighting and shadows
🏗️ Project Structure
railtrack_pro/
├── index.html # Main HTML entry point
├── css/
│ └── styles.css # Application styles
├── js/
│ ├── app.js # Main application logic
│ ├── renderer.js # Three.js renderer
│ ├── tracks.js # Track piece definitions
│ ├── world.js # Grid and world management
│ └── game.js # Game state and controls
├── assets/
│ ├── textures/ # Track textures (TBD)
│ └── models/ # 3D models (TBD)
├── test/
│ └── unit/ # Unit tests (TDD)
├── PLAN.md # Development plan
└── README.md # This file
🚀 Getting Started
Requirements
- Modern web browser (Chrome, Firefox, Safari, Edge)
- WebGL 2.0 support
- No server required - works as local file
Installation
- Clone or download this repository
- Open
index.htmlin your browser - Start building your railway empire!
Development Setup
# Navigate to project directory
cd /a0/usr/projects/railtrack_pro
# View development plan
cat PLAN.md
# Open in browser
open index.html # Mac
x-www-browser index.html # Linux
🎮 Controls
| Control | Action |
|---|---|
| Mouse Wheel | Zoom in/out |
| Left Drag | Rotate camera |
| Right Drag | Pan camera |
| Click Track | Remove track |
| Click Viewport | Place selected track |
| Track Buttons | Select track type |
🛠️ Development
Technology Stack
- Frontend: HTML5, CSS3, JavaScript ES6+
- 3D Rendering: Three.js
- No Build System: Vanilla JavaScript
- Testing: TDD approach (Jest planned)
Code Style
- TDD First: Test before implementation
- Well Documented: JSDoc comments throughout
- Clean Code: Follows SOLID principles
- Modular: Class-based architecture
Adding Features
- Create test file in
test/unit/ - Implement feature in
js/ - Update documentation
- Run tests to verify
📜 License
MIT License - See LICENSE file for details
🤝 Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
📝 Version History
- 0.1.0 - Initial prototype with basic track system
- Coming Soon: Driver's eye view, signal logic, save/load
🙏 Acknowledgments
- Three.js for amazing 3D rendering
- Railway enthusiasts for inspiration
Built with ❤️ for railway simulation | 2026 Railtrack Pro Development Team