-- Leo's gemini proxy

-- Connecting to warmedal.se:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en

Combat Mechanic Thoughts For Link-Based Game


Those of you reading this in geminispace probably know about the game AstroBotany already:


AstroBotany - the space gardener game!


It's a simple but surprisingly deep game. In essence each player has a plant. You can look at your plant and interact with it by following links: water it, fertilize it, shake it (it drops gold coins when you do, which you can use to buy fertilizer and postcards and stuff). You can visit the plants of others and water or fertilize those.


The mechanic is dead simple. With each page you visit all the possible actions to perform are presented as links to click, much like a classic choose-your-own-story in html format. Except it's dynamic instead of static. And multiplayer!


Lately I've been thinking about trying to build a multiplayer space exploration game in similar format; actions presented as links. This is simple to implement for most types of tasks, I guess:


Mining: click a link to mine an asteroid.

Travelling: click a link to determine direction or destination.

Docking with a space station.

Adding stuff to your ship.

Etc.


The hard part is when the environment acts back. The player will only receive feedback when clicking a link, which means that an enemy can't just show up at any point and start firing. Encounters would have to be triggered by player actions, but that's easy enough.


It becomes a bit trickier when you want to play out a combat sequence. Especially if players should be able to cooperate. So how could we do this?


One way is to have some sort of turn based structure. This works very well when each player faces their own instance of the enemy, similar to how gym battles in Pokémon Go work. But what do we do when one player just... stops? Leaves their computer or loses connection or for some other reason stops sending requests to the server. My conclusion is that turn based resolution works best with one player vs the environment, but doesn't easily allow for several players to face the same environmental threat.


The method I've been thinking most about and quite started to like is this:


Player A enters a zone, triggering an attack by a lurking enemy force. The enemy force does X damage per second, regardless of interaction from the player. The player is of course alerted to the size of the force and the fact that their under attack, in the response that describes the zone they just entered.

Player A can start a counterattack by clicking a link, and will then receive an updated response. Player A does Y damage per second to the chosen enemy target.

At any time player B can enter the same zone. When they do the enemy will immediately attack and therefore cause X/2 damage per second to each of players A and B from now on.

Player A will not even know that the field of combat has changed unless they perform an action and therefore receives a response. Neither will any player know that they potentially win or lose until they make a request and receive a response.


The downside here is of course that a player can enter combat, leave the computer, come back an hour later and try to do something only to learn that "Nope, you're dead!" I don't know if I consider this a bug or a feature. The fact that responses only need to be generated on request means that a combat doesn't take continuous CPU power to run. The current state based on timestamps and a chain of events is calculated when requested.


The one thing that really wouldn't work this way is player vs player combat. Imagine if player A enters a zone, starts mining and decides to leave the game to do that for an hour. Then player B enters the zone, finds A there and attacks. When would player A even find out? There'd be no warning, and no way to alert player A that something is occurring independent of their input. This is most definitely a feature from my perspective, however, because I'm not a big fan of player vs player action in online games. Games without that sort of antagonistic component tend to be friendlier.


So there we go. A full post about a tiny portion of mechanic for a game that doesn't even exist yet 😛️ Tell me what you think. I'm sure there's ample precedence out there for similar games that I don't know about.


-- CC0 ew0k, 2021-05-31

-- Response ended

-- Page fetched on Sun Aug 1 00:37:28 2021