swarm-game / swarm

Resource gathering + programming game
Other
835 stars 52 forks source link

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

Closed byorgey closed 4 months ago

byorgey commented 2 years ago

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.

kostmo commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 4 months ago

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.