swarm-game / swarm

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

Add some structures to the world #112

Open byorgey opened 2 years ago

byorgey commented 2 years ago

Minecraft has villages; why can't Swarm have some randomly-generated structures? Rivers, mazes, wheat fields...? We should be able to generate entire structures while generating a tile. Generating structures that straddle tiles, or that take up multiple tiles, would be trickier, but probably also possible.

polux commented 2 years ago

mazes

I'd love it if the map would contain structure that require to solve some algorithmic puzzles in order to reach a reward (some rare resource for instance).

byorgey commented 2 years ago

mazes

I'd love it if the map would contain structure that require to solve some algorithmic puzzles in order to reach a reward (some rare resource for instance).

Right, that's what I had in mind when I said mazes. But with programmable entities I'm sure we could come up with other algorithmic challenges as well. Like maybe there is a pile of numbers (see #116 ) and you have to put them in sorted order to make a door unlock?

Anrock commented 2 years ago

What if those structures are remnants/ruins of some other civilization/previous colonists and miraculously (not so in case of previous colonists) they have a data port (#116) that's compatible with player robots?

So instead of pile of numbers on the floor which you have to sort there are doors / computers / etc with data ports and you can read / write to them to get challenge inputs and put challenge response? I guess attaching a script to an entity with data port (you can even put into yaml files instead of hardcoding into game) will be sorta easier than spawning number piles.

And for players interacting with a door or computer with data port is more obvious then sorting pile of numbers, IMO.

byorgey commented 2 years ago

there are doors / computers / etc with data ports and you can read / write to them to get challenge inputs and put challenge response?

That's a cool idea too!

Anrock commented 2 years ago

Yeah. With data ports it's possible to port basically any puzzle/challenge. We can even incorporate some puzzles from EXA Punks since swarm robots can do anything EXAs can :)

polux commented 2 years ago

The ancient civilization programming puzzles idea reminds of http://www.boundvariable.org/ and https://challenge.synacor.com/ which are both awesome.

xsebek commented 2 years ago

A popular Factorio mod has an endgame in which you build working spaceships from walls and engines placed in the 2D world.

An extension of the idea in #242 is to do something similar for base - robots would construct new base with threads outside and we could move into it, activate it and drive it around.

I think we could add pretty complex logic for which base shapes are allowed and how to rotate them and it would not slow down the game, because it would just be one operation on a structure.

byorgey commented 1 year ago

Note, as explained in https://github.com/swarm-game/swarm/issues/29#issuecomment-1159533980 , I no longer think this particularly depends on #29 in its current incarnation, though it would probably make for a nicer framework in which to work.

Generally, I'm now thinking that the world around the base will remain as it is, but as you get farther away you start to see some generated structures (buildings? cities? etc.), to encourage exploration.

xsebek commented 1 year ago

Wave function collapse looks like it would produce nice rivers. 👍

I think we should make the world generation customizable from YAML first. Then we can add structures as template map+noise threshold. So the basic map would have a fixed location, but structures would be parametrized by the noise and we could have both in a list of maps.

byorgey commented 1 year ago

Related: #1320 . The design of the DSL contemplated there should 100% accommodate "static" structures placed randomly, as contemplated in @xsebek 's comment, which should be a great start. I will give some more thought to the possibility of wave function collapse and whether there is anything we will want to design into the DSL now in order to potentially support it in the future.