GithubHelp home page GithubHelp logo

amethyst / evoli Goto Github PK

View Code? Open in Web Editor NEW
217.0 217.0 33.0 20.12 MB

An ecosystem-simulation game made with Amethyst

Home Page: https://community.amethyst.rs/t/evoli-introduction/770

License: Other

Rust 100.00%
amethyst game showcase simulation-games steering-behaviors

evoli's Introduction

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.

evoli's People

Contributors

a5huynh avatar aaronjewell avatar ashneverdawn avatar awpteamoose avatar belovachap avatar caitp avatar chrispetkau avatar erlend-sh avatar hbina avatar ishehadeh avatar jazarro avatar khionu avatar khskarl avatar marotili avatar nicklasmoeller avatar onbjerg avatar orhanbalci avatar sunreef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evoli's Issues

Automated pipeline for game executables

Reasonably early on in our journey I’d like to have a simple pipeline put together for generating game executables. I.e. an .exe or whatever the cool kids are double clicking these days to install something on their computer.

We are gonna quickly want a bigger pool of alpha testers than “people into Rust who are comfortable with some command line operations”. I’m no fan of the command line myself, and I’m pretty sure my composer friend who made our background music would be testing our game right now if we could send him a standard installer.

Integrate with sprite-gen

We'd like to try use the sprite-gen project in order to generate creature sprites.

  • integrate Evoli with sprite (we can temporarily operate with a fork of sprite if the library needs updating in order to work)
  • assign existing creatures to a sprite generated creature. Can be the same one every time, or a different one every time

Related to #25

Add a Date/Time indicator

Add a timer at the top of the screen that shows the current Date/Time. This requires defining a scaling from real time to in-game days.

[Benchmark] More moving entities

  • Make it possible to add exponentially greater amounts of creatures to the scene.
  • Make the addition/removal of spawned creatures configurable.

[Benchmark] 3D culling

jaynus: The idea is that we need something that's iterating over a small subset of a much larger set of data, and not using components to filter it.

Why the new methods?

(Sorry if this is out of place or too simple a question.)

Why do these components have static new methods if all of their fields are public? Aren't they construct-able outside the module by listing all the fields regardless? Is it still worth doing assuming that the rest of the code will call the new methods idiomatically? Could you prevent using the direct struct making by adding a private field with the () type? Is there any value in that?

pub fn new(damage: f32) -> Damage {

Window does not scale properly in 1366x768

evoli_not_scaled_properly

Additionally, there is no keyboard control so the only option is to force quit and restart the executable.

I might as well ask it here, but am I forced to use Vulkan?

Add a blinking effect on taking damage

When entities take damage, make them blink.
If possible, this should be implemented as an event-driven system. This also means the existing systems should be modified to generate something like a DamageTakenEvent

Comments missing

Hello,
please add much more comments and descriptions in the source code. Because this project should be a showcase for amethyst and also a basic resource for new developers trying to
use and learn amethyst, there needs to be much more information's in the source code. Right now its only code without any comments.

rgds
Martin

Can't run on ubuntu 19.10

Hello.
I think I have an issue with your running your game and I can't figure out why.
Here is what I get:
[ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/carcass.glb" (handle id: Handle { id: 1 }) could not be loaded: Failed to load asset with name "assets/carcass.glb" [ERROR][amethyst_assets::progress] Error loading handle 1, PREFAB, with name assets/carcass.glb: Failed to load asset with name "assets/carcass.glb" caused by: Failed to load asset with name "assets/carcass.glb" Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/carcass.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/carcass.glb") } } caused by: Format "GLTFScene" could not load asset Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/carcass.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } } caused by: Failed to import gltf scene '"assets/carcass.glb"' Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/carcass.glb\"\'") } } caused by: Gltf import error Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } } caused by: expected value at line 1 column 1 Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } } [ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/ground.glb" (handle id: Handle { id: 0 }) could not be loaded: Failed to load asset with name "assets/ground.glb" [ERROR][amethyst_assets::progress] Error loading handle 0, PREFAB, with name assets/ground.glb: Failed to load asset with name "assets/ground.glb" caused by: Failed to load asset with name "assets/ground.glb" Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ground.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/ground.glb") } } caused by: Format "GLTFScene" could not load asset Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ground.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } } caused by: Failed to import gltf scene '"assets/ground.glb"' Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ground.glb\"\'") } } caused by: Gltf import error Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } } caused by: expected value at line 1 column 1 Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } } [ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/nushi.gltf" (handle id: Handle { id: 2 }) could not be loaded: Failed to load asset with name "assets/nushi.gltf" [ERROR][amethyst_assets::progress] Error loading handle 2, PREFAB, with name assets/nushi.gltf: Failed to load asset with name "assets/nushi.gltf" caused by: Failed to load asset with name "assets/nushi.gltf" Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/nushi.gltf\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/nushi.gltf") } } caused by: Format "GLTFScene" could not load asset Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/nushi.gltf\"\'") } }), backtrace: None, error: Format("GLTFScene") } } caused by: Failed to import gltf scene '"assets/nushi.gltf"' Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/nushi.gltf\"\'") } } caused by: Gltf import error Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } } caused by: expected value at line 1 column 1 Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } } [ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/topplegrass.gltf" (handle id: Handle { id: 3 }) could not be loaded: Failed to load asset with name "assets/topplegrass.gltf" [ERROR][amethyst_assets::progress] Error loading handle 3, PREFAB, with name assets/topplegrass.gltf: Failed to load asset with name "assets/topplegrass.gltf" caused by: Failed to load asset with name "assets/topplegrass.gltf" Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/topplegrass.gltf\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/topplegrass.gltf") } } caused by: Format "GLTFScene" could not load asset Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/topplegrass.gltf\"\'") } }), backtrace: None, error: Format("GLTFScene") } } caused by: Failed to import gltf scene '"assets/topplegrass.gltf"' Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/topplegrass.gltf\"\'") } } caused by: Gltf import error Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } } caused by: expected value at line 1 column 1 Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } } [ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/bush.glb" (handle id: Handle { id: 4 }) could not be loaded: Failed to load asset with name "assets/bush.glb" [ERROR][amethyst_assets::progress] Error loading handle 4, PREFAB, with name assets/bush.glb: Failed to load asset with name "assets/bush.glb" caused by: Failed to load asset with name "assets/bush.glb" Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/bush.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/bush.glb") } } caused by: Format "GLTFScene" could not load asset Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/bush.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } } caused by: Failed to import gltf scene '"assets/bush.glb"' Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/bush.glb\"\'") } } caused by: Gltf import error Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } } caused by: expected value at line 1 column 1 Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } } [ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/devil_slime.glb" (handle id: Handle { id: 5 }) could not be loaded: Failed to load asset with name "assets/devil_slime.glb" [ERROR][amethyst_assets::progress] Error loading handle 5, PREFAB, with name assets/devil_slime.glb: Failed to load asset with name "assets/devil_slime.glb" caused by: Failed to load asset with name "assets/devil_slime.glb" Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/devil_slime.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/devil_slime.glb") } } caused by: Format "GLTFScene" could not load asset Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/devil_slime.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } } caused by: Failed to import gltf scene '"assets/devil_slime.glb"' Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/devil_slime.glb\"\'") } } caused by: Gltf import error Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } } caused by: expected value at line 1 column 1 Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } } [ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/slime.glb" (handle id: Handle { id: 7 }) could not be loaded: Failed to load asset with name "assets/slime.glb" [ERROR][amethyst_assets::progress] Error loading handle 7, PREFAB, with name assets/slime.glb: Failed to load asset with name "assets/slime.glb" caused by: Failed to load asset with name "assets/slime.glb" Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/slime.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/slime.glb") } } caused by: Format "GLTFScene" could not load asset Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/slime.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } } caused by: Failed to import gltf scene '"assets/slime.glb"' Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/slime.glb\"\'") } } caused by: Gltf import error Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } } caused by: expected value at line 1 column 1 Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } } [ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/ixie.glb" (handle id: Handle { id: 6 }) could not be loaded: Failed to load asset with name "assets/ixie.glb" [ERROR][amethyst_assets::progress] Error loading handle 6, PREFAB, with name assets/ixie.glb: Failed to load asset with name "assets/ixie.glb" caused by: Failed to load asset with name "assets/ixie.glb" Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ixie.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/ixie.glb") } } caused by: Format "GLTFScene" could not load asset Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ixie.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } } caused by: Failed to import gltf scene '"assets/ixie.glb"' Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ixie.glb\"\'") } } caused by: Gltf import error Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } } caused by: expected value at line 1 column 1 Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } } [ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ground.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/ground.glb") } }, handle_id: 0, asset_type_name: "PREFAB", asset_name: "assets/ground.glb" }] [ERROR][amethyst_assets::storage] "PREFAB": Asset "prefabs/creatures/ground.ron" (handle id: Handle { id: 0 }) could not be loaded: Failed to load asset with name "prefabs/creatures/ground.ron" [ERROR][amethyst_assets::progress] Error loading handle 0, PREFAB, with name prefabs/creatures/ground.ron: Failed to load asset with name "prefabs/creatures/ground.ron" caused by: Failed to load asset with name "prefabs/creatures/ground.ron" Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("prefabs/creatures/ground.ron") } } caused by: Failed loading sub asset Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } } [ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/carcass.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/carcass.glb") } }, handle_id: 1, asset_type_name: "PREFAB", asset_name: "assets/carcass.glb" }] [ERROR][amethyst_assets::storage] "PREFAB": Asset "prefabs/creatures/herbivore_carcass.ron" (handle id: Handle { id: 1 }) could not be loaded: Failed to load asset with name "prefabs/creatures/herbivore_carcass.ron" [ERROR][amethyst_assets::progress] Error loading handle 1, PREFAB, with name prefabs/creatures/herbivore_carcass.ron: Failed to load asset with name "prefabs/creatures/herbivore_carcass.ron" caused by: Failed to load asset with name "prefabs/creatures/herbivore_carcass.ron" Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("prefabs/creatures/herbivore_carcass.ron") } } caused by: Failed loading sub asset Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } } [ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/nushi.gltf\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/nushi.gltf") } }, handle_id: 2, asset_type_name: "PREFAB", asset_name: "assets/nushi.gltf" }] [ERROR][amethyst_assets::storage] "PREFAB": Asset "prefabs/creatures/nushi.ron" (handle id: Handle { id: 2 }) could not be loaded: Failed to load asset with name "prefabs/creatures/nushi.ron" [ERROR][amethyst_assets::progress] Error loading handle 2, PREFAB, with name prefabs/creatures/nushi.ron: Failed to load asset with name "prefabs/creatures/nushi.ron" caused by: Failed to load asset with name "prefabs/creatures/nushi.ron" Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("prefabs/creatures/nushi.ron") } } caused by: Failed loading sub asset Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } } [ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/topplegrass.gltf\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/topplegrass.gltf") } }, handle_id: 3, asset_type_name: "PREFAB", asset_name: "assets/topplegrass.gltf" }] [ERROR][amethyst_assets::storage] "PREFAB": Asset "prefabs/creatures/topplegrass.ron" (handle id: Handle { id: 3 }) could not be loaded: Failed to load asset with name "prefabs/creatures/topplegrass.ron" [ERROR][amethyst_assets::progress] Error loading handle 3, PREFAB, with name prefabs/creatures/topplegrass.ron: Failed to load asset with name "prefabs/creatures/topplegrass.ron" caused by: Failed to load asset with name "prefabs/creatures/topplegrass.ron" Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("prefabs/creatures/topplegrass.ron") } } caused by: Failed loading sub asset Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } } [ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/bush.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/bush.glb") } }, handle_id: 4, asset_type_name: "PREFAB", asset_name: "assets/bush.glb" }] [ERROR][amethyst_assets::storage] "PREFAB": Asset "prefabs/creatures/plant.ron" (handle id: Handle { id: 4 }) could not be loaded: Failed to load asset with name "prefabs/creatures/plant.ron" [ERROR][amethyst_assets::progress] Error loading handle 4, PREFAB, with name prefabs/creatures/plant.ron: Failed to load asset with name "prefabs/creatures/plant.ron" caused by: Failed to load asset with name "prefabs/creatures/plant.ron" Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("prefabs/creatures/plant.ron") } } caused by: Failed loading sub asset Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } } [ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/devil_slime.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/devil_slime.glb") } }, handle_id: 5, asset_type_name: "PREFAB", asset_name: "assets/devil_slime.glb" }] [ERROR][amethyst_assets::storage] "PREFAB": Asset "prefabs/creatures/carnivore.ron" (handle id: Handle { id: 5 }) could not be loaded: Failed to load asset with name "prefabs/creatures/carnivore.ron" [ERROR][amethyst_assets::progress] Error loading handle 5, PREFAB, with name prefabs/creatures/carnivore.ron: Failed to load asset with name "prefabs/creatures/carnivore.ron" caused by: Failed to load asset with name "prefabs/creatures/carnivore.ron" Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("prefabs/creatures/carnivore.ron") } } caused by: Failed loading sub asset Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } } [ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ixie.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/ixie.glb") } }, handle_id: 6, asset_type_name: "PREFAB", asset_name: "assets/ixie.glb" }] [ERROR][amethyst_assets::storage] "PREFAB": Asset "prefabs/creatures/ixie.ron" (handle id: Handle { id: 7 }) could not be loaded: Failed to load asset with name "prefabs/creatures/ixie.ron" [ERROR][amethyst_assets::progress] Error loading handle 7, PREFAB, with name prefabs/creatures/ixie.ron: Failed to load asset with name "prefabs/creatures/ixie.ron" caused by: Failed to load asset with name "prefabs/creatures/ixie.ron" Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("prefabs/creatures/ixie.ron") } } caused by: Failed loading sub asset Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } } [ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/slime.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/slime.glb") } }, handle_id: 7, asset_type_name: "PREFAB", asset_name: "assets/slime.glb" }] [ERROR][amethyst_assets::storage] "PREFAB": Asset "prefabs/creatures/herbivore.ron" (handle id: Handle { id: 6 }) could not be loaded: Failed to load asset with name "prefabs/creatures/herbivore.ron" [ERROR][amethyst_assets::progress] Error loading handle 6, PREFAB, with name prefabs/creatures/herbivore.ron: Failed to load asset with name "prefabs/creatures/herbivore.ron" caused by: Failed to load asset with name "prefabs/creatures/herbivore.ron" Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("prefabs/creatures/herbivore.ron") } } caused by: Failed loading sub asset Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } } Exiting program because of 1 errors... 0: DecoderError

