about summary refs log tree commit diff
path: root/users/grfn/xanthous (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-11-22 r/3081 refactor(gs/xanthous): Break out inventory into a common moduleGriffin Smith8-247/+293
Creatures are going to have an inventory too now in addition to characters, so all the data types and lenses and stuff that define inventory need to be broken out into a separate module so the Creature entity can use them. Change-Id: I83f1c70d316afaaf2e75901f9dc28f79fd2cd31f Reviewed-on: https://cl.tvl.fyi/c/depot/+/3901 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-11-22 r/3080 refactor(gs/xanthous): Define local field lens aliases in AIGriffin Smith1-8/+13
This slightly improves how the module reads imo Change-Id: Ib1efcbbd5392ece6b46461e8075162f03846d421 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3886 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-11-20 r/3077 fix(gs/xanthous): Check for reaching destination in AIGriffin Smith1-0/+1
Because floating points, it's possible that a creature has reached their destination even if the *progress* to that destination is at 0 - if that happens, they should pick a new destination regardless. This fixes the issue where creatures would occasionally get "stuck" and never move after wandering around for a bit. Change-Id: I01a11ce4bd448c25a818c886825e4fad56dffe03 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3885 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-13 r/3063 feat(gs/xanthous): Allow moving with the arrow keysGriffin Smith1-0/+5
some... *ahem*... very insistent people have been asking for this, despite the fact that it doesn't allow for diagonal movement. Change-Id: Ic58e2435b34e27e3ed399c7b8f3bcbc1f634f6b3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3870 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-13 r/3061 feat(gs/xanthous): Add a Husk creature, with limited generationGriffin Smith9-24/+152
Add a new "husk" creature raw, limited to only being generated on levels >= 1, including support for actually doing that limiting. These guys are gonna get daggers next! Change-Id: Ic4b58dc7ee36b50ced60fec6912cd1b46269d55c Reviewed-on: https://cl.tvl.fyi/c/depot/+/3868 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-13 r/3060 feat(gs/xanthous): Add a broken dagger rawGriffin Smith1-0/+21
The plan is to use this as a test bed for generating creatures wielding items, but for know it just shows up on the ground in places. Change-Id: I8b292606f425cd41bff9e52727f1094886777102 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3867 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-13 r/3059 chore(gs/xanthous): Don't include docs in source closureGriffin Smith1-0/+1
Change-Id: Ib6f2604096fa519f37ec4a2ce762229abca16b26 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3866 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-13 r/3058 docs(gs/xanthous): Start documenting raw typesGriffin Smith1-0/+24
Start documenting the fields of the raw type YAML files and what they mean, to make it easier to write new raw types. Change-Id: I9672b757e89f1cc665d7e90078d83cfd87173d7f Reviewed-on: https://cl.tvl.fyi/c/depot/+/3865 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-13 r/3057 fix(xanthous/server): Mount the key into the docker imageGriffin Smith1-1/+2
mount the host key in as a single-file volume, so the server can actually read it. Change-Id: I5fb58536717c91480d1f4610b6fb3258a36169e0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3864 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-13 r/3056 fix(xanthous/server): Fix decoding secret keyGriffin Smith3-2/+65
The actual function we want for the format we're using is decode_secret_key, not decode_openssh, apparently - covered this with a toneest to make sure. Change-Id: I659226169f213b8464b96aec6b94bf13fd80aac8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3863 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-11-08 r/3028 feat(xanthous/server): Load host secret key from diskGriffin Smith2-5/+29
Rather than randomly generating a new host key every time we run the server, load the host's secret key from a file on disk at startup, so that clients don't have to disable host key verification to connect every time we restart. Change-Id: I4d283bc919f4825789f686a98c174a71929087a6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3819 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-11-08 r/3027 chore(gs/xanthous): Gitignore more state filesGriffin Smith1-0/+3
Gitignore: - *.save, which I use for save-games I want to use as test case reproductions - .tasty-rerun-log, which tasty-rerun uses to save which tests failed on the last run - cabal.project.local-*, since I've got a file on my machine called cabal.project.local~0 so apparently that's a thing now Change-Id: I07c391fa25a84e96efca6771997f280ff12826b5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3818 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-08 r/3026 feat(gs/xanthous): Enable tasty-rerunGriffin Smith5-6/+10
Rerunning only failed tests is nice! To use this, run `cabal new-run test -- --rerun` Change-Id: I9dc4d69749c3e3d5ba8d1661a2fdf73e49cd8ad5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3816 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-11-08 r/3023 fix(gs/xanthous): Don't take up half-width for promptsGriffin Smith1-4/+2
txtWrap takes up half the available width in the viewport, causing the input for prompts to display way too far to the right of the actual prompt. I'm not aware of any actual mutiline prompts, so using txt here makes way more sense. Change-Id: I7f62066f1b07b5d6ba2c7ffed77c87ae33b1dfa5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3814 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-07 r/3021 feat(gs/mugwump): Run xanthous serverGriffin Smith2-2/+41
Add a nixos module for running the xanthous server in a docker container, and install it on mugwump including a prometheus scrape config. Change-Id: Ifeb315845b7eef2ee33af98fa3f71acdd3d9fe6b Reviewed-on: https://cl.tvl.fyi/c/depot/+/3812 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-07 r/3020 feat(xanthous/server): Add simple prometheus metricsGriffin Smith4-11/+589
Add a prometheus exporter and some simple prometheus metrics, so that I can look at dashboards and get alerts for things like lots of connections Change-Id: Ic1e0568200299dc852b74da647a6354267ee7576 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3811 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-07 r/3019 feat(xanthous/server): Add derivation for docker imageGriffin Smith2-1/+26
This appears to work pretty nicely! Change-Id: Icf52f58225ee2837b30ba6187ae3ba3c539de9df Reviewed-on: https://cl.tvl.fyi/c/depot/+/3810 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-07 r/3018 feat(xanthous/server): Run with --disable-savingGriffin Smith1-0/+1
Don't write to my disk, please, random internet people. Change-Id: I1d199fc3675f6ec7630f598bbc33dc7ef7e02e68 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3809 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-07 r/3017 feat(gs/xanthous): Allow disabling savingGriffin Smith4-34/+68
Add a command-line parameter to disable the Save command, so people don't save and fill up my disk when I'm running this on the internet. Change-Id: I2408e60de2d99764ac53c21c3ea784282576d400 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3808 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-07 r/3016 fix(xanthous/server): Accept password authenticationGriffin Smith1-0/+6
Accept password authentication in addition to public key authentication, but ignore the actual password, so that clients without ssh keys configured (or configured to send no ssh keys) can authenticate. Change-Id: I86130b9725d1928ac45b5db55f18c09687ee0fd5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3807 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-11-07 r/3015 feat(gs/xanthous): Add SSH server applicationGriffin Smith9-2/+1912
Add the start of an ssh-compatible server application for playing Xanthous over ssh. The idea here is that the user can ssh with whatever username they like (defaulting obviously to their login username) and then that gets passed as the --name flag to xanthous as they play. Change-Id: I39eec288ac8e22a165e859479888d78158a58818 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3806 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-11-06 r/3012 fix(gs/xanthous): Fix numAliveNeighbors{,M} on the edgeGriffin Smith2-11/+70
numAliveNeighbors was doing bounds checks too aggressively, resulting in always returning 8 for points on the edge, meaning walls weren't getting properly created for those points, making edges of the map open to walk through. Change-Id: Iada6be46ce7cc77ce99a320b7310008898b89273 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3805 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-06 r/3011 fix(gs/xanthous): Don't gen dupe tutorial messagesGriffin Smith2-7/+13
Don't generate tutorial messages on levels other than the first. Change-Id: I7681377461b92f5d5015931b0088bef9d358d2e4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3804 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-06 r/3010 refactor(gs/xanthous): Use a Word for the level numberGriffin Smith3-10/+20
Using a signed Int here is a little silly, since we can never have negative levels. Change-Id: Ibe03be5014226e07dfa6f78d8360301bc1b7c9b1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3803 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-06 r/3009 fix(gs/xanthous): Update hie.yaml for new app/ directoryGriffin Smith1-1/+1
Change-Id: I87c82f22313285085ac53485613b7d9f91b52ed2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3802 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-06 r/3008 feat(gs/xanthous): Default to the current save fileGriffin Smith8-31/+93
When saving, default to the save file that was loaded for the game if any. To support this, this also makes text prompts support a default, which will be used if no value is input. Change-Id: I72a826499d6e987b939e3465a2d29167e53416be Reviewed-on: https://cl.tvl.fyi/c/depot/+/3801 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-10-30 r/2996 fix(gs/xanthous): Preserve character state when going up stairsGriffin Smith1-1/+7
Carry over everything except the character's position when going up stairs, so that eg the character doesn't lose everything they picked up and instantly heal to full when going up a level. Change-Id: I08513578a72f2410a363bbadbb273d95826a3f1b Reviewed-on: https://cl.tvl.fyi/c/depot/+/3766 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-10-30 r/2994 feat(gs/xanthous): Allow throwing rocksGriffin Smith15-87/+450
Implement a first pass at a "fire" command, which allows throwing rocks, the max distance and the damage of which is based on the weight of the item and the strength of the player. Currently the actual numbers here likely need some tweaking, as the rocks are easily throwable at good distances but don't really deal any damage. Change-Id: Ic6ad0599444af44d8438b834237a1997b67f220f Reviewed-on: https://cl.tvl.fyi/c/depot/+/3764 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-10-30 r/2993 feat(gs/xanthous): Send message when restingGriffin Smith2-1/+5
Change-Id: Ib1e7ae6dfcbc2d2e86a28b401e67cd5dd22d6281 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3763 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-09-11 r/2850 refactor(grfn/xanthous): avoid unnecessary recompilationsterni3-61/+3
hpack is a bit dumb when generating the list of modules for a cabal file's component if multiple of them live in the same directory. Specifically it seems to assume that all modules in the source-dirs of a particular component are also necessary for its compilation. This is quite bad in the case of xanthous since both library and executable have source-dirs: src, so all modules will be compiled twice: Once for the library and then again for the executable despite it depending on the library (actually 4 times in total since we need to build a unprofiled and profiled object for each module…). To fix this we just move Main.hs into its own directory and change the executable's source-dirs, so hpack doesn't get confused anymore. Since all components now have their own source-dirs, unnecessary redundant compilation should be down to 0. The diff of the cabal file shows quite nicely how many module recompilation we've gotten rid of. Change-Id: I2df4fab9b0299b3a2b5d3005508c79b2d9796039 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3533 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: grfn <grfn@gws.fyi>
2021-07-06 r/2684 fix(xanthous): Fix display of square/cubic unitsGriffin Smith2-4/+11
Previously this'd display `5 m m³`, because it'd show the underlying value then add the unit suffix on at the end Change-Id: Idd240ddfebc212460f9fb529eff72732a5dafe2a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3241 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-23 r/2682 fix(xanthous): Only use alphabetic chars for menu itemsGriffin Smith6-3/+63
Previously, we were using `smallestNotIn` for selecting new characters for menu items with duplicate chatacters - this uses the 'Bounded' instance for the type, which for Char meant the first character we would always select was \NUL - making it look like the menu item had no character, and making it impossible to actually select the menu item. This introduces an AlphaChar newtype, which is a wrapper around Char whose Bounded and Enum instances only use alphabetic characters (a-ZA-Z) and uses that for menu characters instead. Change-Id: If34ed9e9ce84f2bcb1cb87432cc6273f40b69f72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3229 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-23 r/2681 feat(xanthous): Describe *where* the item is in the inventoryGriffin Smith8-23/+133
When describing items in the inventory, both in detail and when producing menus from those items, describe not just the item itself but also *where* in the inventory the item is (either in the backpack, or wielded in either or both of the hands). This uses a new InventoryPosition datatype, and a method to get a list of items in the inventory associated with their inventory position. When *removing* items from the inventory (to wield, drop, or eat them), we want to make sure we remove from the right position, so this also introduces a `removeItemAtPosition` method to make that happen correctly. Finally, some of the tests for this stuff was getting really slow - I narrowed this down to runaway arbitrary generation for message Templates, so I've tweaked the Arbitrary instance for that type to generate smaller values. Change-Id: I24e9948adae24b0ca9bf13955602108ca9079dcc Reviewed-on: https://cl.tvl.fyi/c/depot/+/3228 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-23 r/2680 feat(xanthous): Add a command to describe an item in the inventoryGriffin Smith8-31/+139
Add a new DescribeInventory command, bound to I, to prompt for an item in the inventory (anywhere in the inventory, including wielded) and display a (new) panel describing it in detail. This description includes the description, the long description, and the item's physical properties (volume, density, and weight). Change-Id: Idc1a05ab16b4514728d42aa6b520f93bea807c07 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3227 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-23 r/2679 feat(xanthous) Generate random volume+density for itemsGriffin Smith9-25/+108
Generate random volumes and densities for items based on the ranges for those two quantities in the raw when building instances of items. Since this is the first time creating an item is impure, this also lifts entity generation into a (random) monadic context Change-Id: I2de4880e8144f7ff9e1304eb32806ed1d7affa18 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3226 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-23 r/2678 feat(xanthous): Track the volume and density of item typesGriffin Smith12-33/+255
Allow the itemType raw to have density and volume fields, both of which represent *intervals* of both density and volume (because both can hypothetically vary a bit). The idea here is that when we're making an *instance* of one of these items, we pick a random value in the range. Lots of stuff in this commit is datatype and typeclass instances to support things like intervals being fields on datatypes that get serialized to saved games - including a manual definition of Ord for Item since Ord isn't well-defined for intervals Change-Id: Ia088f2f75cdce9d00560297e5c269e3310b85bc3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3225 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-18 r/2676 feat(xanthous): Fistfighting builds knuckle callusesGriffin Smith8-20/+229
2000 ticks after the character damages their fists by hitting something, the character now develops calluses on their fists (scaled by *how* damaged they've become) that reduce the chance of them receiving additional damage from hitting things - up to a max of 5, which prevents *all* damage from fistfighting. This is all tracked in a new "Knuckles" struct in a new "Body" struct on the character datatype, which manages stepping itself forward as part of the Brain impl on the character. Change-Id: Ica269f16fb340fb25900d2c77fbad32f10c00be2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3222 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-18 r/2675 feat(xanthous): Add an auto-rest commandGriffin Smith6-12/+35
Add a command that automatically rests (essentially just stepping the game forwards) until the character's hitpoints are back to full. Currently due to the time it takes for the character to heal this takes a bit too long - my thought there is to make the per-step delay for autocommands different depending on the specific autocommand. Change-Id: I40378c29d3d9d19e9787af1f015bde65fd08868c Reviewed-on: https://cl.tvl.fyi/c/depot/+/3221 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-18 r/2674 feat(xanthous): Add configurable natural attacksGriffin Smith7-12/+69
Allow configuring the natural attacks (eg, part of their body rather than an item) of a creature. Each attack has a description and a damage associated with it. Change-Id: I69698a8ac4ee2da91e4c88e419593627519522a5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3220 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-18 r/2672 feat(xanthous): Add an ooze creature typeGriffin Smith2-2/+14
This required making sayVerb optional, as oozes don't say anything Change-Id: I2c7f425ca26d92beef1097eda49d84f00c84c482 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3218 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-18 r/2671 feat(xanthous): Install qpdf in the shellGriffin Smith1-2/+4
This gets us the zlib-flate command line utility, which is useful for decompressing our zlib-compressed save files and poking around in the JSON Change-Id: Ia0d8259d261c4313322d68cc8409ba13f9fb570c Reviewed-on: https://cl.tvl.fyi/c/depot/+/3217 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-18 r/2669 fix(xanthous): Wipe memoized vision when the game updatesGriffin Smith2-3/+9
If the game steps forward, entities could be moving around, so we need to wipe the memoized character vision. Change-Id: If6ea6a8c4bed7aefef90a0a2ab17eff0af9b9bbe Reviewed-on: https://cl.tvl.fyi/c/depot/+/3215 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-14 r/2661 feat(xanthous): Gormlaks yell in gormlak when they see the characterGriffin Smith6-28/+98
Add a new "greetedCharacter" field to the creature hippocampus type, which tracks whether or not that creature has greeted the character yet. In the gormlak AI, when the gormlak sees the character and starts running towards them, if that field is set to False send a message that says that the gormlak yells a single randomly-generated gormlak word at the character, then set the field to true The gormlak yells "gukblom"! Change-Id: I17a388393693a322c2e09390884ed718911b2fc4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3207 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-14 r/2660 feat(xanthous): Add a method to get the name for a type of entityGriffin Smith4-1/+35
I didn't end up using this directly for the thing I was doing, but it still seems generally useful enough that I'm keeping it around for now Change-Id: I05c8902d75845f2230ec2373a9677d61cfaafafd Reviewed-on: https://cl.tvl.fyi/c/depot/+/3206 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-14 r/2659 feat(xanthous): Store language on creaturesGriffin Smith2-1/+29
Add a new "language" field to the CreatureType raw type, which references the *name* of the language that creature speaks (this is so that different creatures can speak the same language without having to duplicate the language definition in the raws). At some point this should change to not hardcode the sets of languages and instead define them in data files like we do for creatures, but this is fine as a start. Change-Id: I6708570175e23472cb37e0061a329e54e8eac9c0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3205 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-14 r/2658 feat(xanthous): BangPattern all fields in RawsGriffin Smith1-10/+10
This is generally just good practice for foundational data-types like these Change-Id: I88c5b6b73dad6665cf25837b8d6a9e0ea66f2b0b Reviewed-on: https://cl.tvl.fyi/c/depot/+/3204 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-14 r/2657 feat(xanthous): Extend speech generation to arbitrary wordsGriffin Smith2-24/+102
Wrap up the Phonotactics type into a Language type including both the phonotactics and a distribution of the number of syllables per word, so we can generate arbitrary words in addition to just arbitrary syllables Change-Id: I8a37ce9c0eec019c9b84d21b0f2b3b9f5fd319eb Reviewed-on: https://cl.tvl.fyi/c/depot/+/3203 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-13 r/2656 feat(xanthous): Add a generator for random english syllablesGriffin Smith7-26/+216
Add a new "speech" generator module, with the beginnings of the vague definition of the phonotactics of the language (there's one in here for English based on the wikipedia article for English phonology, but it's less than ideal as it has generated words like "sprurlkt") and the ability to generate random syllables of a language by picking an onset, nucleus, and coda from the list for that language (within a range of the number of allowed of each syllable part). This will be used down the road to automatically generate utterances from various non-english-speaking creatures (so the accuracy is less important, just that it "feels real"). Change-Id: I7b81375ec595239c05c5c800cbde1a2a900e38ac Reviewed-on: https://cl.tvl.fyi/c/depot/+/3202 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-13 r/2655 refactor(xanthous): Generators -> Generators.LevelGriffin Smith11-39/+40
I'm going to start adding generators for things like text soon, so it makes sense to specifically sequester level generators as their own thing Change-Id: I175025375204fab7d75eba67dd06dab9bd2939d3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3201 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-12 r/2653 feat(xanthous): Memoize characterVisiblePositionsGriffin Smith14-88/+285
Memoize the return value of characterVisiblePositions to a new, semi-abstracted "memo" field on the GameState, recalcuclated if the character position ever changes. I'm 90% sure that the perf issues we were encountering were actually caused by characterVisiblePositions getting called once for *every tile* on draw, but this slightly larger change also makes the game perform relatively-usably again. Since this is only recalculated if the character position changes, if we ever get non-transparent entities moving around without the characters influence (maybe something building or knocking down walls?) we'll have an issue there where the vision won't be updated as a result of those changes if they happen while the character is taking a non-moving action - but we can cross that bridge when we come to it. Change-Id: I3fc745ddf0014d6f164f735ad7e5080da779b92a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3185 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI