|
2 | 2 |
|
3 | 3 | # bob's game |
4 | 4 |
|
5 | | -https://youtu.be/IAD7phjdMQo |
| 5 | +This repository contains the modernized source code for "Bob's Game" (2012), updated to run on modern Java 21 infrastructure. |
6 | 6 |
|
7 | | -https://youtu.be/EBC1QKso3II |
| 7 | +## Architecture |
8 | 8 |
|
9 | | -## Setup |
| 9 | +The project is split into three Gradle modules: |
10 | 10 |
|
11 | | -Open project in IntelliJ or Eclipse. |
| 11 | +- **`:client`**: The game client (LWJGL 3, OpenGL, OpenAL). |
| 12 | +- **`:server`**: The backend infrastructure (Game Server, Index Server, STUN Server). |
| 13 | +- **`:shared`**: Shared logic, networking packets, and utilities. |
12 | 14 |
|
13 | | -Run STUN Server, Index Server, Server, and then Client. |
| 15 | +For a detailed breakdown of the project structure and dependencies, see [STRUCTURE.md](STRUCTURE.md). |
14 | 16 |
|
15 | | -Or, run Editor, then open bobsgame_v8830.zip. Export data to create local cache server. (to be detailed further) |
| 17 | +## Prerequisites |
16 | 18 |
|
17 | | -discussion here: <https://discord.gg/FfDxFc4JuS> |
| 19 | +- JDK 21 |
| 20 | +- Docker (optional, for server deployment) |
| 21 | + |
| 22 | +## Building |
| 23 | + |
| 24 | +To build all modules: |
| 25 | + |
| 26 | +```bash |
| 27 | +./gradlew build |
| 28 | +``` |
| 29 | + |
| 30 | +## Running the Client |
| 31 | + |
| 32 | +```bash |
| 33 | +./gradlew :client:run |
| 34 | +``` |
| 35 | + |
| 36 | +## Running the Editor |
| 37 | + |
| 38 | +To run the legacy Swing-based Level Editor: |
| 39 | + |
| 40 | +```bash |
| 41 | +./gradlew :client:runEditor |
| 42 | +``` |
| 43 | + |
| 44 | +**New Editor Features:** |
| 45 | +- **Select All (Ctrl+A)**: Selects the entire map, sprite, or tileset in the respective editors. |
| 46 | +- **Replace Color**: New menu item in "Palette Tools" to swap a color index globally across the tileset. |
| 47 | + |
| 48 | +## Running the Server |
| 49 | + |
| 50 | +You can run the server locally or via Docker. |
| 51 | + |
| 52 | +### Local |
| 53 | + |
| 54 | +```bash |
| 55 | +./gradlew :server:run |
| 56 | +``` |
| 57 | + |
| 58 | +### Docker |
| 59 | + |
| 60 | +Build and start the full stack (Game Server, STUN Server, MySQL Database): |
| 61 | + |
| 62 | +```bash |
| 63 | +docker-compose up --build |
| 64 | +``` |
| 65 | + |
| 66 | +Configuration is handled via Environment Variables (see `docker-compose.yml`) or a `server.properties` file in the working directory. |
| 67 | + |
| 68 | +## Features |
| 69 | + |
| 70 | +- **Modern Tech Stack**: Java 21, Gradle 8.5, LWJGL 3, Netty 4, HikariCP. |
| 71 | +- **Security**: BCrypt password hashing with automatic legacy migration. |
| 72 | +- **Containerization**: Full Docker support. |
| 73 | +- **CI/CD**: GitHub Actions workflow included. |
| 74 | + |
| 75 | +## Changelog |
| 76 | + |
| 77 | +### Modernization Phase (Current) |
| 78 | +- **Migrated to Gradle**: Multi-module project structure. |
| 79 | +- **Updated Java**: Targeted Java 21. |
| 80 | +- **Upgraded LWJGL**: Migrated from 2 to 3 (GLFW, OpenAL, STB). |
| 81 | +- **Upgraded Netty**: Migrated from 3 to 4. |
| 82 | +- **Security**: Added BCrypt password hashing. |
| 83 | +- **Infrastructure**: Added Docker and CI/CD support. |
| 84 | +- **Editor**: Re-enabled legacy Swing Editor, added 'Select All' and 'Replace Color' features. |
| 85 | + |
| 86 | +## Roadmap |
| 87 | + |
| 88 | +- [x] Modernize Build System (Gradle) |
| 89 | +- [x] Upgrade Java to 21 |
| 90 | +- [x] Migrate Networking to Netty 4 |
| 91 | +- [x] Migrate Graphics to LWJGL 3 |
| 92 | +- [x] Re-enable Level Editor |
| 93 | +- [ ] Port Editor to LibGDX / Scene2D (Future) |
| 94 | +- [ ] Implement remaining TODO items |
0 commit comments