AllyLOS on/off

AllyLOS on/off

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
PepeAmpere
Posts: 591
Joined: 03 Jun 2010, 01:28

AllyLOS on/off

Post by PepeAmpere »

It's default engine setting the players in the same alliance share their LOS. I dont see way how to change it.

IF theres no (not much complicated) way how to do that, is possible to add such feature in engine? Please :).

If some dev interested in this, i would prefere to make possible to change this option in game - for example allyLOS is technology/building dependant (for example communication centre making/destroying change it).

Thx.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: AllyLOS on/off

Post by Google_Frog »

This would add complication to a few gadgets I have written. From the perspective of my gadgets I could deal with this change but it would take a lot of work to support the features that this change would add.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: AllyLOS on/off

Post by gajop »

ideally LOS, alliance and shared unit control would be represented as a directed graph;
@Google_Frog:
You can always make certain assumptions, and if your games assumes them I don't see a problem, you don't have to change anything.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: AllyLOS on/off

Post by Jools »

Communication centre. We have one unit like that: the targeting facility [sic]. It isn't used a lot and has lost it's role with the spring feature to autotarget all enemy units on radar (and sometimes outside radar too).
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: AllyLOS on/off

Post by Google_Frog »

ideally LOS, alliance and shared unit control would be represented as a directed graph
Yes, that would be nifty. Although currently a lot is built on the concept of allyTeam.
gajop wrote:@Google_Frog:
You can always make certain assumptions, and if your games assumes them I don't see a problem, you don't have to change anything.
I was thinking about how this change would change the lua interface. The LOS related things in synced read take an allyTeam argument which would have to be changed to team.
User avatar
PepeAmpere
Posts: 591
Joined: 03 Jun 2010, 01:28

Re: AllyLOS on/off

Post by PepeAmpere »

Google_Frog wrote:This would add complication to a few gadgets I have written. From the perspective of my gadgets I could deal with this change but it would take a lot of work to support the features that this change would add.
I dont get why it should bring problems for you. The default behavior of engine should stay as before (for example for your game, for your gadgets, allyLOS = ON in whole game, no changes by players actions) and only developers in different games then yours will use this (they have own gadgets). I can understand that some UI widget developer can be sad of this that his widget cannot be used in all games, but i dont know how it can collide with your gadgets...

... maybe in one case :mrgreen: you want to use it, too. But it brings a lot of strange questions... :lol:
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: AllyLOS on/off

Post by Kloot »

There is a way to do it without much effort, but only for games with <= 32 (or 64) teams. A general solution would require large-scale rewrites and won't happen soon / ever (certainly not for 92.0).
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: AllyLOS on/off

Post by gajop »

lemme guess, you are using bitmasks for that? :)
User avatar
PepeAmpere
Posts: 591
Joined: 03 Jun 2010, 01:28

Re: AllyLOS on/off

Post by PepeAmpere »

Kloot wrote:There is a way to do it without much effort, but only for games with <= 32 (or 64) teams. A general solution would require large-scale rewrites and won't happen soon / ever (certainly not for 92.0).
Thx for answer.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: AllyLOS on/off

Post by Nemo »

I made a small, unsuccessful attempt to bring Tobi's years-old losshare branch up to date - he was working on 1-directional LoS sharing between allies. Kloot sounds like he already has an implementation in mind, but if someone else is going to tackle it, tobi's approach might be a starting point. I got close, but don't quite have the C++ chops/understanding of the LoS system to feel comfortable designing new logic in something so core.

But yeah, I'd be excited about this feature as well.
Post Reply

Return to “Engine”