A roguelike game in Rust

Related tags

Games magog
Overview

A fantasy deathcrawl in Rust

Work in progress.

To run, with Rust compiler and Cargo package manager installed:

cargo run --release

When building on Windows, you may need to have MinGW gcc installed and in PATH for cargo to be able to build all the necessary dependencies.

Instructions

Better UX is planned. Current gameplay is keyboard only:

QWE,ASD: move around

Esc: Open inventory screen

Space: Wait for turn

Screenshots

From October 2017

shot1

shot2

shot3

Comments
  • panic when running on mac

    panic when running on mac

    I still can't run the game on mac os. I use stable rust 1.0.0 and run the project with 'cargo run'. Accompanied with --verbose it gives me:

    thread '

    ' panicked at 'called Result::unwrap() on an Err value: CompilationError("ERROR: 0:3: 'attribute' : syntax error: syntax error\n")', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/libcore/result.rs:729 Process didn't exit successfully: target/debug/magog (exit code: 101)

    If I run it with --release, then the next error occurs:

    error: could not find rlib for: calx_macros Could not compile magog.

    opened by mgadzhi 7
  • problem with glutin on osx

    problem with glutin on osx

    I ran magog with cargo run --release.

    It opens the game window and immediately errors out:

         Running `target/release/magog`
    Magog v0.1.0-alpha+g2365d6f
    rustc 1.0.0-nightly (e2fa53e59 2015-03-20) (built 2015-03-20)
    
    thread '<main>' panicked at 'not yet implemented', /Users/jmitchell/.cargo/registry/src/github.com-1ecc6299db9ec823/glutin-0.0.12/src/cocoa/mod.rs:591
    thread '<main>' panicked at 'not yet implemented', /Users/jmitchell/.cargo/registry/src/github.com-1ecc6299db9ec823/glutin-0.0.12/src/cocoa/mod.rs:591
    stack backtrace:
       1:        0x1082b75df - sys::backtrace::write::hadb1455a57ee2267A7C
       2:        0x1082b863d - panicking::on_panic::hb14107ef264d170efXI
       3:        0x1082aea59 - rt::unwind::begin_unwind_inner::h8da2f07c00df904aZFI
       4:        0x10823976f - rt::unwind::begin_unwind::h15946664856272882207
       5:        0x108218262 - backend::Rc<T>.Backend::is_current::h646504145715981977
       6:        0x1081f202d - context::Context::make_current::h209a50ce9a80ee6a72u
       7:        0x1081f21b9 - DisplayImpl.Drop::drop::hca38c6a63bd351c4t5U
       8:        0x1081da0c2 - glium..DisplayImpl::drop.7404::h8481bf0a6cf36476
       9:        0x1081d32b9 - canvas::CanvasBuilder::run::ha447817254992976Nda
      10:        0x1081c9a2b - main::had79dfd8d394f317PQb
      11:        0x1082c9e68 - rust_try_inner
      12:        0x1082c9e55 - rust_try
      13:        0x1081ccbbe - main
    thread panicked while panicking. aborting.
    An unknown error occurred
    
    To learn more, run the command again with --verbose.
    
    opened by jlmitch5 7
  • The project fails to build because of png crate

    The project fails to build because of png crate

    I have cloned the repo and cargo run --release but the crate called png cannot be downloaded:

        Updating git repository `https://github.com/rsaarelm/calx`
        Updating git repository `https://github.com/rsaarelm/vitral`
     Downloading rand v0.5.1
     Downloading glium v0.21.0
     Downloading calx-ecs v0.6.1
     Downloading euclid v0.17.3
     Downloading scancode v0.1.2
     Downloading image v0.19.0
     Downloading scoped_threadpool v0.1.9
    warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/scoped_threadpool/0.1.9/download`, got 500
     Downloading png v0.12.0
    warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/png/0.12.0/download`, got 500
    warning: spurious network error (1 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/png/0.12.0/download`, got 500
    error: unable to get packages from source
    
    Caused by:
      failed to get 200 response from `https://crates.io/api/v1/crates/png/0.12.0/download`, got 500
    
    opened by rococtz 2
  • Crashes on macOS

    Crashes on macOS

    When trying to build, I get this error:

    thread 'main' panicked at 'assertion failed: end <= len', src/libcollections/vec.rs:1113
    stack backtrace:
       0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
       1: std::panicking::default_hook::{{closure}}
       2: std::panicking::default_hook
       3: std::panicking::rust_panic_with_hook
       4: std::panicking::begin_panic
       5: std::panicking::begin_panic_fmt
       6: rust_begin_unwind
       7: core::panicking::panic_fmt
       8: core::panicking::panic
       9: world::worldgen::Worldgen::gen_caves
      10: world::worldgen::Worldgen::new
      11: world::world::World::new
      12: magog::main
      13: __rust_maybe_catch_panic
      14: std::rt::lang_start
    

    I am using rust version 1.19.0 on macOS Sierra 10.12.4.

    opened by Addisonbean 2
  • "non-ident macro paths are experimental" when building

    Ever seen these errors? I don't know enough about Rust to know how to fix them.

    error[E0658]: non-ident macro paths are experimental (see issue #35896)
      --> world/src/biome.rs:95:17
       |
    95 |                 die!("Failed to join map");
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
    
    error[E0658]: non-ident macro paths are experimental (see issue #35896)
       --> world/src/map.rs:147:21
        |
    147 |                     die!("Unknown map glyph '{}'", c);
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
    
    error[E0658]: non-ident macro paths are experimental (see issue #35896)
       --> world/src/map.rs:331:13
        |
    331 |             die!("No room left");
        |             ^^^^^^^^^^^^^^^^^^^^^
        |
        = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
    
    error: aborting due to 3 previous errors
    
    opened by geluso 1
  • serde::export::From<std::io::Error> not implemented

    serde::export::From not implemented

    When building with nightly rust on Windows, I get the following error:

    > rustc --version
    rustc 1.22.0-nightly (4502e2aa9 2017-10-03)
    
    > cargo build
    error[E0277]: the trait bound `errors::Error: serde::export::From<std::io::Error>` is not satisfied
      --> world\src\mapfile.rs:39:5
       |
    39 |     write!(output, "{}", MapSave { map, legend })?;
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `serde::export::From<std::io::Error>` is not implemented for `errors::Error`
       |
       = help: the following implementations were found:
                 <errors::Error as serde::export::From<ron::ser::Error>>
                 <errors::Error as serde::export::From<ron::de::Error>>
                 <errors::Error as serde::export::From<errors::ErrorKind>>
                 <errors::Error as serde::export::From<&'a str>>
                 <errors::Error as serde::export::From<std::string::String>>
       = note: required by `serde::export::From::from`
    

    Is this an easy fix? I'm still learning error_chain and Rust in general.

    opened by kevinw 0
  • wgpu 0.10 and other dependencies updates

    wgpu 0.10 and other dependencies updates

    I wanted to continue with the update of the wgpu to version 0.11 but I get a validation error on the shader that I do not know how to fix. I hope this PR can be useful to you. (I find that Magog is a nice roguelike and particular because of the hexagons)

    opened by CatCode79 0
  • Bump regex from 1.5.4 to 1.5.6

    Bump regex from 1.5.4 to 1.5.6

    Bumps regex from 1.5.4 to 1.5.6.

    Changelog

    Sourced from regex's changelog.

    1.5.6 (2022-05-20)

    This release includes a few bug fixes, including a bug that produced incorrect matches when a non-greedy ? operator was used.

    1.5.5 (2022-03-08)

    This releases fixes a security bug in the regex compiler. This bug permits a vector for a denial-of-service attack in cases where the regex being compiled is untrusted. There are no known problems where the regex is itself trusted, including in cases of untrusted haystacks.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump num-bigint from 0.4.2 to 0.4.3

    Bump num-bigint from 0.4.2 to 0.4.3

    Bumps num-bigint from 0.4.2 to 0.4.3.

    Changelog

    Sourced from num-bigint's changelog.

    Release 0.4.3 (2021-11-02)

    Contributors: @​arvidn, @​cuviper, @​guidovranken

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump crossbeam-utils from 0.8.5 to 0.8.8

    Bump crossbeam-utils from 0.8.5 to 0.8.8

    Bumps crossbeam-utils from 0.8.5 to 0.8.8.

    Release notes

    Sourced from crossbeam-utils's releases.

    crossbeam-utils 0.8.8

    • Fix a bug when unstable loom support is enabled. (#787)

    crossbeam-utils 0.8.7

    • Add AtomicCell<{i*,u*}>::{fetch_max,fetch_min}. (#785)
    • Add AtomicCell<{i*,u*,bool}>::fetch_nand. (#785)
    • Fix unsoundness of AtomicCell<{i,u}64> arithmetics on 32-bit targets that support Atomic{I,U}64 (#781)

    crossbeam-utils 0.8.6

    • Re-add AtomicCell<{i,u}64>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor} that were accidentally removed in 0.8.0 0.7.1 on targets that do not support Atomic{I,U}64. (#767)
    • Re-add AtomicCell<{i,u}128>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor} that were accidentally removed in 0.8.0 0.7.1. (#767)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
Risto Saarelma
Risto Saarelma
ASCII terminal hexagonal map roguelike written in Rust

rhex Contributors welcome! Rhex is looking for contributors. See Contributing page for details. Introduction Simple ASCII terminal hexagonal map rogue

Dawid Ciężarkiewicz 137 Dec 2, 2022
The video game for Fonts of Power. A tabletop roleplaying game made in Rust with Bevy!

The code and rules for Fonts of Power, a tactical TTRPG / video game about exploring magical places. You can follow its development in our Discord ser

null 25 Dec 23, 2022
Red Light, Green Light is a traditional Korean children's game, popularised by the Squid Game TV series.

Red Light, Green Light Red Light, Green Light is a traditional Korean children's game, popularised by the Squid Game TV series. This project is the di

Cedric Chee 1 Jan 10, 2022
A game inspired by the classic atari game: demon attack

rusty_demon_attack A game inspired by the classic atari game: demon attack You can play the game in the web!

null 58 Jan 4, 2023
😠⚔️😈 A minimalistic 2D turn-based tactical game in Rust

Zemeroth is a turn-based hexagonal tactical game written in Rust. Support: patreon.com/ozkriff News: @ozkriff on twitter | ozkriff.games | facebook |

Andrey Lesnikóv 1.3k Jan 5, 2023
⬡ Zone of Control is a hexagonal turn-based strategy game written in Rust. [DISCONTINUED]

Zone of Control The project is discontinued Sorry, friends. ZoC is discontinued. See https://ozkriff.github.io/2017-08-17--devlog.html Downloads Preco

Andrey Lesnikóv 354 Nov 14, 2022
This is a simple implementation of the classic snake game in rust

My snake game Looks like this. This is with Roboto Mono Nerd Font. If you use a different font it may look different or distorted. Install rust In ord

Konstantinos Kyriakou 16 Apr 4, 2021
The classic tetris game written in Rust using ncurses

tetris.rs This is the classic tetris game I wrote to have a bit of fun with Rust. Installation and playing cargo install --

null 71 Jul 25, 2022
A refreshingly simple data-driven game engine built in Rust

What is Bevy? Bevy is a refreshingly simple data-driven game engine built in Rust. It is free and open-source forever! WARNING Bevy is still in the ve

Bevy Engine 21.1k Jan 3, 2023
Data-oriented and data-driven game engine written in Rust

What is Amethyst? Amethyst is a data-driven and data-oriented game engine aiming to be fast and as configurable as possible. Principles These principl

Amethyst Engine 7.9k Dec 31, 2022
Rust library to create a Good Game Easily

ggez What is this? ggez is a Rust library to create a Good Game Easily. The current version is 0.6.0-rc0. This is a RELEASE CANDIDATE version, which m

null 3.6k Jan 4, 2023
Minesweeper game developed with Rust, WebAssembly (Wasm), and Canvas

?? click here to play the game ?? Minesweeper game Revealing all the cells without hitting the mines is the task. Each number in the cell denotes how

Karthik Nedunchezhiyan 23 Dec 28, 2022
Snake Game in rust for the web

About This template shows how to create a web app using Yew and wasm-pack. ?? Usage ??️ Build When building for the first time, ensure to install depe

PsiAphex 1 Oct 24, 2021
A solver for the popular Wordle game written in Rust.

Wordle Solver A solver for the popular Wordle game written in Rust. It does not attempt to be the most efficient solver possible but tries to avoid us

William Hoggarth 2 Jul 1, 2022
A simple power 4 game wrote in Rust.

?? ?? Power 4 This is a simple power 4 game wrote in native Rust. There's only one dependencie for colored terminal. ❓ How to try it? To try this game

null 1 Apr 25, 2022
A finnish version of the word guessing game Wordle implemented in Rust.

Sanuli A finnish version of the word guessing game Wordle implemented in Rust. Live version running at sanuli.fi. Quick start Follow Rust installation

Jaakko Husso 59 Nov 29, 2022
👾 The classic Space Invaders game made in rust!

?? Invaders The classic space-shooter game now in your terminal! And the good part: made in Rust! ❕ This game was made during the course Ultimate Rust

João Augusto Perin 1 Feb 8, 2022
A block game made in Rust and SFML

septadrop A block game made in Rust and SFML. For packaging instructions, see the build folder. Game Controls ??/?? arrow keys: horizontal movement ??

Elnu 1 Dec 19, 2022
🚢 Battleship game implemented in Rust

?? Battleship game implemented in Rust. Fully playable between 2 players on the terminal. To play on the public instance: $ nc battleship.o

Orhun Parmaksız 55 Jan 2, 2023