soundmud / soundrts

A real-time strategy audio game
http://jlpo.free.fr/soundrts
Other
44 stars 32 forks source link

Paths and Bridges Blocked by Friendly Units Should Always Be Visible to Other Friendly Units #78

Closed MatejGolian closed 8 years ago

MatejGolian commented 8 years ago

I hope this is the last of the path and exit issues. Let's say you have one peasant and that you want him to block a certain path - for example the path to the west. If you ordered him to block that particular path, he would go and block it nicely. The problem is however, that from the perspective of the user interface, that peasant would behave almost like a wall. The same would be true if you were to select more units at once and order them to block that exit. If you were to decide later on that you wanted to block that exit with more units, you wouldn't be able to do it because the exit has already been blocked. The problem is that once a path or bridge is blocked by a unit or a group of units, you can't select it anymore and thus can't order any units to block it - not even friendly ones. So, the point is that you can't send units to block an exit if that exit has already been blocked by other units. Maybe this is somehow similar to the friendly gate issue that has already been fixed. Buildings behave fine - it's only moving units (such as peasants, knights or archers) that are causing problems.

soundmud commented 8 years ago

I think that it has already been fixed by 7fd857c2bd7ad651751c4c4f849cfc50bbf3d346 which uses a simpler way to implement walls and blockers in the interface. I didn't mention it but now the exits appear just like before.

MatejGolian commented 8 years ago

I tryed the latest master and it does not work properly - not for me at least. I tested it on the map BS2. I started on square G13. First I selected the first peasant and I sent him to block the path to the west. That went fine. Than, after the exit was blocked, I selected the second peasant. I couldn't send him to block the exit, because pressing CTRL+Tab only gave me the path to the east - the other path was unavailable. Could it be that the CTRL+Tab command requires extra attention? Moving with arrow keys and CTRL + arrow keys works just as it should.

MatejGolian commented 8 years ago

On closer inspection it seems that only the commands ctrl+tab and ctrl+shift+tab don't work properly. All other commands including tab and shift+tab seem to work just as expected.

soundmud commented 8 years ago

Control + Tab selects only targets useful to a peasant: "woods, gold mines, meadows, and repairable or buildable targets (damaged buildings, building sites, damaged catapults...)". At the moment, it isn't possible to build on a blocked path, so control + tab doesn't select a blocked path. Here are some possibilities:

  1. The game could make the difference between an exit with a building on it and an exit with units blocking it. An exit with a building on it would be practically unavailable. An exit blocked by units only would be still considered as a "building land", and control + tab would select it.
  2. Control + Tab would behave differently if soldiers are selected. It would only target exits and enemies (military targets). This wouldn't solve your example where peasants are used as blockers, even though it could be interesting.
soundmud commented 8 years ago

A complicated thing is that a peasant shouldn't be able to build on an exit blocked by enemies, so maybe it's the player's job to unblock an exit before building on it. I will consider that a peasant can be an appropriate blocker, so an exit will always be selected by control + tab (unless there is a building on it, I guess).

MatejGolian commented 8 years ago

OK, sorry for that. My mistake. Thank you for the explanation. I guess I forgot that part in the manual.

MatejGolian commented 8 years ago

Oh, I forgot to say. The most important thing is that this was not a bug. It's mainly up to you how you want it to behave (it's your game after all), but I personally like it the way it is now (now I mean the latest commit). Of course during a real game it's extremely unlikely that one would want to block an exit with peasants, but it's nice to have the possibility. I don't know, maybe it even simplifies the code a little.

soundmud commented 8 years ago

Just a precision: it is possible to select and block an exit with units even if there is a building on it. I don't know, it could be useful if melee units are ordered to replace an almost destroyed wall. On the other hand, at this point, I don't know if blocking exits with units will prove useful in practice.

MatejGolian commented 8 years ago

Sorry, another issue related to this showed up. Now if you build a gate on a path and press tab you'll see that the gate got added, but the path is still present eventhough it no longer should be there. Similarly pressing ctrl+tab will will behave like there wouldn't be any gate on that path. Unbelievable. Perhaps it's the latest commit. I don't recall this kind of behavior before so maybe you could revert the latest changes if possible. It may be the same with walls, but I haven't tested that.

MatejGolian commented 8 years ago

OK, thanks for the explanation. I'll write one more comment in one of the issues I opened earlier, if you don't mind. :D

<br />

Bez virů. www.avast.com

2016-05-25 19:53 GMT+02:00, soundmud notifications@github.com:

Just a precision: it is possible to select and block an exit with units even if there is a building on it. I don't know, it could be useful if melee units are ordered to replace an almost destroyed wall. On the other hand, at this point, I don't know if blocking exits with units will prove useful in practice.


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/soundmud/soundrts/issues/78#issuecomment-221652705

sanslash332 commented 8 years ago

Hmm Yes, blocking units is really a useful thing.

Especially, for block some paths or scape exit when you are attacking. For example, you attack your enemy, and you don’t want that the peasant of him can escape. Well, put a melee blocking the exit, and the peasant cant flee of the battle zone :3

This behavior is very used in starcraft. Two protoss zealots blocking a path, to difficult the zergling attacks. :3

From: soundmud [mailto:notifications@github.com] Sent: miércoles, 25 de mayo de 2016 14:54 To: soundmud/soundrts soundrts@noreply.github.com Subject: Re: [soundmud/soundrts] Paths and Bridges Blocked by Friendly Units Should Always Be Visible to Other Friendly Units (#78)

Just a precision: it is possible to select and block an exit with units even if there is a building on it. I don't know, it could be useful if melee units are ordered to replace an almost destroyed wall. On the other hand, at this point, I don't know if blocking exits with units will prove useful in practice.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/soundmud/soundrts/issues/78#issuecomment-221652705