ASCII terminal hexagonal map roguelike written in Rust

Related tags

Games rhex
Overview

rhex

Build Status Gitter Chat

Contributors welcome!

Rhex is looking for contributors. See Contributing page for details.

Introduction

Simple ASCII terminal hexagonal map roguelike written in Rust.

You can try the game without installing anything. Check rhex demo server instructions.

The core goal of the project:

  • ASCI/Unicode pure terminal UI first
  • hexagonal map with tactical positioning

It's also intendent to exercise and practice my Rust knowledge.

Previous iteration of this idea was/is: Rustyhex . This two project might merge into whole at some point.

Rhex is using hex2d-rs - Hexagonal grid map utillity library.

Overview

rhex v0.0.3 screenshot

Watch rhex gameplay video:

asciicast

Running

Game requires terminal with 256 colors support, and Unicode font.

git clone https://github.com/dpc/rhex.git
cd rhex
cargo run --release

Note that you must to have the ncurses library installed and linkable for ncurses-rs to work. On Linux, this should be trivial. On OS X, consider installing ncurses using Homebrew. (Note that you have to force Homebrew to link the library to /usr/local/lib: brew link --force ncurses and set that path to LIBRARY_PATH environmental variable.)

Status

The game is playable but not feature and gameplay wise complete.

rhex is actively seeking collaborators. If you'd like to practice your Rust or/and find roguelikes interesting ping @dpc on rhex gitter channel and we can get your started.

Report problems and ideas

Comments
  • detect when started in non-256 colour mode and bottle out

    detect when started in non-256 colour mode and bottle out

    Currently the game will take over the screen regardless, but you can't see anything clearly. It's impossible to Ctrl-C or Ctrl-Z the game, you can only kill it from another terminal (you can also quit via the in-game commands if you have them memorised, but that isn't much help).

    opened by tinyplasticgreyknight 2
  • Implement a more natural Left Hand Mode

    Implement a more natural Left Hand Mode

    Moving right or left moves the player slightly forward all the time due to the hexagonal layout. This perfectly fits the Q and E keys which are next to the W key which is the key for moving forward. Also, moving left and right is something that the player probably won't use as often as turning left and right. So by putting the turning on the AD of the WASD keys that players are used to, they immediately are comfortable with the controls.

    opened by CryZe 1
  • ncurses has setlocale; drop libc. Use ncurses::chtype. |= attrs into glyph

    ncurses has setlocale; drop libc. Use ncurses::chtype. |= attrs into glyph

    Also changed from en_US-UTF8 to empty string as not all systems have en_US

    Changed self.dot to be NORMAL_DOT, will modify back to UNICODE_DOT once fixed

    opened by serprex 1
  • Few stuff

    Few stuff

    1. How to get out from Inventory ? ESC - Just write it in inventory
    2. How to use health potion from inventory I got : a - health potion a have pressed "a" and nothing hapend
    3. When i died the game fall in the loop counting turns up
    4. How to kill f****g rat :D
    5. What examine is for ?
    6. One time the game has crap and I could go out of the map
    opened by ObelI 1
  • 1) upgraded num, rand, hex2d-dpcext crate dependencies, updated relat…

    1) upgraded num, rand, hex2d-dpcext crate dependencies, updated relat…

    …ed features, and refactored usage; 2) refactored deprecated operators and hex2d breaking changes; 3) fixed bug in firing action

    When I attempted to build rhex recently, the build failed (I forget where exactly). I took the opportunity to upgrade crate dependencies while fixing the issue, and fixed a couple other issues while I was refactoring.

    This change requires the hex2d-dpcext changes (recently requested) to be published with incremented version.

    opened by tzargoth 0
  • cargo update

    cargo update

    ncurses has accepted your upstream change except that their typechecking is now broken because they don't respect semantic versioning. So couldn't get back to using upstream ncurses

    opened by serprex 0
  • Build broken due to hex2d-dpcext dependency

    Build broken due to hex2d-dpcext dependency

    Recent commit 7ae336f295f0bc19d4f3bb505e1fd3b8c842f0c3 seems to have broken the build. It updated the hex2d-dpcext dependency, but this seems to cause the following build issue:

    $ cargo build
        Updating crates.io index
    error: failed to select a version for the requirement `hex2d-dpcext = "^0.1.1"`
    candidate versions found which didn't match: 0.1.0, 0.0.9, 0.0.8, ...
    location searched: crates.io index
    required by package `rhex v0.1.1 (/home/thomas/projets/rhex)`
    
    opened by tpetazzoni 3
  • What to do about controls?

    What to do about controls?

    Because the engine has: lighting, noise, and positioning it gives nice possibilities:

    • socoban-like puzzles/actions
    • sneaking (one can hide in the dark, and sneak from behind to kill a powerful monster easily)

    This however complicates the controls. Not only there's `Move/Attack Forward/Backward, Turn Left/Right, but also Move/Attack Left/Right, Charge (double move forward, could also be used to jump through holes).

    I've also (maybe needlessly) added a surrounding-moves (u and i). On top of it, there's Shift+k, which autotravels moving forward.

    As a Vim user, it's natural for me to use hjkl, but it might not be natural for everyone, so I've added basic arrows support. The problem with arrow keys is that in ncurses, it's hard/impossible to tell Shift+Arrow and Alt+Arrow. Ctrl+Arrow seems to work somewhat.

    I wonder if forcing people to use hjkl is OK, and can arrows be added. Numerical keyboard could work too, but I don't own a single keyboard with numpad.

    opinions wanted 
    opened by dpc 5
Owner
Dawid Ciężarkiewicz
Excuse me, sir, do you have a moment to talk about rewriting everything in our Lord and Savior, Rust programming language?
Dawid Ciężarkiewicz
A roguelike game in Rust

A fantasy deathcrawl in Rust Work in progress. To run, with Rust compiler and Cargo package manager installed: cargo run --release When building on W

Risto Saarelma 347 Nov 21, 2022
A minesweeper game with a terminal and graphical interface

Mine A minesweeper game with a terminal and graphical interface created by Koen Westendorp. Installation Go ahead and try out for yourself! :) git clo

Koen Westendorp 3 Dec 22, 2022
4fun open-source Cave Story reimplementation written in Rust

doukutsu-rs Download latest Nightly builds (Requires being logged in to GitHub) A re-implementation of Cave Story (Doukutsu Monogatari) engine written

null 564 Jan 1, 2023
A Doom Renderer written in Rust.

Rust Doom A little Doom 1 & 2 Renderer written in Rust. Mostly written while I was learning the language about 2 years ago, so it might not the best e

Cristi Cobzarenco 2.2k Jan 1, 2023
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
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
A Gameboy emulator written in Rust

An open source Gameboy emulator written in Rust that can use a command line interface as a screen and input device.

Blake Loring 237 Dec 7, 2022
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
Simple wordle clone written in Rust.

wordle-rs A small wordle clone built in rust. Note: There are a lot of weird words I've never even heard in the dictionary file. If anyone knows a bet

Dheeraj Prakash 1 Feb 2, 2022
Playboy is a Nintendo Gameboy emulator for the Panic Playdate written in Rust

Playboy Playboy is a Nintendo Gameboy emulator for the Panic Playdate! Building Playdate isn't exactly a Tier 1 platform for Rust :) As a result, the

Adam Soutar 121 Jan 5, 2023
Angolmois BMS player, Rust edition

Angolmois Rust Edition This is a direct, one-to-one translation of Angolmois to Rust programming language. Angolmois is a BM98-like minimalistic music

Kang Seonghoon 95 Oct 20, 2022
Snake implemented in rust.

rsnake - An implementation of classic snake in rust This game was built using the piston_window window wrapper. Download the game If youre using mac-o

Maximilian Schulke 85 Jan 7, 2023
An implementation of Sokoban in Rust

sokoban-rs This is an implementation of Sokoban in the Rust Programming Language. An example level: Build Instructions Before building sokoban-rs, you

Sébastien Watteau 137 Dec 23, 2022
A personal etude into rust software (RPG<-it's more fun to debug) development: Tales of the Great White Moose

TGWM (Tales of the Great White Moose) NB: Currently compiles. Should compile and run on both 1.28.0 and 1.31.1 if the Cargo.lock files are deleted. A

null 15 Nov 17, 2021
😠⚔️😈 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
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 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
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
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