swarm-game / swarm

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

Surround base with "burned" terrain to make it easier to see #242

Open xsebek opened 2 years ago

xsebek commented 2 years ago

Currently every robot that looks down is shown as Ω, which is confusing and hard to see.

We could fix this by simply changing the default char for robots (say x), but I propose a bolder solution, making base bigger:

┌───┐
│ Ω │
└───┘

First of all, it is cute to have a little person inside, and secondly we can show base with treads:

╓───╖
║ Ω ║
╙───╜

This would clearly show why small robot treads are not enough to drive the base around!


EDIT: On second thought, I guess this is actually reasonable if paired with structures (#112).


The current idea (see discussion below) is to just make some special "burned" terrain spawn around the base. This would involve creating a new kind of terrain with its own (dark brown?) color, and editing the world generation function to generate that terrain near the base.

byorgey commented 2 years ago

There are definitely things about this idea that I like. On the other hand I do like the simplicity (both conceptual simplicity and code simplicity) we gain by having the base be "just another (special) robot".

byorgey commented 2 years ago

Also, when talking about "structures" in #112 , I did not actually have in mind some new kind of entity that spans multiple grid cells, at least not one that we could manipulate or represent in the code. I simply had in mind the idea of spawning a "structure" by having terrain/entities generate in a block together. Kind of like how houses in a village can spawn in Minecraft, but once they have spawned the "house" does not really exist except in our minds; it is simply a collection of blocks that can be manipulated individually.

xsebek commented 2 years ago

I would still like to make the base easier to spot when it starts near a forest. Sometimes when I open a Creative world it takes me a while to find it.

At least for the background, I would like to have some structure that would highlight the base, like some flying saucer.

Maybe some debris near the starting zone like in Factorio would work? But that is not very original.

Or just "burned ground" terrain, to mark where you landed? That could be nice when visually looking for the starting point once the base gets tank treads and drives away.

byorgey commented 2 years ago

I like the "burned ground" idea, that should be pretty easy to add.

xsebek commented 1 year ago

@byorgey I was looking at this just yesterday, thanks for updating this :+1:

Should be really easy to add another world function modifier when starting the game. We already have the findGoodOffset.

It might be a good idea to make it configurable, not just for scenarios but also for iterating on a nice style without recompiling:

starting_patch:  # default null
  terrain: burned
  radius: 3
byorgey commented 1 year ago

Also related: #29.

xsebek commented 1 year ago

I suppose this could be done with the new World DSL.

@byorgey can we get coordinates relative to starting location? 🤔 If not, maybe we could add the features we are looking for using the DSL instead of searching the world for it. Kind of like Factorio adds starting patches around the base.

byorgey commented 1 year ago

Hmm, good question. The coordinates are always adjusted so the base starts at (0,0), but if you describe something at (0,0) using the DSL it will not end up there, since shifting the origin to find a good start location happens after interpreting the world DSL code. There is currently no way to use the world DSL to describe something that should be "wherever the base ends up". Potential solutions off the top of my head include: