0xCD0 / retrofy

GNU General Public License v3.0
1 stars 0 forks source link

Retrofy - Simple web-based self-hosted emulator frontend

I really wanted to have a simple, easy-to-use self-hosted web retro emulator frontend, and no matter how much I looked, I couldn't find a simple web-based emulator solution that I wanted, so I start to create this project.

This project is powered by emulatorJS project. You can use all the same features you used in emulatorJS.

And this project was created solely as a hobby.

Features

Support Systems

I will be supporting all systems supported by EmulatorJS in the near future.

How to run

You can use docker-compose to paste the yaml below, change the password for the database, and run it.

Initialization takes time when it is an initial run without mysql data. If docker-compose does not run the server, it is waiting for the health check of mysql, so please wait until mysql is finished initializing.

version: '3.8'

x-env: &env
  environment:
  - MYSQL_DATABASE=retrofy
  - MYSQL_ROOT_PASSWORD={Set user custom db password}

name: retrofy
services:
  app:
    container_name: retrofy-server
    image: 0xcd0/retrofy
    volumes:
        # set your local game directory on left side (Do not modify the Container Directory path)
      - {Set your game directory}:/retrofy/roms/
    ports:
      - 8080:8080
    restart: always
    <<: *env
    tty: true
    depends_on:
      db:
        condition: service_healthy
    networks:
      - retrofy-net

  db:
    container_name: retrofy-mysql
    image: mysql:8.1
    command: --max_allowed_packet=1073741824
    volumes:
      # Enter the path where the database will be stored
      - {Set your database directory}:/var/lib/mysql
    ports:
      - 3306:3306
    restart: always
    <<: *env
    networks:
      - retrofy-net
    healthcheck:
      test: mysqladmin ping -h 127.0.0.1 -uroot -p$$MYSQL_ROOT_PASSWORD
      interval: 30s
      timeout: 1h
      retries: 100

networks:
  retrofy-net:
    driver: bridge

When run first time

Of course, retrofy supports login authentication for privacy. The initial ID is admin and the password is p@ssw0rd.
Don't worry. You can change your ID and password on the settings screen after logging in. image

Update game database and update game list of your own games on Settings menu. image

Launch the game

You can easily find games by entering each game's menu and clicking on the list of games or by searching. Of course, you can also update it by hitting the 'Refresh Game List' button when you add a new game. image

When you run the game, you'll see the game screen in EmulatorJS, with all of the features that EmulatorJS supports. image

Structure of the Game Directory

The directory structure for the specified local game directory is shown below. The following is just an example, all file extensions supported by EmulatorJS are supported by default, including ZIP files of course!

[Local game directory you set up in docker-compose]
├── gb
│   ├── game.gb
│   └── game.gbc
├── gba
│   └── game.gba
├── n64
│   └── game.n64
├── nes
│   └── game.nes
├── snes
│   ├── game.sfc
│   └── game.snes
├── psx
│   ├── game.iso
│   └── game.pbp
├── segagg
│   └── game.gg
├── segamd
│   └── game.md
└── segams
    └── game.sms

RoadMap

  1. The goal is to be able to run any system supported by EmulatorJS.
  2. Overall UI design improvements
  3. Multi Language support

Known issues

  1. If the file name contains square brackets ('[', ']'), the file will not be read. We are aware of this issue and are working on a fix.