about summary refs log tree commit diff
path: root/src/Xanthous/Entities/Creature.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-11-15 Recover character hitpoints over timeGriffin Smith1-2/+2
Wrap hitpoints in a newtype, and recover character hitpoints over time
2019-10-16 Add draw priorityGriffin Smith1-2/+2
Rather than blindly taking one entity from the list when we have multiple entities on the same tile, add a `drawPriority` method to the Draw typeclass which allows individual entities to request to be drawn on top - this avoids the "noodles floating over your head" bug we saw before.
2019-10-13 Implement speed and ticksGriffin Smith1-5/+64
Gormlaks now move 1/8th the speed of the character, which means we can run away from them - yay! Unfortunately this also introduces a bug where they'll eventually get stuck and not do anything, so I'll be tackling that next.
2019-09-28 Tweak gormlak movement slightlyGriffin Smith1-1/+1
- 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-5/+6
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-21 Implement combatGriffin Smith1-3/+11
Put a bunch of gormlaks randomly on the level, and implement combat via damaging those gormlaks by one point.
2019-09-20 Describe what you see when you walk over itemsGriffin Smith1-5/+7
Every step the character takes, describe the entities at that position excluding the character.
2019-09-20 Add doors and an open commandGriffin Smith1-0/+4
Add a Door entity and an Open command, which necessitated supporting the direction prompt. Currently nothing actually puts doors on the map, which puts a slight damper on actually testing this out.
2019-09-19 Add items and inventoryGriffin Smith1-10/+15
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-15 Progressively reveal the map to the playerGriffin Smith1-1/+4
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-02 Put a test gormlak on the screenGriffin Smith1-0/+32
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)