-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"use" command as generalization of "drill" #1007
Comments
The drill is overall a bit hacky for which I am sorry. 😄 I don't think "highlighting with drill" makes much sense, but maybe we could solve that and the input/output problem simultaneously. I would propose adding a
@byorgey would it have to be a syntax form to work with requirement analysis? Or could we make it work as long as the entity parameter is known at definition? 🤔 Maybe it's too cumbersome to use (pun intended), but I think it would work better with custom recipes and entities. |
I like the idea of |
Would the
On the bikeshedding front, I'm not necessarily opposed to |
I think having it only work with an I don't have a strong personal preference between |
@byorgey I think a normal This will subsume the |
This is my attempt at a longer "adventure game"-style quest. The primary mechanic of this scenario is in bridging different regions of the map by crafting paths. The quest is not entirely linear; there a few things that can be done in different order. A few observations: * I make heavy use of the "drill". Having the `use` command described in #1007 would be nicer. * Some recipes (e.g. using lava) might overlap in their ingredients, so to force a certain output you may have to temporarily drop (`place`) the ingredient for the undesired recipe. * I start the player off with a few items in their inventory with zero quantity so that the associated recipes can be browsed. For some of these items, especially the non-portable ones, it doesn't really make sense to be under a heading called "Inventory". Perhaps something like "compendium" or "library" might make more sense for the title of that pane in the UI, since it represents things that you "know" about? * I developed the "solution" code simultaneously with designing the map, so I've never played the scenario with "fresh eyes". So I don't know how much of a "slog" it will feel like to a new player. I imagine that playing it through for the first time may generate a few ideas about improving the swarm UI, perhaps regarding saving progress, or exporting REPL content to a `.sw` file. * Navigating through a twisty passage and encoding this as commands can be a bit tedious. Using "pilot" mode is easier. But you will have to exit creative mode again when it comes time to drill something (#1007). Inputting "landmark" strings into the REPL at the beginning and end of a piloting sequence could make it easier to find within the REPL history for copy-pasting. * I am quite interested in feedback about making the scenario more or less challenging, what clues might be helpful, potential lore, and stylistic improvements. * To emphasize the aspect of swarm as a "programming game", I included lots of repetition. * A large map like this is fertile ground for "easter eggs". I've added a couple so far. * Since `--autoplay` implies `--cheat`, the "hidden/optional" goals are displayed in the popup. It would be better if they were ordered below the mandatory active goals, so that when sitting back and watching the `--autoplay`, the next "logical" goal text gets displayed by default instead of the optional ones. ![image](https://user-images.githubusercontent.com/261693/222882045-fd95f67e-874f-4165-8357-92449c7eb1e5.png) Demo: scripts/play.sh --scenario Challenges/bridge-building.yaml --autoplay
Just a simple code relocation with no functional changes. Towards #1007.
Towards #1007 The `use` command adopts the same return type as `drill`: use : text -> dir -> cmd (unit + text) ## Demo scripts/play.sh --scenario data/scenarios/Testing/1007-use-command.yaml --autoplay
Issue formerly titled: "Recipes with custom drills do not work in creative mode"
Creating this bug for visibility/findability later, as I've mostly figured out the problem and a workaround.
In
word-search.yaml
, for example, I define a custom entity"highlighter"
that hasdrill
capability. I also define recipes that require this"highlighter"
. However if I try to play this scenario in creative mode, it will say "no way to make [...]" or something to that effect.This is because in creative mode, the player is granted a
"drill"
entity automatically, and in fact it defaults to that drill when computing recipe inputs/outputs for thedrill
command, ignoring the user-definedhighlighter
recipe.One workaround is, of course, to avoid Creative mode. Another workaround is to eschew custom entities with
drill
capability, and instead incorporate the standard"drill"
entity into one's recipe.The text was updated successfully, but these errors were encountered: