MCPcopy Index your code
hub / github.com/dpc/rhex

github.com/dpc/rhex @0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.0.1 ↗ · + Follow
90 symbols 178 edges 11 files 10 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build Status

rhex

Introduction

Simple roguelike prototype written in Rust.

You can try it out by pointing your ssh client to: rhex [at] rhex.dpc.pw (password is obvious). Note: Make sure your terminal supports 256 colors and exports TERM=xterm-256color!

It's intendent to exercise my Rust knowledge and let me play with certain mechanisms that I'd like to see in roguelike game:

  • hexagonal map
  • tactical positioning (strafing, face-direction)

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

This project is based on more general and useful: hex2d-rs - Hexagonal grid map utillity library.

Overview

RustyHex screenshot

Building

git clone https://github.com/dpc/rhex.git
cd rhex
cargo build

Status and goals

ATM. the game is just a working prototype. There's not much of gameplay yet.

Some core features that it already implements: simple AI, LoS, lighting, random map generation, areas, autoexplore command.

Core features that I'd like to add soon:

  • sound (actions make noise that propagates)
  • combat
  • working stats
  • stairs
  • items/inventory

Report problems and ideas

How to play

Basics

  • Use hjkl or arrow keys to move.
  • Press o to autoexplore
  • Hold Shift to strafe (with Left/Right move)
  • Press . to wait.

Extension points exported contracts — how you extend this code

Window (Interface)
(no doc) [3 implementers]
src/ui/curses.rs
UiFrontend (Interface)
(no doc) [1 implementers]
src/ui/mod.rs

Core symbols most depended-on inside this repo

get
called by 15
src/ui/curses.rs
tile_at
called by 6
src/game/mod.rs
is_passable
called by 5
src/game/tile.rs
sees
called by 4
src/actor.rs
knows
called by 4
src/actor.rs
los
called by 3
src/algo.rs
generate_continue_coridor
called by 3
src/generate.rs
spawn
called by 3
src/game/mod.rs

Shape

Method 56
Class 15
Enum 9
Function 8
Interface 2

Languages

Rust100%

Modules by API surface

src/ui/curses.rs17 symbols
src/game/mod.rs16 symbols
src/ui/mod.rs10 symbols
src/actor.rs10 symbols
src/game/tile.rs8 symbols
src/algo.rs8 symbols
src/generate.rs7 symbols
src/game/controller.rs5 symbols
src/game/area.rs4 symbols
src/ai.rs4 symbols
src/main.rs1 symbols

For agents

$ claude mcp add rhex \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact