Commit graph

10 commits

Author SHA1 Message Date
Griffin Smith
58fce2ec19 Progressively reveal the map to the player
As the character walks around the map, progressively reveal the entities
on the map to them, using an algorithm based on well known
circle-rasterizing and line-rasterizing algorithms to calculate lines of
sight that are potentially obscured by walls.
2019-09-15 17:30:57 -04:00
Griffin Smith
c06edf3cc6 Place the chacracter in the level at startup time
Randomly select a position in the largest contiguous region of the
generated level in which to place the character at startup time.
2019-09-13 15:24:05 -04:00
Griffin Smith
9ebdc6fbb4 Convert generated levels to walls
Add support for converting generated levels to walls, and merge one into
the entity map at the beginning of the game.

There's nothing here that guarantees the character ends up *inside* the
level though (they almost always don't) so that'll have to be slotted
into the level generation process.
2019-09-09 20:54:33 -04:00
Griffin Smith
f03ad6bbd6 Add cellular-automata cave generator
Add a cellular-automata-based cave level generator, plus an
optparse-applicative-based CLI for invoking level generators in general.
2019-09-07 14:52:37 -04:00
Griffin Smith
73a52e531d Put a test gormlak on the screen
Implement a concrete "Creature" entity, and place one on the screen at
the game startup for testing.

This revealed a bug with drawing when getting the maximum entity
position, but that appears to be fixed now (yay)
2019-09-02 14:45:36 -04:00
Griffin Smith
4d270712ae Add raws, loaded statically from a folder
Add raw types with support for both creatures and items, loaded
statically from a "raws" folder just like in the Rust version.
2019-09-02 13:59:28 -04:00
Griffin Smith
adb3b74c0c Link up messages to the overall game
Add a "say" function for saying messages within an app monad to the
user, and link everything up to display them and track their history
2019-09-02 10:52:01 -04:00
Griffin Smith
2fd3e4c9ad Implement messages
Implement messages almost the same as in the Rust version, only with
YAML instead of TOML this time, and a regular old mustache template
instead of something handrolled. Besides that, pretty much everything
here is the same.
2019-09-01 13:54:27 -04:00
Griffin Smith
4ef19aa35a Add entities, and allow walking around
Add support for entities via a port of the EntityMap type, and implement
command support starting at basic hjkl.
2019-08-31 13:18:51 -04:00
Griffin Smith
d3f3890dc5 An @-sign in a box, in haskell
Initial commit of a Haskell version of Xanthous, written using Brick and
built with Nix.

This is so much nicer and so much easier
2019-08-25 13:28:10 -04:00