Skip to content
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

Resource depletion by movement (e.g. fuel, water spills) #550

Closed
byorgey opened this issue Jul 6, 2022 · 7 comments
Closed

Resource depletion by movement (e.g. fuel, water spills) #550

byorgey opened this issue Jul 6, 2022 · 7 comments
Assignees
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Design An issue having to do with game design. G-Entities An issue having to do with game entities. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Feature A new feature to be added to the game.

Comments

@byorgey
Copy link
Member

byorgey commented Jul 6, 2022

Aside from having to build a boat, currently water is extremely easy/boring to get. A random idea I just had that might make collecting water a bit more interesting: what if any water in the inventory spills when a robot moves? And also when placing water on the ground it just spills. So you couldn't just send a robot to grab some water and bring it back.

  • You could build a pipeline of robots to pass the water along, bucket brigade style. (See https://github.com/byorgey/swarm-defs/blob/main/pipe.sw )
  • Or you could have robots sit on top of the water in a boat, programmed to make things that require water.
  • Maybe there could also be some sort of "tank" device which can be installed so that water no longer spills when moving. But that also seems kind of boring, it would just be yet one more device you need to build.
@byorgey byorgey added Z-Feature A new feature to be added to the game. C-Low Hanging Fruit Ideal issue for new contributors. G-Entities An issue having to do with game entities. labels Jul 6, 2022
@byorgey byorgey added the S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. label Oct 17, 2022
@kostmo
Copy link
Member

kostmo commented Oct 20, 2022

How about ice that melts as you transport it? Would make for fun allusion to The Mosquito Coast when they haul an ice block up a mountain to impress the natives.

@kostmo kostmo changed the title Water spills when moving? Resource depletion by movement (Water spills when moving?) Oct 27, 2022
@kostmo kostmo changed the title Resource depletion by movement (Water spills when moving?) Resource depletion by movement (e.g. fuel, water spills) Oct 27, 2022
@kostmo
Copy link
Member

kostmo commented Oct 27, 2022

Could this be a way to evaluate (or provide more immersive justification) a shortest path (#608) solution? E.g. by providing a known amount of fuel (equal to the a priori-known shortest path length).

@byorgey
Copy link
Member Author

byorgey commented Oct 27, 2022

I like that idea! The difficulty I can see is that finding a shortest path takes a lot more fuel than following a shortest path. So I'm not sure how to evaluate/justify a shortest path solution that way.

Hmm, but maybe... how about if there's a flower in the middle of a maze, and you're supposed to water it, but you only have an amount of water equal to the length of a shortest path plus 1 (assuming one unit of water spills per move). So to solve the challenge you would have to first find and mark a shortest path (without carrying any water) then finally send a robot to traverse the found path carrying the water. That would make checking the winning condition super simple (is the flower watered?) while still ensuring that you have to find a shortest path in order to win.

@xsebek
Copy link
Member

xsebek commented Nov 1, 2022

So to make this concrete, is the proposal that the count of liquid in inventory would decrease while moving?

To me that sounds a bit surprising, I would just expect it to leak all the time when it is not in a container.
Realistically I would expect robots to spill the water while giving it to others, sort of like a tax on the transfer.

To be fair, this is easy to implement, just remove one of each liquid inventory per Move.


I like the idea that the robot crafting with water would need to stand on it (in a boat). I guess the rule would go something like:

If you have a grabber and scanner installed and are standing on a grabbable entity that is part of the recipe, then the recipe requirements are reduced by one of the said entity or infinity if the entity has the infinite property.

Implementing this rule only requires adding a bit of code to the Make step.


I would not mind crafting a liquid tank - if it can only carry one type of entity it would be a fun twist on containers.
It would add a bit of diversity beyond one box that stores everything.

Also if liquid entities simply spilt immediately, you could be forced to stand on it in a boat to fill the tank.

@byorgey
Copy link
Member Author

byorgey commented Nov 2, 2022

So to make this concrete, is the proposal that the count of liquid in inventory would decrease while moving?

That was my (latest) idea. I agree it is not super realistic, though remember the goal is not to make a realistic game but rather one that affords interesting programming challenges. I like the fact that the count decreasing while moving makes for an easy physical way to measure the number of steps a robot has taken.


We would not necessarily need to change the way recipes work. If water only spills when moving then you could grab some from below you and then not move while you carry out the recipe normally.


Also if liquid entities simply spilt immediately, you could be forced to stand on it in a boat to fill the tank.

True, that is fun. All of the water spilling immediately was my original idea. Maybe there can be multiple types of liquids with different spilling mechanisms.

@byorgey
Copy link
Member Author

byorgey commented Nov 2, 2022

Maybe there can be multiple types of liquids with different spilling mechanisms.

What if water all spills instantly, but we could also make some kind of fuel that gets used up gradually by move commands (and possibly other commands?) if you don't have a solar panel installed. Seems like fuel could be used to design some interesting/tricky puzzle scenarios where the number of actions you can do is strictly limited by the amount of available fuel.

@byorgey
Copy link
Member Author

byorgey commented May 12, 2024

Since we have #1684 now, I'm going to close this. We can certainly continue to think about how to use the new mechanism to come up with fun/interesting programming challenges.

@byorgey byorgey closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Design An issue having to do with game design. G-Entities An issue having to do with game entities. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Feature A new feature to be added to the game.
Projects
None yet
Development

No branches or pull requests

3 participants