Skip to content

lanedirt/OGameX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 If you find this project useful, please consider giving it a star! 🌟

OGameX logo

Live demo πŸš€ β€’ Installation πŸ“¦ β€’ Contributing πŸ’»

Open-source OGame redesign clone

good first issues open Discord

OGameX is an open-source OGame redesign clone. This clone is built fully from scratch using the Laravel 11.x framework and uses modern PHP practices. All major functionality is covered by unit and feature tests which automatically run on every build.

We welcome any and all contributions to this project! If you want to help out, please read the contributing section. If you have any questions you can join the OGameX discord to get in touch with the maintainers and other contributors.

Disclaimer: this project is purely fan-based and does not contain any commercial features. All backend code is written from scratch. The rights and concepts for the artwork and frontend belong to the original creators: GameForge GmbH. Support them by checking out the official version: https://ogame.org.

πŸ–₯️ Live demo

πŸ“ Table of Contents

πŸ–₯️ 1. Example screenshots

Screenshot 2024-10-06 at 15 41 14 Screenshot 2024-10-06 at 15 41 45 Screenshot 2024-10-06 at 15 42 05 Screenshot 2024-10-06 at 15 42 44 Screenshot 2024-10-06 at 15 43 18

✨ 2. About the author

My (@lanedirt) journey into software development began in 2007 at the age of 14 when I discovered the source code for Ugamela, an early open-source PHP clone of OGame. I really liked running my own browser game server and dedicated myself to modifying this version and translating it to Dutch, leading to the launch of OGameX.nl. This server, active from 2007 to 2009, nurtured a small yet engaged community. This experience not only sparked my passion for software development but also laid the groundwork for my professional career. OGame has always held a special place in my heart, which is why now, 15 years later, I've decided to return to it and create this open-source clone from the ground up.

✨ 3. Goal

The primary goal of this fan-based project is to engineer a faithful rendition of OGame, specifically reflecting its state prior to the Lifeforms update introduced in 2020. This initiative, purely fan-based and non-commercial, is pursued strictly for educational purposes.

πŸ–₯️ 4. Current State of the Project

OGameX is under active development with a lot of core features already implemented and working:

  • Planets and resource management (metal, crystal, deuterium, energy)
  • Building and research queue system
  • Galaxy overview
  • Highscores
  • Messages
  • Battle engine
  • Admin panel
  • Fleet dispatch missions
    • Transport
    • Deployment
    • Colonisation
    • Espionage
    • Attack
    • Recycle
  • Moon
    • Moon creation through debris field after battle
    • Moon buildings

Upcoming Features

The next major upcoming features that are being worked on:

  • Moon
    • Phalanx feature
    • Jump Gate feature
    • Moon destruction fleet dispatch mission
  • Missile attacks
  • Alliances
  • ACS fleet dispatch missions
  • Merchant & shop (non-commercial)
  • Multi-language (making all in-game strings translatable)

πŸš€ 5. Contributing

Contributions are warmly welcomed, whether in development, testing, or spreading the word. Feel free to submit pull requests or contact me for any other contributions.

A good starting point are issues labeled as "good first issue".

good first issues open

Read the CONTRIBUTING.md file for more information.

πŸ““ 6. Disclaimer

This project is a non-commercial hobby project. All rights and concepts related to OGame are owned by GameForge GmbH. We encourage supporters to try the official OGame at https://ogame.org to support its creators.

πŸ–₯️ 7. Installation

The recommended way to install OGameX is by running the bundled Docker containers. This takes care of all the dependencies and is the easiest way to get started.

If you instead wish to install OGameX manually, see the list of requirements for Laravel 11.x and how to deploy manually to a server here: https://laravel.com/docs/11.x/deployment.

a) Install for local development

For local development use the default docker-compose file that is included in this repository. This configuration is optimized for development and includes several tools that are useful for debugging and testing.

  1. Clone the repository.
$ git clone https://github.com/lanedirt/OGameX.git
$ cd OGameX
  1. Copy .env.example to .env.
$ cp .env.example .env
  1. Launch the project using Docker Compose:
$ docker compose up -d

