$ show setube/ogame-vue-ts
This repository is a fully functional, offline single-player space strategy game (OGame clone) built with Vue 3, TypeScript, Pinia, and shadcn-vue. It implements the complete OGame feature set: resource management, building, research, fleet combat, defense, diplomacy, NPC AI, achievements, campaigns, and a battle simulator. The architecture is a modern SPA with client-side persistence (localStorage encrypted via AES), optional WebDAV cloud sync, and multi-platform builds (web, desktop via Electron, Android via Capacitor, Docker). The game logic is organized into modular TypeScript files under `src/logic/`, with a centralized game loop in `App.vue` that processes resource production, construction queues, fleet missions, NPC behavior, and achievement checks every second. The UI uses a custom component library built on shadcn-vue and Reka UI, with full internationalization (8 languages). The repository also includes a Go-based static server for production deployment and a battle simulation Web Worker for offloading heavy computation. While the codebase is well-structured and demonstrates good use of modern frontend patterns, it is heavily coupled to game state and lacks automated tests, which limits reusability of most modules outside this project.
The LLM identified 2 files worth highlighting for reuse:
A singleton Web Worker lifecycle manager that handles worker creation, message passing, timeout/error recovery, and graceful termination. It abstracts away the raw Worker API and provides a clean async interface for offloading heavy computations (e.g., battle simulation). The pattern is self-contained and could be extracted into any TypeScript project requiring background processing with reliable error handling.
A generic WebDAV client service that provides upload, download, list, and delete operations using standard HTTP methods (PROPFIND, PUT, GET, DELETE). It handles authentication, XML parsing for directory listings, and error handling. While currently used for game save backup, the service is largely independent of game types and could be reused as a WebDAV integration layer in other web applications.