MMO Tutorial - Can't see other clients

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

Moderators: Lapo, Bax

LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

MMO Tutorial - Can't see other clients

Postby LuffyGray » 07 Feb 2017, 22:07

Is there anything in this log that would tell anyone why I cannot see other remote players?

Image

Originally when I first finished the implementation, I was getting spammed with NPCs/AI which I believe was due to the extension back end variable which I changed to 0.

Now that I've finished the implementation, I've incremented the NPC count to 1 and connected through both clients but I neither see any NPCs or other remote clients.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: MMO Tutorial - Can't see other clients

Postby Lapo » 08 Feb 2017, 08:15

What I see in the logs is just one client called "User".
So I am not sure who are the "others" :) ... At least according to that small log chunk.

In any case you should provide more details as what you're trying to accomplish, which steps you have done and what is not working for you.

It wouldn't hurt to also know the version of SFS2X and the API platform and version.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

Re: MMO Tutorial - Can't see other clients

Postby LuffyGray » 08 Feb 2017, 08:45

Image

Maybe this may help a little more, both users are in the same room and should be recieving the information of each others existance within the map.

I have taken the MMO tutorial and kept its core structure as it was but I have edited it slightly to fit the pattern that I'm currently using. What I'm trying to achieve is simply allowing both players to see each other within the world, I'll investigate code and features incase this is something that I am missing.

API: Unity / C#
SFS2X: Latest (2.12.2)
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: MMO Tutorial - Can't see other clients

Postby Lapo » 08 Feb 2017, 08:57

In an MMORoom users will see each other when they're inside their respective AoI.
This depends on the settings you have in your Room.

Have you checked?
Lapo

--

gotoAndPlay()

...addicted to flash games
LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

Re: MMO Tutorial - Can't see other clients

Postby LuffyGray » 08 Feb 2017, 09:05

It was actually my next stop to check as I recall reading about AOIs but as it is, god, allah, shiva, buddha, odin have deemed it worthy to force a power cut onto me haha.
LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

Re: MMO Tutorial - Can't see other clients

Postby LuffyGray » 08 Feb 2017, 09:36

Lapo wrote:In an MMORoom users will see each other when they're inside their respective AoI.
This depends on the settings you have in your Room.

Have you checked?


Well it looks like I've got the settings correct I would like to believe but still having a time with the remote player spawn never being called.

Rooms MMO settings
Image

Zones main setting
Image

Extention manager (Am I supposed to apply the MMO extension here by any chance? I was fairly positive that it implicitly applied the extension already and I'm assuming that this is for debug only)
Image
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: MMO Tutorial - Can't see other clients

Postby Bax » 08 Feb 2017, 11:12

1) MMORoom settings
Your AoI extends:
- from +5 units to -5 units on x-axis
- from +1 units to -1 units on y-axis
- from +5 units to -5 units on z-axis
Just make sure the orientation is appropriate and the scale is appropriate too (what does it mean 1 unit in your game?).

2) Extension
The Extension in our example had just the purpose of generating the NPCs. It is not needed to make the Area of Interest logic work.

3) Other
When the two players are spawned, are you sure they are in the same location? (so each other's AoI overlap)
After joining the MMORoom, you should send a SetUserPositionRequest. Make sure both users set a position which is no more than 5 units apart from each other.
Paolo Bax
The SmartFoxServer Team
LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

Re: MMO Tutorial - Can't see other clients

Postby LuffyGray » 08 Feb 2017, 11:51

Bax wrote:1) MMORoom settings
Your AoI extends:
- from +5 units to -5 units on x-axis
- from +1 units to -1 units on y-axis
- from +5 units to -5 units on z-axis
Just make sure the orientation is appropriate and the scale is appropriate too (what does it mean 1 unit in your game?).

2) Extension
The Extension in our example had just the purpose of generating the NPCs. It is not needed to make the Area of Interest logic work.

3) Other
When the two players are spawned, are you sure they are in the same location? (so each other's AoI overlap)
After joining the MMORoom, you should send a SetUserPositionRequest. Make sure both users set a position which is no more than 5 units apart from each other.


thank you for the response, it has been incredibly informative for me. It looks like I've located the source of my issue which is that when I access the sfsObject.MySelf.AOIEntryPoint, it is returning null/empty. I've extended the AOI bounds to 1000, 1000, 1000 for testing purposes so I can only assume that the client isn't recieving the point of entry or I'm forgetting/failing to make a call to get that data.
LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

Re: MMO Tutorial - Can't see other clients

Postby LuffyGray » 08 Feb 2017, 13:12

Issue has now been corrected, thank you.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 45 guests