about summary refs log tree commit diff
path: root/package.yaml
AgeCommit message (Collapse)AuthorFilesLines
2020-05-11 Add a very basic, naive auto-move commandGriffin Smith1-0/+4
Add a very basic, naive auto-move command, which just steps the player in a direction until they collide with something, regardless of any surrounding beasties who might want to eat them. There's a lot of other stuff going on here - in order to get this working the way I wanted with a slight (I settled on 50ms) delay between every step in these autocommands while still redrawing in between I had to do all the extra machinery for custom Brick events with a channel, and then at the same time adding the bits for actually executing autocommands in a general fashion (because there will definitely be more!) hit my threshold for size for App.hs which sent me on a big journey to break it up into smaller files -- which seems actually like it was quite successful. Hopefully this will help with compile times too, though App.hs is still pretty slow (maybe more to do here).
2020-05-11 Add ViewPatterns to default-extensionsGriffin Smith1-0/+1
Seems relatively harmless
2020-01-04 Add support for multiple levelsGriffin Smith1-0/+3
Add a data structure, based on the zipper comonad, which provides support for multiple levels, each of which is its own entity map. The current level is provided by coreturn, which the `entities` lens has been updated to use. Nothing currently supports going up or down levels yet - that's coming next.
2019-12-31 Prompt before overwriting files when savingGriffin Smith1-0/+1
When saving the game to a file that already exists, prompt for whether or not to overwrite the file. Since this was the first instance of a prompt triggered by another prompt, this also had to do a minor fix to swap the order of completing the prompt and clearing it, so that we don't submit the prompt and then immediately clear it.
2019-12-30 Add dungeon level generationGriffin Smith1-0/+6
Add a dungeon level generator, which: 1. generates an infinite sequence of rectangular rooms within the dimensions of the level 2. removes any duplicates from that sequence 3. Generates a graph from the delaunay triangulation of the centerpoints of those rooms 4. Generates the minimum-spanning-tree of that delaunay triangulation, with weights given by line length in points 5. Adds back a subset (default 10-15%) of edges from the delaunay triangulation to the graph 6. Uses the resulting graph to draw corridors between the rooms, using a random point on the near edge of each room to pick the points of the corridors
2019-12-30 Fix circle rendering, add filled circleGriffin Smith1-0/+3
Make raster circle rendering use the Rasterific package instead of attempting desperately to hand-roll it, and add a method for generating filled circles.
2019-12-23 Add a drop commandGriffin Smith1-1/+0
Add a drop command, bound to 'd', which prompts the character for an item in their inventory, removes it from the inventory, and places it on the ground. Along the way I had to fix a bug in the `EntityMap.atPosition` lens, which was always appending to the existing entities at the position on set, without removing the entities that were already there - the rabbit hole of quickchecking the lens laws here also lead to replacing the target of this lens with a newtype called `VectorBag`, which ignores order (since the entitymap makes no guarantees about order of entities at a given position).
2019-11-30 Fix an injectivity issue with saving the gameGriffin Smith1-0/+3
Fix an injectivity issue with JSON-encoding the entity map that was causing the game saving to not properly round-trip. As part of this, there's a refactor to the internals of the entity map to use sets instead of vectors, which should also get us a nice perf boost.
2019-11-29 Use menus for combat and picking up itemsGriffin Smith1-0/+1
Refactor a bunch of stuff around to allow for polymorphically surfacing an EntityChar for all entities, and use this to write a generic `entityMenu` function, which generates a menu from the chars of a list of entities - and use that to fully implement (removing `undefined`) menus for both attacking and picking things up when there are multiple entities on the relevant tile.
2019-11-29 Implement saving+loading the gameGriffin Smith1-0/+2
Implement ToJSON and FromJSON for all of the various pieces of the game state, and add a pair of functions saveGame/loadGame implementing a prism to save the game as zlib-compressed JSON. To test this, there's now Arbitrary, CoArbitrary, and Function instances for all the parts of the game state - to get around circular imports with the concrete entities this unfortunately is happening via orphan instances, plus an hs-boot file to break a circular import that was just a little too hard to remove by moving things around. Ugh.
2019-10-06 Allow eating edible itemsGriffin Smith1-0/+1
Add menu support to the prompt system, and an "Eat" command that prompts for an item to eat and eats the item the character specifies, restoring an amount of hitpoints configurable via the item raw type.
2019-09-28 Tweak gormlak movement slightlyGriffin Smith1-0/+3
- Don't let gormlaks run into things like walls or each other - Add a small element of randomness to gormlaks' motion - Increase gormlaks' vision by a large amount
2019-09-28 Implement the start of creature AIGriffin Smith1-0/+1
Add a Brain class, which determines for an entity the set of moves it makes every step of the game, and begin to implement that for gormlaks. The idea here is that every step of the game, a gormlak will move towards the furthest-away wall it can see.
2019-09-19 Add items and inventoryGriffin Smith1-0/+1
Add a new "Item" entity, which pulls from the previously-existent ItemType raw, and add a "PickUp" command which takes the (currently *only*) item off the ground and puts it into the inventory.
2019-09-07 Add cellular-automata cave generatorGriffin Smith1-0/+2
Add a cellular-automata-based cave level generator, plus an optparse-applicative-based CLI for invoking level generators in general.
2019-09-02 Add raws, loaded statically from a folderGriffin Smith1-0/+1
Add raw types with support for both creatures and items, loaded statically from a "raws" folder just like in the Rust version.
2019-09-01 Implement messagesGriffin Smith1-2/+20
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-08-31 Add entities, and allow walking aroundGriffin Smith1-7/+12
Add support for entities via a port of the EntityMap type, and implement command support starting at basic hjkl.
2019-08-25 An @-sign in a box, in haskellGriffin Smith1-0/+79
Initial commit of a Haskell version of Xanthous, written using Brick and built with Nix. This is so much nicer and so much easier