MMO Operator - Spwan items without owner

Options
neoneper
neoneper
edited March 2017 in Photon Server
Hi. I'm trying to make my server create items without the need of an owner.

Currently I have the operation SpawnItem, which creates a new actor in the world, but this operation needs an actor owner. The problem here is that when the owner leaves the server, the items generated by him are also excluded from the world.

Currently this operation is used to create ItemType.Avatar and ItemType.Bot.
I would like to use it, to generate several coizas, example: ItemType.armor. Etc.

This need arose from the action of throwing equipment on the ground. I want the other players to have the opportunity to see this dropped item on the floor, and then pick it up. But this is not possible using the Spaw existing in the currently provided example.

Any idea how I can proceed?

I'm thinking of making my own server create an own Actor, pertaining to these items. In this case the server itself would be the owner. But I do not know if it's the right way.
I need help (^. ~). Thanks in advance!

Comments

  • ody
    Options
    Making your own server create an actor, seems the right way to me :)
  • neoneper
    Options
    ody said:

    Making your own server create an actor, seems the right way to me :)

    Hi. I'm having trouble finding PeerBase from the server.
  • neoneper
    Options
    Okay. I decided to try something different!

    Using the same principle as the Wingrid example. I used a simple windowsForm application to put NPCs and monsters in the world! They are placed in the world just like a BOOT from the WINGRID application. Or Be: All Monsters and NPCs are children of the Peer connected to the server. In this case, identical application to WinGrid.

    The problem is that I ran tests in Amazon with a basic server and the performance of my server was horrible!

    With my WInGrid application simulating about 500 Boots, my server takes a certain time of 3 seconds to be able to send the other requests of the real players!

    Example: With no Boot, requests are processed and sent to other customers almost immediately. With my WInGrid simulating 500 Boots, the IDA and VInda time of a request from a real player takes approximately 3 seconds. (LONG TIME).

    I'm using the default regions settings, present in the Unity3D source.

    Based on the information obtained, would it be correct for me to state that it is not correct for me to use the WinGrid principle to put Monsters and NPCs in the world?

    Is there any way to do some sort of scalable processing of regions?


    I have the following theory: Even the server having a system of regions to filter the sending of events and operations to the clients, this does not make it truly optimized, keeping in mind that the server needs to list all these regions multiplying its processing by the number of players and Requests being made to each frame. The only thing that wins here is the client, but the server gets super overloaded. So if there is no way to create separate processes for these regions, it's no use having it! Am I right?

    Please correct me if I'm wrong!

    I'm evaluating UnityPark's PikkoServer server. Is there something like this here?
  • neoneper
    Options
    Okay. I'm trying another theory!
    Using the same principle as the Wingrid example. I used a simple windowsForm application to put NPCs and monsters in the world! They are placed in the world just like a BOOT from the WINGRID application. Or Be: All Monsters and NPCs are children of the Peer connected to the server. In this case, identical application to WinGrid.

    The problem is that I ran tests in Amazon with a basic server and the performance of my server was horrible!

    With my WInGrid application simulating about 500 Boots, my server takes a certain time of 3 seconds to be able to send the other requests of the real players!

    Example: With no Boot, requests are processed and sent to other customers almost immediately. With my WInGrid simulating 500 Boots, the IDA and VInda time of a request from a real player takes approximately 3 seconds. (LONG TIME).

    I'm using the default regions settings, present in the Unity3D source.

    Based on the information obtained, would it be correct for me to state that it is not correct for me to use the WinGrid principle to put Monsters and NPCs in the world?

    Is there any way to do some sort of scalable processing of regions?

    I have the following theory: Even the server having a system of regions to filter the sending of events and operations to the clients, this does not make it truly optimized, keeping in mind that the server needs to list all these regions multiplying its processing by the number of players and Requests being made to each frame. The only thing that wins here is the client, but the server gets super overloaded. So if there is no way to create separate processes for these regions, it's no use having it! Am I right?

    Please correct me if I'm wrong!

    I'm evaluating UnityPark's PikkoServer service. Is there something like this here?
  • neoneper
    Options
    not
  • vreference
    Options
    I was working to spawn items server side tonight (with the MMODemo) and noticed that Item appears to be coupled to MMOActor by way of Owner.Peer.RequestFiber. I'm not sure how much effort it will be to decouple this. It looks like it will take some work to spawn an item without a particular Peer being responsible for (all?) communication for that item.
  • neoneper
    neoneper
    edited April 2017
    Options
    I am currently with my works in this segment, unemployed.

    Disassociating an item from a peer will generate a lot of work to keep the regions working.

    For example: When a player is in the region of these particular items, he or she must have some informational event about it.
    Currently this happens by means of items with peer, but redoing this for items without peer should not be easy work and many tests should be done.

    Another problem I see here is the exhaustion loops present in the server-region logic.

    Loop by region + Loop by players in regions.

    Quickly we have an exhausted server!

  • vreference
    Options
    I think someone a bit more familiar with the item class and its use of the mmoactor fiber might be able to say what we need to do to supply an item with a fiber not associated with a particular peer "owner".

    I'll look at it again tonight... I just noticed the issue, decided I was blocked, and went to bed :) It may not be that hard.
  • vreference
    edited April 2017
    Options
    Yeah, not too bad... I just overloaded the constructor to take a fiber instance instead of a "owner". Pass in fiberpool (and .start it.) Be sure to call the item.spawnwhatever to register it. And put a condition into the item.fiber getter to return the fiber (that came in via the constructor) if actor is null. Lots of other tiny changes I'm glossing over.
  • neoneper
    Options
    Hello. I spent some time away, devoting my time to university and to my studies. I wonder if you made any progress with this. I'm turning my attention back to this job, and I noticed that the Photon team has not made any improvements to the MMO so far. (T.T). Did you get lucky with the spawn?

    Thanks brow!.
  • chvetsov
    Options
    hi, @neoneper

    from photon team side we do not support MMO demo any more. Sorry.

    best,
    ilya
  • neoneper
    Options
    This is really sad news.
    Thanks for answare!