gitwtfhub

wtf is emufight?

elofight/emufight — explained in plain English

Analysis updated 2026-05-18

5RustAudience · developerComplexity · 4/5LicenseSetup · hard

TL;DR

A Rust library that emulates NeoGeo and CPS-1 arcade games and supports low-lag online multiplayer via rollback netplay.

Mindmap

mindmap
  root((emufight))
    What it does
      Emulates NeoGeo
      Emulates CPS-1
      Supports rollback netplay
    Tech stack
      Rust
      GGRS
      SDL2
    Use cases
      Building an arcade frontend
      Online arcade multiplayer
      Rollback netcode research
    Audience
      Rust developers
      Emulation hobbyists
    Requirements
      C plus plus toolchain
      Own ROM files

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Embed NeoGeo or CPS-1 emulation inside your own Rust game or frontend project.

REASON 2

Build an online arcade fighting game client with rollback netplay between two players.

REASON 3

Test rollback networking behavior locally using the library's simulated socket with fake lag.

REASON 4

Study how a small, focused emulator core is structured compared to a large multi-system emulator.

What's in the stack?

RustGGRSSDL2C++

How it stacks up

elofight/emufightdhkts1/teamclaude-rseternal-flame-ad/unitdc-rs
Stars555
LanguageRustRustRust
Last pushed2024-10-12
MaintenanceStale
Setup difficultyhardeasymoderate
Complexity4/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Needs a C++ toolchain, SDL2, and your own legally obtained ROM files, which are not included.

Choose either the MIT License or the Apache 2.0 License, both allow free use, including commercial use, if you keep the license notices.

Wtf does this do

Emufight is a Rust code library that emulates, meaning digitally recreates, two classic arcade game systems: NeoGeo and CPS-1. Rather than supporting every arcade board ever made the way a large project like MAME does, it focuses narrowly on these two systems and is built to be easy to call from other Rust code and to run smoothly with rollback netplay, a technique that lets two players compete online with minimal lag. The project is early stage, at version 0.1, and its programming interface may still change. You embed emufight as a library inside your own game project rather than running it on its own. It gives you the emulated machines and an online play session, while you build the window, handle key presses, and manage matchmaking. The whole design rests on one guarantee: if two computers start from the same game files and the same starting point and receive the same button presses, they will produce identical frames, which is what makes reliable online play possible. Internally, everything flows through a single interface where you feed in player input, then step the emulator forward to get back a video frame and audio samples, or step it forward without drawing anything when catching up after a network delay. The library does not open its own window or play its own sound, it only produces raw data for a host program to display. Online multiplayer is built on a rollback networking library called GGRS, connected through simple socket implementations, including a fake one for testing lag and a plain UDP one for real connections. Save states are captured every frame during online play, stored compactly, and tagged so you cannot accidentally load a NeoGeo save into the CPS-1 system. Sound emulation uses a small existing C++ library, while the rest of the processor emulation, including the chips these arcade boards used, is written in Rust. The project ships no actual game ROM files, since those are copyrighted, but it does include small saved starting points for certain games so two players can begin a match quickly instead of a slow cold boot. The project is dual licensed under MIT or Apache-2.0, with separate notes for the third party pieces it depends on. It is organized into a core library crate, a reference SDL-based host program used for testing and demos, and a small folder of saved starting states, and it welcomes contributions that add support for new arcade boards.

Yoink these prompts

Prompt 1
Walk me through the quick start commands in the emufight README to run kof98 locally with two players.
Prompt 2
Explain how emufight's EmulatorCore trait and step function work based on its README.
Prompt 3
Show me how emufight's GGRS-based netplay session and UdpSocket transport fit together from the README.
Prompt 4
Using emufight's embed example, help me write a basic loop that steps the emulator and reads the output frame.

Frequently asked questions

wtf is emufight?

A Rust library that emulates NeoGeo and CPS-1 arcade games and supports low-lag online multiplayer via rollback netplay.

What language is emufight written in?

Mainly Rust. The stack also includes Rust, GGRS, SDL2.

What license does emufight use?

Choose either the MIT License or the Apache 2.0 License, both allow free use, including commercial use, if you keep the license notices.

How hard is emufight to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is emufight for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.