• This repository has been archived on 19/Apr/2022
  • Stars
    star
    7,972
  • Rank 4,434 (Top 0.09 %)
  • Language
    Rust
  • License
    Other
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Data-oriented and data-driven game engine written in Rust

Amethyst Game Engine

Build Status Crates.io docs page MIT/Apache Join us on Discord Community forum Reddit Code coverage Lines of Code

Inactively Maintained!

Inactively Maintained

The Amethyst Game Engine has halted its development. Read this post about it: https://amethyst.rs/posts/amethyst--starting-fresh

For 0.15.3 and older, the following Rust version has to be used for compiles to work.

rustup override set 1.47

What is Amethyst?

Amethyst is a data-driven and data-oriented game engine aiming to be fast and as configurable as possible.

Principles

These principles are what makes Amethyst unique and competitive in the world of game engines:

  • Massively parallel architecture.
  • Powered by a correct Entity Component System model.
  • Rapid prototyping with RON files for prefabs and an abstract scripting API.
  • Strong focus on encouraging reusability and clean interfaces.

Why Amethyst?

Extreme Multithreading

Amethyst is based over a very powerful parallel ECS called Specs. This allows games built with Amethyst to maximize the available processing power to run as smoothly and as quickly as possible, without the headaches of multi-threaded programming.

Clean

By design, the Amethyst engine encourages you to write clean and reusable code for your behaviours and data structures. This allows engine users to easily share useful components, thus reducing development time and cost.

Using the ECS architecture, the code of games can be cleanly divided between data and behaviour, making it easy to understand what is going on, even if the game is running on a massive 64-core processor.

Community

  • Discord - Announcements, help, useful information, general discussion.

Features

Please visit the features page for a list of features Amethyst provides.

Navigation

Usage

While the engine can be hard to use at times, we made a lot of documentation that will teach you everything you need to use Amethyst comfortably.

If you don't understand a part of the documentation, please let us know. Join us on Discord or open an issue; we are always happy to help!

Getting started

Before you begin

This repository uses Git LFS for some files used in examples. If you intend to run the examples, make sure you have LFS installed in your system before you clone. You can download it and read the installation instructions at Git LFS home page.

Examples

To compile any of the examples run:

$ cargo run -p name_of_example

All available examples are listed under the examples directory.

For a full-blown "Hello World" tutorial check out the Getting Started chapter in the book.

Showcase games

Our official showcase games demonstrate larger, continuously developed game projects made with Amethyst:

For more examples see Games Made With Amethyst topic on the community forum for some good sources of inspiration.

Dependencies

If you are compiling on Linux, make sure to install the dependencies below.

Arch Linux

pacman -Syu grep gcc pkgconf openssl alsa-lib cmake make python3 freetype2 awk libxcb

Debian/Ubuntu

apt install gcc pkg-config openssl libasound2-dev cmake build-essential python3 libfreetype6-dev libexpat1-dev libxcb-composite0-dev libssl-dev libx11-dev libfontconfig1-dev

Fedora

dnf install pkgconfig gcc openssl-devel alsa-lib-devel cmake make gcc-c++ freetype-devel expat-devel libxcb-devel libX11-devel

openSUSE

zypper install gcc pkg-config libopenssl-devel alsa-devel cmake gcc-c++ python3 freetype2-devel libexpat-devel libxcb-devel

Nix/NixOS

In your project's root folder, create a file shell.nix with the following contents:

let
  mozilla = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
  nixpkgs = import <nixpkgs> { overlays = [ mozilla ]; };
in

  with nixpkgs;

  mkShell {
    buildInputs = [
      alsaLib
      cmake
      freetype
      latest.rustChannels.stable.rust
      expat
      openssl
      pkgconfig
      python3
      vulkan-validation-layers
      xlibs.libX11
    ];

    APPEND_LIBRARY_PATH = lib.makeLibraryPath [
      vulkan-loader
      xlibs.libXcursor
      xlibs.libXi
      xlibs.libXrandr
    ];

    shellHook = ''
      export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APPEND_LIBRARY_PATH"
    '';
  }

Other

See your distribution-specific installation process for the equivalent dependencies.

Please note that you need to have a functional graphics driver installed. If you get a panic about the renderer unable to create the context when trying to run an example, a faulty driver installation could be the issue.

Building Documentation

You can build the book locally with:

cargo install mdbook
mdbook build book

If you're actively editing the book, it's easiest to run:

mdbook serve book

and navigate to http://localhost:3000. The text itself can be found in book/html/index.html. For more information, please see the mdBook project.

To generate the API documentation locally, do:

$ cargo doc

The API reference can be found in target/doc/amethyst/index.html.

Questions/Help

