mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 07:55:11 +08:00
引入项目基础目录结构,包含多语言支持、主要页面与组件、核心游戏逻辑、UI 组件库、加密与本地持久化、自动化 Docker 构建流程、GitHub issue 模板(中英文)、README(中英文)、LICENSE 及开发配置文件。实现 OGame 单机版主要功能模块,为后续开发和扩展奠定基础。
242 lines
9.2 KiB
Markdown
242 lines
9.2 KiB
Markdown
<div align="center">
|
|
<img src="public/logo.svg" alt="OGame Vue TS Logo" width="128" height="128">
|
|
|
|
# OGame Vue TS
|
|
|
|
A modern web-based implementation of the classic OGame space strategy game, built with Vue 3 and TypeScript.
|
|
|
|
[](https://creativecommons.org/licenses/by-nc/4.0/)
|
|
[](https://vuejs.org/)
|
|
[](https://www.typescriptlang.org/)
|
|
[](https://vitejs.dev/)
|
|
|
|
</div>
|
|
|
|
## 📖 About
|
|
|
|
OGame Vue TS is a single-player, browser-based space strategy game inspired by the classic OGame. Build your empire across the galaxy, research technologies, construct ships, and engage in epic space battles. This project is built with modern web technologies, offering a smooth and responsive gaming experience entirely in your browser with local data persistence.
|
|
|
|
## ✨ Features
|
|
|
|
- 🌍 **Multi-language Support** - Available in 6 languages: English, Chinese (Simplified & Traditional), German, Russian, and Korean
|
|
- 🏗️ **Building Management** - Construct and upgrade various buildings on planets and moons
|
|
- 🔬 **Research Technologies** - Unlock advanced technologies to enhance your empire
|
|
- 🚀 **Fleet Management** - Build ships, send missions, and engage in tactical space battles
|
|
- 🛡️ **Defense Systems** - Deploy defensive structures to protect your colonies
|
|
- 👨✈️ **Officers System** - Recruit officers to gain strategic advantages
|
|
- ⚔️ **Battle Simulator** - Test combat scenarios before committing resources
|
|
- 🌌 **Galaxy View** - Explore the universe and interact with other planets
|
|
- 💾 **Local Data Persistence** - All game data is encrypted and stored locally in your browser
|
|
- 🌓 **Dark/Light Mode** - Choose your preferred visual theme
|
|
- 📊 **Queue Management** - Manage multiple build and research queues
|
|
- 🌙 **Moon Generation** - Chance-based moon creation from debris fields
|
|
|
|
## 🛠️ Tech Stack
|
|
|
|
- **Frontend Framework:** [Vue 3](https://vuejs.org/) with Composition API (`<script setup>`)
|
|
- **Language:** [TypeScript](https://www.typescriptlang.org/) with strict type checking
|
|
- **Build Tool:** [Vite](https://vitejs.dev/) (Custom Rolldown-Vite 7.2.5)
|
|
- **State Management:** [Pinia](https://pinia.vuejs.org/) with persisted state plugin
|
|
- **Routing:** [Vue Router 4](https://router.vuejs.org/)
|
|
- **UI Components:** [shadcn-vue](https://www.shadcn-vue.com/) (New York style)
|
|
- **Styling:** [Tailwind CSS v4](https://tailwindcss.com/) with CSS variables
|
|
- **Icons:** [Lucide Vue Next](https://lucide.dev/)
|
|
- **Animations:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
|
|
- **Internationalization:** Custom i18n implementation
|
|
- **Encryption:** [CryptoJS](https://cryptojs.gitbook.io/) for data security
|
|
|
|
## 🚀 Quick Start
|
|
|
|
### Prerequisites
|
|
|
|
- [Node.js](https://nodejs.org/) (version 18 or higher recommended)
|
|
- [pnpm](https://pnpm.io/) (version 10.13.1 or higher)
|
|
|
|
### Installation
|
|
|
|
```bash
|
|
# Clone the repository
|
|
git clone https://github.com/setube/ogame-vue-ts.git
|
|
|
|
# Navigate to project directory
|
|
cd ogame-vue-ts
|
|
|
|
# Install dependencies
|
|
pnpm install
|
|
```
|
|
|
|
### Development
|
|
|
|
```bash
|
|
# Start development server (runs on port 25121)
|
|
pnpm dev
|
|
```
|
|
|
|
Open your browser and visit `http://localhost:25121`
|
|
|
|
### Build for Production
|
|
|
|
```bash
|
|
# Build the application
|
|
pnpm build
|
|
|
|
# Preview production build
|
|
pnpm preview
|
|
```
|
|
|
|
## 📁 Project Structure
|
|
|
|
```
|
|
ogame-vue-ts/
|
|
├── public/ # Static assets
|
|
│ └── logo.svg # Application logo
|
|
├── src/
|
|
│ ├── assets/ # Dynamic assets
|
|
│ ├── components/ # Vue components
|
|
│ │ └── ui/ # shadcn-vue UI components
|
|
│ ├── composables/ # Vue composables
|
|
│ ├── config/ # Game configuration
|
|
│ ├── lib/ # Utility libraries
|
|
│ ├── locales/ # i18n translation files
|
|
│ ├── logic/ # Game logic modules
|
|
│ │ ├── buildingLogic.ts
|
|
│ │ ├── buildingValidation.ts
|
|
│ │ ├── fleetLogic.ts
|
|
│ │ ├── moonLogic.ts
|
|
│ │ ├── moonValidation.ts
|
|
│ │ ├── researchLogic.ts
|
|
│ │ ├── researchValidation.ts
|
|
│ │ ├── shipLogic.ts
|
|
│ │ └── shipValidation.ts
|
|
│ ├── router/ # Vue Router configuration
|
|
│ ├── stores/ # Pinia state stores
|
|
│ ├── types/ # TypeScript type definitions
|
|
│ ├── utils/ # Utility functions
|
|
│ ├── views/ # Page components
|
|
│ │ ├── OverviewView.vue
|
|
│ │ ├── BuildingsView.vue
|
|
│ │ ├── ResearchView.vue
|
|
│ │ ├── ShipyardView.vue
|
|
│ │ ├── DefenseView.vue
|
|
│ │ ├── FleetView.vue
|
|
│ │ ├── GalaxyView.vue
|
|
│ │ ├── OfficersView.vue
|
|
│ │ ├── BattleSimulatorView.vue
|
|
│ │ ├── MessagesView.vue
|
|
│ │ └── SettingsView.vue
|
|
│ ├── App.vue # Root component
|
|
│ ├── main.ts # Application entry point
|
|
│ └── style.css # Global styles
|
|
├── .github/
|
|
│ └── ISSUE_TEMPLATE/ # GitHub issue templates
|
|
├── CLAUDE.md # AI assistant instructions
|
|
├── LICENSE # CC BY-NC 4.0 License
|
|
├── package.json # Project dependencies
|
|
├── tsconfig.json # TypeScript configuration
|
|
└── vite.config.ts # Vite configuration
|
|
```
|
|
|
|
## 🌐 Available Languages
|
|
|
|
- 🇺🇸 English
|
|
- 🇨🇳 简体中文 (Simplified Chinese)
|
|
- 🇹🇼 繁體中文 (Traditional Chinese)
|
|
- 🇩🇪 Deutsch (German)
|
|
- 🇷🇺 Русский (Russian)
|
|
- 🇰🇷 한국어 (Korean)
|
|
|
|
## 🎮 Game Features
|
|
|
|
### Resource Management
|
|
- **Metal** - Primary construction material
|
|
- **Crystal** - Advanced technology component
|
|
- **Deuterium** - Fuel and research resource
|
|
- **Dark Matter** - Premium resource
|
|
- **Energy** - Powers your facilities
|
|
|
|
### Building Types
|
|
- **Resource Buildings** - Metal Mine, Crystal Mine, Deuterium Synthesizer, Solar Plant
|
|
- **Facilities** - Robotics Factory, Shipyard, Research Lab, Storage facilities
|
|
- **Special Buildings** - Nanite Factory, Terraformer, and more
|
|
|
|
### Technologies
|
|
- **Energy Technology** - Improves energy efficiency
|
|
- **Laser Technology** - Enhances weapon systems
|
|
- **Ion Technology** - Advanced propulsion and weapons
|
|
- **Hyperspace Technology** - Enables faster travel
|
|
- **Plasma Technology** - Ultimate weapon systems
|
|
- And many more...
|
|
|
|
### Ship Classes
|
|
- **Civil Ships** - Small/Large Cargo, Colony Ship, Recycler
|
|
- **Combat Ships** - Light/Heavy Fighter, Cruiser, Battleship, Bomber
|
|
- **Special Ships** - Deathstar, Battlecruiser, Destroyer
|
|
|
|
### Defense Systems
|
|
- Rocket Launcher, Light/Heavy Laser, Gauss Cannon
|
|
- Ion Cannon, Plasma Turret
|
|
- Small/Large Shield Dome
|
|
|
|
## 🔒 Data Security
|
|
|
|
All game data is automatically encrypted using AES encryption before being stored in your browser's local storage. Your game progress is secure and private.
|
|
|
|
## 🎨 Customization
|
|
|
|
The application supports full theme customization through Tailwind CSS variables defined in `src/style.css`. You can easily switch between light and dark modes.
|
|
|
|
## 🤝 Contributing
|
|
|
|
Contributions are welcome! Please feel free to submit issues or pull requests.
|
|
|
|
### Issue Templates
|
|
We provide the following issue templates in both Chinese and English:
|
|
- 🐛 Bug Report
|
|
- ✨ Feature Request
|
|
- 📚 Documentation Improvement
|
|
- 💡 Feedback & Suggestion
|
|
|
|
## 📄 License
|
|
|
|
This work is licensed under the [Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0/).
|
|
|
|
### You are free to:
|
|
- **Share** — copy and redistribute the material in any medium or format
|
|
- **Adapt** — remix, transform, and build upon the material
|
|
|
|
### Under the following terms:
|
|
- **Attribution** — You must give appropriate credit, provide a link to the license, and indicate if changes were made
|
|
- **NonCommercial** — You may not use the material for commercial purposes
|
|
|
|
**Original Author:** Jun Qian (谦君)
|
|
|
|
## 👨💻 Author
|
|
|
|
- **GitHub:** [@setube](https://github.com/setube)
|
|
- **Project:** [ogame-vue-ts](https://github.com/setube/ogame-vue-ts)
|
|
|
|
## 💬 Community
|
|
|
|
### Chinese Community
|
|
- **QQ Group:** 920930589
|
|
|
|
### Global Community
|
|
- **GitHub Issues:** [Report bugs or request features](https://github.com/setube/ogame-vue-ts/issues)
|
|
- **GitHub Discussions:** [Join the conversation](https://github.com/setube/ogame-vue-ts/discussions)
|
|
|
|
## 🙏 Acknowledgments
|
|
|
|
This project is inspired by the original [OGame](https://ogame.org/) browser game. All game mechanics and design elements are reimplemented for educational and entertainment purposes.
|
|
|
|
## ⚠️ Disclaimer
|
|
|
|
This project is not affiliated with, endorsed by, or connected to Gameforge AG or the official OGame game. It is an independent fan project created for educational purposes and personal enjoyment.
|
|
|
|
---
|
|
|
|
<div align="center">
|
|
Made with ❤️ by Jun Qian
|
|
<br>
|
|
© 2025 - All rights reserved (except those granted by CC BY-NC 4.0 License)
|
|
</div>
|