Good morning !
Im working on a little mmorpg right now So im currently trying to implement a good Mob-spawn system...
I just generate a bunch of mobs, put them into a ScheduledFeature to update constantly... and than I spawn them in via mmoItems...
Well this mostly works fine... at least once. When my player logs in and there no mobs around I spawn them in via the method explained above. The client receives the proximity updates and spawns in the mobs...
When I "jump" later to another area I do the same again... works properly... now heres the strange part. When I jump back to the previous area some mobs are completely gone... I do not receive proximity calls for them... And at some point they are back again but with a total different mmoItem ID, only when I jumped a few times back and forward... furthermore I never delete any of those mmoItems... This is extremely hard to reproduce and I have no idea if its because my client code or due to the server environment.
On client side I just listen for mmoItems proximity updates and if theres one spawning, I spawn a unity prefab in. So no big magic happens here...
Futhermore my player position aswell as my mob positions are given in highly precious double values, but due to smartfoxserver I need to convert them to float once I set the mmoItem pos or player pos, could that cause such a behavior ?
Its interesting that once those mmoItems disappear, I log of and login again, the mmoItems are on their right place again...
I would be glad for any help I can get...
Using sfs 2.13.0 and unity 2017.1.0f
MMOItems Disappear & Appear again
Re: MMOItems Disappear & Appear again
When I "jump" later to another area I do the same again... works properly... now heres the strange part. When I jump back to the previous area some mobs are completely gone... I do not receive proximity calls for them... And at some point they are back again but with a total different mmoItem ID,
Sounds very strange.
In particular the part where you say that they change item Id. I don't think this is possible unless you've introduced some bugs on the server side.
It's very difficult to guess what might be going on here.
For starters you should verify if the issues exist in the proximity list sent by the server, instead of your own rendering code. If that's the case you can send us a stripped down test case that demonstrates the issue.
Thanks
Re: MMOItems Disappear & Appear again
Thanks for the fast answer
I will try to isolate the iusse somehow ! If I cant somehow fix the iusse im gonna send you a stripped down version, thanks for your support
I will try to isolate the iusse somehow ! If I cant somehow fix the iusse im gonna send you a stripped down version, thanks for your support
Re: MMOItems Disappear & Appear again
Lapo wrote:When I "jump" later to another area I do the same again... works properly... now heres the strange part. When I jump back to the previous area some mobs are completely gone... I do not receive proximity calls for them... And at some point they are back again but with a total different mmoItem ID,
Sounds very strange.
In particular the part where you say that they change item Id. I don't think this is possible unless you've introduced some bugs on the server side.
It's very difficult to guess what might be going on here.
For starters you should verify if the issues exist in the proximity list sent by the server, instead of your own rendering code. If that's the case you can send us a stripped down test case that demonstrates the issue.
Thanks
I hope for a fast reply
Is it possible that the proximity list update is called like the following :
1. Player logs in and so he joins the mmo room, sets a position
2. Player receives the proximity list update because he just entered the room
3. Client processes proximity list update objects, spawns mobs
4. Player jumps to another zone, which is basically still in his AOI, to clear the scene all mobs will be deleted
5. Because all spawned mobs from step 3 are still in his AOI he wont receive a new proximity list update, so the client cant spawn the same mobs back in
That sounds valid... is there a way to force an Proximity_List_Update that will be sended to the Player ?
Basically i just wanna query via code all mmoitems around my new set position and send them as a Proximity_List_Update towards the player... this needs to be possible.... right ?
Things i tried & didnt worked :
List<BaseMMOItem> proxyItems = user.getCurrentMMORoom().getProximityItems(user);
user.setLastMMOItemsList(proxyItems);
Re: MMOItems Disappear & Appear again
genar wrote:
Is it possible that the proximity list update is called like the following :
1. Player logs in and so he joins the mmo room, sets a position
2. Player receives the proximity list update because he just entered the room
3. Client processes proximity list update objects, spawns mobs
4. Player jumps to another zone, which is basically still in his AOI, to clear the scene all mobs will be deleted
5. Because all spawned mobs from step 3 are still in his AOI he wont receive a new proximity list update, so the client cant spawn the same mobs back in
I don't think it is correct to remove enemies from the scene when the player is teleported in another location.
This is because on the next Proximity Update you will get the list of new entities in your AoI and the list of entities that are no longer in your AoI, compared to the previous state.
This means that removing old enemies will come automatically with the proximity update.
That sounds valid... is there a way to force an Proximity_List_Update that will be sended to the Player ?
No, they run at a fixed time that you configure in the MMORoom.
If you need faster updates just change the settings.
Cheers
Who is online
Users browsing this forum: No registered users and 96 guests