Note: The default setup binds to ports 80/443. Modify docker-compose.yml if needed. PhpMyAdmin is also included for database management and is bound to port 8080.

After the docker containers have started, visit http://localhost to access OGameX. Note that it might take a few seconds for the application to start. Create a new account and login using that account. The first account created will be automatically assigned the admin role.

Note: if you need to run manual php artisan commands, you can SSH into the ogamex-app container with the docker compose exec -it ogamex-app bash command.

b) Install for production

For production there is a separate docker-compose file called docker-compose.prod.yml. This configuration contains several performance optimizations and security settings that are not present in the development configuration.

Caution: the production configuration is not yet fully optimized and should be used with caution. As an example, the database root user uses a default password which should be changed to something unique. You should review all settings before deploying this project to a publicly accessible server.

Note: The instructions below are for Linux. OGameX should also work under Docker for Windows but the steps might be a little bit different.

  1. The OGameX docker containers are expected to be run under a separate (non-root) user. Create a new user (e.g., ogamex) and add it to the Docker group:
$ sudo useradd -m ogamex
$ sudo usermod -aG docker ogamex
  1. Switch to the new user (ogamex):
$ sudo su ogamex
  1. Clone the git repo and run the Docker commands as the ogamex user to ensure all files are created with the correct permissions.
$ git clone https://github.com/lanedirt/OGameX.git
$ cd OGameX
  1. Copy .env.example-prod to .env.
$ cp .env.example-prod .env
  1. Launch the project using Docker Compose:
$ docker compose -f docker-compose.prod.yml up -d --build --force-recreate

Note: The default setup binds to ports 80/443, to change it modify docker-compose.yml. PhpMyAdmin is also included for database management and is bound to port 8080, however to access it you need to explicitly specify your IP addresses via ./docker/phpmyadmin/.htaccess for safety purposes.

After the docker containers have started, visit https://localhost to access OGameX. Note that it might take a few seconds for the application to start. Create a new account and login using that account. The first account created will be automatically assigned the admin role.

Note: The production version runs in forced-HTTPS (redirect) mode by default using a self-signed SSL certificate. If you want to access the application via HTTP, open .env and change APP_ENV from production to local.

πŸ–₯️ 8. Upgrade and misc instructions

Upgrade OGameX to a new version

If you want to upgrade an existing installation of OGameX to a new version, follow these steps:

  1. Stop the existing containers:
$ docker compose down
  1. Pull the latest changes from the main branch or checkout the new release tag:
$ git pull origin main

-- or --

$ git checkout 0.9.1 # replace with the latest release tag
  1. Rebuild and start the containers:

For development:

$ docker compose up -d --build --force-recreate --remove-orphans

For production:

$ docker compose -f docker-compose.prod.yml up -d --build --force-recreate --remove-orphans

When the docker containers are started, the entrypoint script in ./docker/entrypoint.sh will automatically run the appropriate laravel install commands to upgrade the database schema and refresh the cache. Note that depending on the migrations this might take a short while. After the containers are started, you can visit the application at https://localhost (or http://localhost) to check if the upgrade was successful. If you run into any issues, please check the logs for more information or open an issue on GitHub.

Assigning admin role

By default, the first registered user is assigned the admin role which can see the admin bar and is able to change server settings. You can also assign the admin role manually via the command line:

$ php artisan ogamex:assign-admin-role {username}

To remove the admin role from a user, use the following command:

$ php artisan ogamex:remove-admin-role {username}

πŸ“ž 9. Support

Did you encounter issues in this project? Please open a ticket on GitHub and we'll try to help you out as soon as possible.

πŸ’° 10. Sponsorship

We thank the following parties for sponsoring this project:

JetBrains Logo
JetBrains
Providing free open-source licenses for PhpStorm, WebStorm, and DataGrip.

Interested in supporting OGameX? We welcome sponsorships of all sizes! Your support helps us maintain and improve this open-source project. Please get in touch with us via GitHub or Discord to discuss sponsorship opportunities.

πŸ“° 11. License

The OGameX Laravel source code is open-source software licensed under the MIT license. See the LICENSE file for more details. All rights and concepts related to OGame are owned by GameForge GmbH.