Amethyst supports only the latest stable release of Rust. Use the nightly and beta channels with this project at your own risk.

If you have a question, please check out the FAQ before asking. Chances are, the solution to your problem is already present there. If you still need help, feel free to ask on our Discord server.

Other places you might want to check out are r/rust_gamedev and the #rust-gamedev IRC.

Contributing

Note: Any interaction with the Amethyst project is subject to our Code of Conduct.

Amethyst is a community-based project that welcomes contributions from anyone. If you're interested in helping out, please read the contribution guidelines before getting started.

We have a good first issue category that groups all issues or feature requests that can be made without having an extensive knowledge of Rust or Amethyst. Working on those issues is a good, if not the best, way to learn.

If you think you are not ready to code yet, you can still contribute by reviewing code written by other members of the community. Code reviews ensure that code merged into Amethyst is of the highest quality as possible. Pull requests that are available for reviews can be found here.

If for some reason we don't have any open PRs in need of a review nor any good first issues (that would be a good thing), feel free to consult our issue tracker.

Backers

Thank you to all our backers! 🙏 Become a backer

Sponsors

Amethyst is supported by:

License

Amethyst is free and open source software distributed under the terms of both the MIT License and the Apache License 2.0.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Repositories

1

specs

Specs - Parallel ECS
Rust
2,382
star
2

rlua

High level Lua bindings to Rust
C
1,628
star
3

legion

High performance Rust ECS library
Rust
1,570
star
4

bracket-lib

The Roguelike Toolkit (RLTK), implemented for Rust.
Rust
1,425
star
5

rustrogueliketutorial

Roguelike Tutorial in Rust - using RLTK
Rust
851
star
6

rendy

State of the art "build your own engine" kit powered by gfx-hal
Rust
814
star
7

distill

Asset pipeline system for game engines & editor suites.
Rust
359
star
8

shred

Shared resource dispatcher
Rust
227
star
9

evoli

An ecosystem-simulation game made with Amethyst
Rust
217
star
10

amethyst-starter-2d

Seed project for 2D games
Rust
200
star
11

space-menace

An action 2D platformer made with Amethyst game engine
Rust
179
star
12

shotcaller

A moddable RTS/MOBA game made with bracket-lib and minigene.
Rust
143
star
13

serde-diff

Utility for comparing two structs and re-applying the differences to other structs
Rust
117
star
14

hibitset

Hierarchical bit set container
Rust
107
star
15

voxel-mapper

Make beautiful voxel maps.
Rust
103
star
16

specs-physics

nphysics integration for the Specs entity component system
Rust
94
star
17

sheep

Modular and lightweight spritesheet packer 🐑
Rust
90
star
18

tools

Game development tools for the Amethyst engine
Rust
80
star
19

grumpy_visitors

🧙‍♂️🧙‍♀️ A prototype of a top-down EvilInvasion-like 2D arcade/action (with co-op!)
Rust
77
star
20

amethyst-imgui

imgui integration for Amethyst
Rust
66
star
21

legion_transform

A Unity-inspired hierarchical transform implementation using Legion ECS
Rust
51
star
22

editor-core

Crate that allows an Amethyst game to communicate with an editor.
Rust
44
star
23

rfcs

RFCs are documents that contain major plans and decisions for the engine
32
star
24

dwarf_seeks_fortune

A 2D puzzle platformer made with the Amethyst game engine.
Rust
25
star
25

amethyst_iced

Iced rendering plugin for the Amethyst game engine
Rust
24
star
26

pong_wasm

WASM end-to-end proof of concept -- work in progress
Rust
22
star
27

web_worker

Rust
19
star
28

ludumdare42

A game made by the Amethyst team for Ludum Dare 42
Rust
16
star
29

website-legacy

Project website and blog (DEPRECATED)
HTML
11
star
30

website

Official Amethyst website
JavaScript
9
star
31

amethyst-rhusics

A bridge between Amethyst and rhusics (unmaintained)
Rust
9
star
32

awesome-specs

A curated list of projects that use or help with using Specs.
6
star
33

crystal-editor

Svelte
6
star
34

ludumdare43

Rust
2
star
35

resources

Files that are important to keep around but not tied to any specific code base
1
star
36

builder

The docker container used in amethyst's CI/CD infrastructure.
Dockerfile
1
star
37

wasm_rush_report

Report about adding WASM support to the Amethyst game engine.
1
star
38

laminar-ffi

Crate that exposes Laminar functionality to C
Rust
1
star
39

amethyst-docs-builder

Webhook server that builds amethyst's book and documentation
Go
1
star
40

amethystup

Setup script for Amethyst dependencies
Shell
1
star
41

documentation

Non-rustdoc documentation and policies
1
star