Skip to content

Commit

Permalink
Merge pull request #124 from 64kramsystem/preparations_for_release_2
Browse files Browse the repository at this point in the history
Release preparations, part 2/3
  • Loading branch information
64kramsystem authored Aug 4, 2022
2 parents b58482f + e1d8e20 commit 477306e
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 8 deletions.
79 changes: 71 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,83 @@

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](#contribution-infos) section.

- [Rust Game Ports](#rust-game-ports)
- [Summary](#summary)
- [Contribution Infos](#contribution-infos)
- [Choosing and implementing a port](#choosing-and-implementing-a-port)
- [Low-level requirements](#low-level-requirements)
- [High level guidelines](#high-level-guidelines)
- [Screenshots](#screenshots)
- [Ports](#ports)
- [Boing/ggez](#boingggez)
- [Cavern/Macroquad](#cavernmacroquad)
- [Rusty Roguelike/Bevy ECS](#rusty-roguelikebevy-ecs)
- [Soccer/Fyrox](#soccerfyrox)
- [Source Projects](#source-projects)
- [Game Libraries](#game-libraries)
- [Libraries](#libraries)
- [Sources](#sources)
- [Ports](#ports-1)

## Summary

The completed ports are:

| Source | Game | Engine | Tested on |
| ------------------------------------ | :-------------: | :--------: | :-------: |
| Code the Classics Vol. 1 | Boing | ggez | Linux |
| Code the Classics Vol. 1 | Cavern | Macroquad | Linux |
| Hands-on Rust: Effective Learning... | Rusty Roguelike | Bevy (ECS) | Linux |
| Code the Classics Vol. 1 | Soccer | Fyrox | Linux |
| Game | Source | Source Language/Libraries | Port Libraries | Tested on |
| :-------------: | :----------------------------------: | :-----------------------: | :---------------------: | :-------: |
| Boing | Code the Classics Vol. 1 | Python, PyGame Zero | ggez | Linux |
| Cavern | Code the Classics Vol. 1 | Python, PyGame Zero | Macroquad | Linux |
| Rusty Roguelike | Hands-on Rust: Effective Learning... | bracket-lib, Legion | bracket-lib, Bevy (ECS) | Linux |
| Soccer | Code the Classics Vol. 1 | Python, PyGame Zero | Fyrox | 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:

- Dynamic language+IML (e.g. Python+Pygame -> Rust+ggez) are challenging for many reasons:
- It's difficult to understand the exact structure/state of the classes/instances
- Globals may be used
- Numeric types can be difficult to ascertain, and the descriptions may be buggy (e.g. a number may accept negative values, while being described as accepting only positive ones)
- IML -> Retained mode library are very time consuming, as they require a full redesign, an example can be porting a Rust game from ggez to Fyrox
- Object oriented -> ECS is another time consuming one, since it requires a full redesign

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 🙂):

- include a license in the root workspace (can be easily copied and edited from other similar projects)
- work on stable Rust (this is because they ubiquitous Rust Analyzer has some open issues with nighly Rust)
- be formatted according to `cargo fmt`
- be linted according to `cargo clippy -- -W clippy::correctness -D warnings`
- not have any unsafe code (it's not necessary for games)
- not use any highly unidiomatic Rust (e.g. globals)
- use symlinks for the resource directories, if they're shared with the source project
- add the source code, if not present already

### High level guidelines

High level guidelines are under discussion. Generally speaking, ports should be performed idiomatically (with particular regard to the game library used), since ports are meant to be examples for Rust game development. You'll be famous! 😎😂

## Screenshots

Expand Down Expand Up @@ -83,7 +139,14 @@ The port suffers from two Fyrox bugs:
- Code the Classics Vol. 1 ([repository](https://github.com/Wireframe-Magazine/Code-the-Classics) and [book](https://wireframe.raspberrypi.org/books/code-the-classics1))
- Rust Roguelike/Hands-on Rust: Effective Learning... ([repository](https://github.com/thebracket/HandsOnRust) and [book](https://pragprog.com/titles/hwrust/hands-on-rust))

## Game Libraries
## Libraries

### Sources

- [PyGame Zero](https://pygame-zero.readthedocs.io/en/stable)
- [bracket-lib](https://github.com/amethyst/bracket-lib)

### Ports

- [ggez](https://github.com/ggez/ggez)
- [Macroquad](https://github.com/not-fl3/macroquad)
Expand Down
File renamed without changes.
29 changes: 29 additions & 0 deletions cavern-macroquad/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Copyright: 2021 Saverio miroddi <[email protected]>
Copyright assets and original (Python) code: 2019 Eben Upton <[email protected]>
License: BSD-2-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.
3. Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
File renamed without changes.
29 changes: 29 additions & 0 deletions soccer-fyrox/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Copyright: 2021 Saverio miroddi <[email protected]>
Copyright assets and original (Python) code: 2019 Eben Upton <[email protected]>
License: BSD-2-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.
3. Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 comments on commit 477306e

Please sign in to comment.