Missing dependencies - alsa, some XCB libs

README does not mention any dependencies and cargo run is supposed to be the only thing needed to be done.

However, the following error may be encountered

thread 'main' panicked at 'called `Result::unwrap()` on 
an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"alsa\"` 
did not exit successfully: exit code: 1\n--- stderr\n
Package alsa was not found in the pkg-config search path.\n
Perhaps you should add the directory containing `alsa.pc\'\nto 
the PKG_CONFIG_PATH environment variable\nNo package
 \'alsa\' found\n"', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable
 to display a backtrace.

First of all, the error message is garbled (this is the exact form it is presented in terminal - escape slashes and all).

Second, it might be worth mentioning in README that libasound2-dev is required.

Killed unit turns into carcass

A simple feature to get us closer to life-like behaviors would be for killed units to not disappear instantaneously, instead turning into dead carcasses.

The predators in turn would remain in place to feed on these carcasses until there's no more meat to feed on. In our current system a unit gets fed at the moment when it terminates another unit. That will no longer be the case with the introduction of carcasses.

Upon changing from alive to dead, the herbivore unit's model should change. Something good might be found on http://quaternius.com/assets.html, but for the first take it might be best to just change its color to something like grey.

Relevant system backstory:


After implementing this for herbivores we should also look at applying the same method to plans, as they will behave very similarly to carcasses. Herbivores should munch on them for quite a while before they're completely removed.

Add possibility to speed up the game by a factor of 2

Users should be able to speed up the simulation. Speeding up should be possible by using the + key and going back to normal speed should be done using the - key.
If any issues arise, e.g. collision doesn’t work anymore, we ignore it for now or create follow up issues.

Ambitious implementers don't have to stop at 2x speedup. 🚀

Basic background terrain render

Let's not have our creatures occupy an empty abyss any longer. We wanna build a flat, square map with no special characteristics for starters, but more interesting iterations will eventually follow

TODO is pretty much:

  • find a good, free tileset (ideally it goes well together with the low-res style of sprite-gen: https://github.com/tversteeg/sprite-gen)
  • put together a square area in Tiled editor
  • export it and share it in #showcase-team .

and if you feel like it you could also do the implementation part:

  • make Tiled export work in Amethyst via tiled-rs
  • fit the square area made in Tile into the square playing area of Evolution Island

Add a feed system

At the moment, entities will starve to death.
In PerformDefaultAttackSystem check if the defending entity dies, if that is the case, add the amount of nutritional value (a new component) to the fullness of the attacking entity.

Controllable audio system

At the moment, the system used by evoli to play audio is amethyst's AudioBundle/DjSystem.

Changing the music that is being played is currently not possible, a new, controllable system is required.

I'm not entirely sure what would be a good implementation for this.

Related to #76 ( and what's currently blocking me on #80 :< )

Sorry in advance if i mix up some concepts, I'm new!

Debug menu

Currently debugging is really not the smoothest experience, the only way to watch values for variables is by inserting prints everywhere and changing them on-the-fly is an even bumpier road.

I propose using this really cool project: https://github.com/Awpteamoose/amethyst-inspector
image

Seems like a solution to this problem and is simple enough to integrate.

Also, feel free to write on this issue any development frictions that could be improved by better debugging support on the Amethyst side, e.g. more helpful error messages, more debug drawing options besides debug lines.

Cannot run on Fedora 30 Wayland

I'm very interested in trying Evoli, but I can't get it to run! Please let me know if there is something I should install/configure, or if I've found a real bug.

Error message

Evoli compiles just fine with cargo build.
When I try to run it with cargo run I get this error:

$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.19s
     Running `target/debug/evolution-island`
[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.11.1
[INFO][amethyst::app] Platform: x86_64-unknown-linux-gnu
[INFO][amethyst::app] Amethyst git commit: 9709f4fdddffcfef4d17f342260b4bb0e976e9b1
[INFO][amethyst::app] Rustc version: 1.39.0-nightly Nightly
[INFO][amethyst::app] Rustc git commit: 72b2abfd65ba024e12d7fe51852a309419f494d8
[WARN][gfx_backend_vulkan] Unable to find layer: VK_LAYER_LUNARG_standard_validation
[WARN][rendy_factory::factory] Slow safety checks are enabled! Disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][rendy_util::wrap] Slow safety checks are enabled! You can disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][gfx_backend_vulkan] 
GENERAL [Loader Message (0)] : Device Extension: VK_KHR_8bit_storage (/usr/lib64/libvulkan_intel.so) version 0.0.1
object info: (type: INSTANCE, hndl: 94837343484112)

[INFO][gfx_backend_vulkan] 
GENERAL [Loader Message (0)] : Device Extension: VK_KHR_16bit_storage (/usr/lib64/libvulkan_intel.so) version 0.0.1
object info: (type: INSTANCE, hndl: 94837343484112)

[ ... snip ... ]

[INFO][gfx_backend_vulkan] 
GENERAL [Loader Message (0)] : Device Extension: VK_GOOGLE_hlsl_functionality1 (/usr/lib64/libvulkan_intel.so) version 0.0.1
object info: (type: INSTANCE, hndl: 94837343484112)

[INFO][gfx_backend_vulkan] 
GENERAL [Loader Message (0)] : Device Extension: VK_NV_compute_shader_derivatives (/usr/lib64/libvulkan_intel.so) version 0.0.1
object info: (type: INSTANCE, hndl: 94837343484112)

[ERROR][amethyst_assets::storage] "PREFAB": Asset "assets/ixie.glb" (handle id: Handle { id: 1 }) could not be loaded: Failed to load asset with name "assets/ixie.glb"
[ERROR][amethyst_assets::progress] Error loading handle 1, PREFAB, with name assets/ixie.glb: Failed to load asset with name "assets/ixie.glb"
caused by: Failed to load asset with name "assets/ixie.glb"
Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ixie.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }), backtrace: None, error: Asset("assets/ixie.glb") } }
caused by: Format "GLTFScene" could not load asset
Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/ixie.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }

[ ... snip ... ]

Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/bush.glb\"\'") } }), backtrace: None, error: Format("GLTFScene") } }
caused by: Failed to import gltf scene '"assets/bush.glb"'
Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }), backtrace: None, error: StringError("Failed to import gltf scene \'\"assets/bush.glb\"\'") } }
caused by: Gltf import error
Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }), backtrace: None, error: GltfImporterError } }
caused by: expected value at line 1 column 1
Error { inner: Inner { source: None, backtrace: None, error: Deserialize(Error("expected value", line: 1, column: 1)) } }
Exiting program because of 1 errors...
0: DecoderError

Full error message attached at the bottom of this issue.

System info

$ cargo --version
cargo 1.39.0-nightly (22f7dd049 2019-08-27)
$ rustc --version
rustc 1.39.0-nightly (72b2abfd6 2019-08-29)
$ uname -s -r -v -p -i -o
Linux 5.2.9-200.fc30.x86_64 #1 SMP Fri Aug 16 21:37:45 UTC 2019 x86_64 x86_64 GNU/Linux

I am running Wayland and not X.

Misc debugging info

All of my installed packages
Full traceback logs

Add a menu screen

Add a menu state. The game should start in this menu state. In the menu state, a simple UI with two buttons is displayed. The first button 'Start' will start the game and transition into the main state. The second button Exit will close the game.

[BUG] Evoli crashes after unspecified time

Description

Evoli crashes after running for unspecific time (can be a few seconds, sometimes 10minutes). This happens even without any interaction.

Reproduction Steps

  1. clone evoli master
  2. cargo run
  3. wait until it crashes

My Environment

  • macos 10.14.4
  • cargo 1.34.0 (6789d8a0a 2019-04-01)
  • rustc 1.34.2 (6c2484dc3 2019-05-13)

What You Expected to Happen

Evoli runs until I close it.

What Actually Happened

Evoli panics with this message:

thread '<unnamed>' panicked at 'Entity Entity(13, Generation(4)) had a non-finite Transform', /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_core-0.5.0/src/transform/systems.rs:105:13

Additional Context

I tried to debug the issue and found that if you remove the Ixies from the game it does not crash. As the backtrace (see below) indicates there seems to be a problem with transforming the isometry to a matrix in the amethyst's transform system. So, maybe someting with the parenting of Ixie swarmlings triggers the crash.

Of course this might just as well be a problem with amethyst 0.10.0. I did not try to compile evoli with the current master of amethyst.

Backtrace

thread '<unnamed>' panicked at 'Entity Entity(15, Generation(5)) had a non-finite `Transform`', /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_core-0.5.0/src/transform/systems.rs:105:13
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at src/libstd/panicking.rs:478
   5: <alloc::string::String as core::ops::index::Index<core::ops::range::RangeFull>>::index
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panicking.rs:412
   6: hibitset::BitSet::contains
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_core-0.5.0/src/transform/systems.rs:105
   7: <hibitset::BitSet as core::clone::Clone>::clone
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.7.2/src/system.rs:133
   8: shred::dispatch::stage::Stage::execute::{{closure}}
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.7.2/src/dispatch/stage.rs:104
   9: rayon_core::latch::SpinLatch::new
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/for_each.rs:49
  10: <shred::dispatch::stage::StagesBuilder<'a> as core::default::Default>::default
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libcore/slice/mod.rs:3003
  11: rayon_core::latch::SpinLatch::new
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/for_each.rs:49
  12: <fxhash::FxHasher as core::default::Default>::default
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/plumbing/mod.rs:108
  13: rayon::iter::plumbing::LengthSplitter::try
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/plumbing/mod.rs:418
  14: rayon::iter::plumbing::LengthSplitter::try
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/plumbing/mod.rs:410
  15: core::ptr::swap_nonoverlapping_bytes
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/join/mod.rs:128
  16: <shred::res::Resources as core::default::Default>::default
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panic.rs:309
  17: core::alloc::Layout::repeat
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panicking.rs:297
  18: panic_unwind::dwarf::eh::read_encoded_pointer
             at src/libpanic_unwind/lib.rs:87
  19: core::alloc::Layout::repeat
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panicking.rs:276
  20: rayon_core::FnContext::migrated
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panic.rs:388
  21: <alloc::collections::CollectionAllocErr as core::convert::From<core::alloc::LayoutErr>>::from
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/unwind.rs:18
  22: core::ptr::swap_nonoverlapping_bytes
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/join/mod.rs:128
  23: rayon_core::registry::WORKER_THREAD_STATE::__init
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/registry.rs:705
  24: core::ptr::swap_nonoverlapping_bytes
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/join/mod.rs:116
  25: rayon::iter::plumbing::LengthSplitter::try
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/plumbing/mod.rs:409
  26: rayon::iter::plumbing::LengthSplitter::try
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/plumbing/mod.rs:391
  27: rayon_core::latch::SpinLatch::new
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/plumbing/mod.rs:368
  28: <shred::res::Resources as core::default::Default>::default
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/slice/mod.rs:692
  29: rayon::iter::plumbing::LengthSplitter::try
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/plumbing/mod.rs:351
  30: <fxhash::FxHasher as core::default::Default>::default
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/slice/mod.rs:670
  31: alloc::string::String::push_str
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/for_each.rs:11
  32: <fxhash::FxHasher as core::default::Default>::default
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.0.3/src/iter/mod.rs:345
  33: shred::dispatch::stage::Stage::setup
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.7.2/src/dispatch/stage.rs:102
  34: shred::dispatch::dispatcher::Dispatcher::dispatch_par::{{closure}}
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.7.2/src/dispatch/dispatcher.rs:87
  35: <alloc::collections::CollectionAllocErr as core::convert::From<core::alloc::LayoutErr>>::from
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/thread_pool/mod.rs:124
  36: rayon_core::registry::WORKER_THREAD_STATE::__init
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/registry.rs:356
  37: <rayon_core::job::JobRef as core::cmp::PartialEq>::eq
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/job.rs:113
  38: <shred::res::Resources as core::default::Default>::default
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panic.rs:309
  39: core::alloc::Layout::repeat
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panicking.rs:297
  40: panic_unwind::dwarf::eh::read_encoded_pointer
             at src/libpanic_unwind/lib.rs:87
  41: core::alloc::Layout::repeat
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panicking.rs:276
  42: rayon_core::FnContext::migrated
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panic.rs:388
  43: <alloc::collections::CollectionAllocErr as core::convert::From<core::alloc::LayoutErr>>::from
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/unwind.rs:18
  44: <rayon_core::job::JobRef as core::cmp::PartialEq>::eq
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/job.rs:113
  45: rayon_core::job::JobRef::execute
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/job.rs:60
  46: rayon_core::registry::WorkerThread::wait_until_cold::{{closure}}
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/registry.rs:584
  47: rayon_core::registry::WorkerThread::take_local_job
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/registry.rs:568
  48: rayon_core::registry::WorkerThread::take_local_job
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/registry.rs:544
  49: rayon_core::registry::main_loop
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/registry.rs:666
  50: rayon_core::registry::Registry::new::{{closure}}
             at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.4.1/src/registry.rs:135
  51: <alloc::collections::CollectionAllocErr as core::convert::From<core::alloc::AllocErr>>::from
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/sys_common/backtrace.rs:135
  52: <alloc::vec::SetLenOnDrop<'_> as core::ops::drop::Drop>::drop
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/thread/mod.rs:469
  53: alloc::raw_vec::alloc_guard
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panic.rs:309
  54: std::thread::panicking
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panicking.rs:297
  55: panic_unwind::dwarf::eh::read_encoded_pointer
             at src/libpanic_unwind/lib.rs:87
  56: std::thread::panicking
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panicking.rs:276
  57: std::sys::unix::condvar::Condvar::wait
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/panic.rs:388
  58: <alloc::vec::SetLenOnDrop<'_> as core::ops::drop::Drop>::drop
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/libstd/thread/mod.rs:468
  59: core::hash::sip::u8to64_le
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/liballoc/boxed.rs:749
  60: std::sys::unix::thread::Thread::new::thread_start
             at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9/src/liballoc/boxed.rs:759
             at src/libstd/sys_common/thread.rs:14
             at src/libstd/sys/unix/thread.rs:81
  61: _pthread_body
  62: _pthread_start

Add buttons for pause, play, speed up

Users should be able to click on a UI button to pause/play or speed up the game. If the button is pressed, the button is displayed in a downstate.

See mockup.

It is not necessary to wait for #27 and #28 to be implemented before starting this. Just log something to the console.

Initial collision system

A quick solution should be implemented until a real collision system exists. For now we consider entities to have a circle as their bounds.

The collision system should:

  1. Calculate (based on radius) what entities intersect each other
  2. If entities intersect, a repelling force is applied so that the entities move away from each other. The repelling force is inversely proportional to the distance between the entities.
  3. An entity in conflict can't move so that the distance to any of the conflict partner decreases.
  4. A collision start event will be dispatched when a collision starts
  5. A collision end event will be dispatched when the collision ends
  6. The spawning should be modified so that there are no conflicts at start

The combat system should be aware of the whole duration of the collision, since attacks are performed every second as long as there is a conflict. Because of that the collision events are split into start and stop events.
Another approach would be to send a collision event every iteration.

The point 3. exists in case an entity collides with two other entities at the same time along one vector, to avoid jittering.

[Benchmark] Syncing from specs-nphysics

erlend_sh: We don’t have a real use case for physics yet but we were thinking we could do something like what they do in StarCraft2: only when a unit dies does it become a ragdoll physics object. Without collision to living units

jaynus: So for the physics portion of things, that I included for a case of:
We need a system that is basically updating all components of a given type almost every frame

erlend_sh: Hmm okay. Would the best thing be to replace our naive collision implementation will full blown nphysics then?
Even though it’d be a bit overkill for our current needs, it’s something we’d want to have eventually anyways

jaynus: Eh, I think thats up to you if your actually planning to go that direction.
Worst case that one is a very easy implementation of "EcsBenchmarkSyncSystem"
that we just write for the test

We're welcome to ideas for what a minimal use case of specs-nphysics (as per the requirements in bold above) might look like for Evoli.

Make the game pausable

Users should be able to pause the game by pressing the P key. There is no need for a UI indicating the pause state because it is clear that the game is paused if no entities move (for now).

The game should be unpaused by pressing ESC or P.

The book contains a section that should help to implement this functionality: https://amethyst.rs/book/latest/concepts/state.html

Show debug info by toggling the 'D' key

Debug info should not be displayed by default. The key 'D' should toggle displaying of the debug info. The debug info should be hidden by disabling the debug systems. One approach to achieve that would be to move them to a separate dispatcher.

[Benchmark] Userless simulation mode

jaynus: We want a userless simulation mode. So can I run Evoli for N frames, full throttle, without user feedback (and preferably faster than realtime)

I know we support game speedup as a core design goal already, so we've got that one covered.

FPS drop after some cycles

Hello folks!

I'm wondering if it is just me or the FPS counter starts to drop fast. After a few seconds the mobs movement isn't smooth anymore. Also, you barely can move the camera, because of this lagging.

Also some glitch like this happens when you move the camera on a low fps:
image

I'm using Ubuntu 18.04, on i7, 16 GB and GT 720. Don't know if this is a linux only behaviour.

This is strange for me, because the ECS style should distribute the work even if you have a high number of entities, but on this case, with just a few hundred the system starts to get high load. This is the Evoli implementation itself that needs to be improved or is the amethyst ECS that isn't production ready yet?

Thanks!

Add an attack animation

When an entity performs an attack, the entity should offset its sprite towards the defending entity, making it look like the entity jumps on the other entity.

The entities position should not be modified.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.