rust-gamedev / rust-game-ports

Official host of games ported using Rust game libraries.
Other
122 stars 7 forks source link
bevy fyrox game game-development game-engine gamedev ggez hacktoberfest macroquad rust

Rust Game Ports

Official host of games ported using Rust game libraries.

This project is intended to inform and help developers in the area of actual game programming with Rust and Rust game engines.

If you're a developer planning a contribution, it's crucial to read the Contribution Infos section.

Summary

The completed ports are:

Game Part of Source Language Source Libraries Port Libraries Tested on
Boing Code the Classics Vol. 1 Python PyGame Zero ggez 0.7 Linux
Catacomb II (SDL) - C SDL 2 Rust-SDL2 0.35 Linux
Cavern Code the Classics Vol. 1 Python PyGame Zero Macroquad 0.3 Linux
Soccer Code the Classics Vol. 1 Python PyGame Zero Fyrox 0.26 Linux
Rusty Roguelike Hands-on Rust: Effective Learning... Rust bracket-lib, Legion bracket-lib, Bevy (ECS) 0.7 Linux
Rusty Roguelike Hands-on Rust: Effective Learning... Rust bracket-lib, Legion Macroquad 0.3, Legion 0.3 Linux
Bunner Code the Classics Vol. 1 Python PyGame Zero Macroquad 0.3 Linux

Contribution Infos

Contributions are welcome!

Since this project is intended to be educational above all, it's important for the candidate ports to constitute proper examples 😄

In this section you'll find some suggestions to start a port, and the low and high level guidelines. Feel free to skip the first, but don't underestimate it! 😉

Choosing and implementing a port

Devs motivated to implement a port are advised to be very careful with what they choose 😄

While some ports are straightforward, for example Rust+immediate mode library ("IML") -> Rust+IML, other types of port can be subtly challenging:

For beginners, a good starting point is to take a Rust+IML project, e.g. Boing, and convert it to another IML, e.g. Macroquad.

More adventurous devs can start from a Python/PyGame source, and port it to Rust+IML.

Committed devs can perform ports that require a redesign (e.g. Fyrox Framework to Fyrox scripted).

It's not advised to perform a port that requires a language translation and a redesign

Low-level requirements

These are the low-level requirements for candidate projects (they will be automated, so they don't need to be actively take caren of 🙂):

High level guidelines

High level guidelines are under discussion. Generally speaking, ports should be performed according to the intended design of the game library used, since ports are meant to be examples for Rust game development. You'll be famous! 😎😂

Screenshots

Boing:

Boing

Bunner:

Bunner

Cavern:

Cavern

Rusty Roguelike:

Rusty Roguelike

Soccer:

Soccer

Catacomb II:

Catacomb II

Port notes

Boing/ggez

A very straightforward port 🙂

This port suffers from one (Winit) bug:

Cavern/Macroquad

Another very straightforward port 🙂

This port suffers from two Macroquad bugs:

Only the stable part of the library is used (the experimental scene API is not used).

Rusty Roguelike/Bevy ECS

The ECS part of this game, originally Legion, has been ported to Bevy (the graphic/input library used is still bracket-lib).

A mini book, "Learn Bevy's ECS by ripping off someone else's project", is based on this project.

Soccer/Fyrox

This port required a redesign, in order to move to a scene graph.

The port suffers from one Fyrox bug:

Rusty Roguelike/Macroquad

The graphics portion of the Rusty Roguelike has been ported to Macroquad. The ECS used is still Legion, and the pathfinding is from bracket-lib).

Bunner/Macroquad

A straight port from PyGame Zero to Macroquad of this infinite frogger like game.

Catacomb II/SDL 2

This is an exact port of the source codebase, performed in two stages - first transpiling to unsafe Rust via C2Rust, then manually converting to safe Rust.

Since the objective was testing such type of port, the result is not idiomatic Rust; nonetheless, the code is still 100% safe, and the Rust-SDL2 library is properly used. More details are provided on the port project repository.

In order to play this game, the game datafiles are required; a pack with all the Catacomb games currently costs just 4$ on GOG.