Skip to content
/ Pac-Man Public

A Pac-Man clone in Rust built with SDL2 and Emscripten, with a playable browser build!

Notifications You must be signed in to change notification settings

Xevion/Pac-Man

Repository files navigation

Pac-Man

If the title doesn't clue you in, I'm remaking Pac-Man with SDL and Rust.

The project is extremely early in development, but check back in a week, and maybe I'll have something cool to look at.

Feature Targets

  • Near-perfect replication of logic, scoring, graphics, sound, and behaviors.
  • Written in Rust, buildable on Windows, Linux, Mac and WebAssembly.
  • Online demo, playable in a browser.
  • Automatic build system, with releases for Windows, Linux, and Mac & Web-Assembly.
  • Debug tooling
    • Game state visualization
    • Game speed controls + pausing
    • Log tracing
    • Performance details

Experimental Ideas

  • Perfected Ghost Algorithms
  • More than 4 ghosts
  • Custom Level Generation
    • Multi-map tunnelling
  • Online Scoreboard
    • WebAssembly build contains a special API key for communicating with server.
    • To prevent abuse, the server will only accept scores from the WebAssembly build.

Installation

Besides SDL2, the following extensions are required: Image, Mixer, and TTF.

Ubuntu

On Ubuntu, you can install the required packages with the following command:

sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev

Windows

On Windows, installation requires either building from source (not covered), or downloading the pre-built binaries.

The latest releases can be found here:

Download each for your architecture, and locate the appropriately named DLL within. Move said DLL to root of this project.

In total, you should have the following DLLs in the root of the project:

  • SDL2.dll
  • SDL2_mixer.dll
  • SDL2_ttf.dll
  • SDL2_image.dll
  • libpngX-X.dll
    • Not sure on what specific version is to be used, or if naming matters. libpng16-16.dll is what I had used.
  • zlib1.dll

Building

To build the project, run the following command:

cargo build

During development, you can easily run the project with:

cargo run
cargo run -q # Quiet mode, no logging
cargo run --release # Release mode, optimized

About

A Pac-Man clone in Rust built with SDL2 and Emscripten, with a playable browser build!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published