Fog of war

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

glebyama
Posts: 5
Joined: 08 Dec 2016, 08:04

Fog of war

Postby glebyama » 08 Dec 2016, 08:27

Hi
I am developing MMORTS game. I have a problem with realization of fog of war. I searching to way how to mark units (MMO Items) as invisible for user even it in user's AOI(so client do not recive any events about them).

For now i see such solutions:
1) Dont use server functionality of proximity list and send all data by custom events.
2) Somehow override proximity list manager class.
But i dont like any of them, may be you can advice some right way to do this?

P.S. Sorry for my bad english
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Fog of war

Postby Lapo » 08 Dec 2016, 18:09

Hi,
MMOItems will always generate events when they are within the AOI range.

If you want them to temporarily "disappear" you could flag then with an MMOItemVariable. This way the client will still receive events about their presence but the Variable will tell you that they are in "hidden" state and you shouldn't put them on screen.

Makes sense?
Lapo
--
gotoAndPlay()
...addicted to flash games
glebyama
Posts: 5
Joined: 08 Dec 2016, 08:04

Re: Fog of war

Postby glebyama » 09 Dec 2016, 06:05

Hi Lapo
In this case client will receive all data, so some cheaters may extract info about positions of enemies. So i need server side solution.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Fog of war

Postby Lapo » 09 Dec 2016, 09:02

Then I think you will need to implement a custom solution via server side code.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
glebyama
Posts: 5
Joined: 08 Dec 2016, 08:04

Re: Fog of war

Postby glebyama » 14 Jul 2017, 12:31

Hi.
By you last recomendation i made my own solution, i override MMOItemManager and set it to MMORoom by Reflection API. It's works fine, but now i see that some overrided methods works slow on high load, because of using Reflection API in it. I unable to refuse of reflection because some methods i ned to override is private. Can you suggest a specific solution for this situation?

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 58 guests