User Login In MMO Application

Options
2»

Comments

  • Oayhan
    Options
    That's probably where attributes of my avatar is set, right? I was trying to find where the attributes(in demo's case name and color) of others are set(in my game). I'm guessing it should be something related to entering interes area but couldn't find it. I don't even know if it's requested additionally with another operation after someone enters your interest area or is it sent automatically as an event.
  • Boris
    Options
    At subscribe you get the ItemSubscribed event (see MmoClientInterestArea.OnItemSubscribed).
    This event includes the properties' revision number which is increased every time a property is changed.
    The client automatically calls GetProperties if it has not seen the item before or if the revision number does not match the cached number. He then receives event ItemProperties (see MmoActor.ItemOperationGetProperties).
    If properties of an item are changed all subscribed interest areas receive the event ItemPropertiesSet (See MmoActor.ItemOperationSetProperties).
    The same event is sent if operation SubscribeItem is sent without or with an old revision number (see MmoActor,ItemOperationSubscribeItem).

    So in general your "attributes" are item properties.

    Hope that helps.
  • Oayhan
    Options
    Thanks, I've easily modified the places you've told and it works with just a few mistake which I'll hopefully debug in a few days.
  • Oayhan
    Options
    Hi, I'm trying to resolve two issues, which I guess is about the same topic:

    Firstly, I want to decrease distance characters see each other. I've looked at the functions SetViewDistance and ResetViewDistance and I thought modifying TileDimensions would probably change it correctly. But even though I dropped them to a much lower value (to 1/1000 at last try) I couldn't notice any change. On top of that photon server consumed all the memory and the computer just froze. So I just figured that it's not how it works probably :)

    Secondly, I want to use some minigames in my game, that'll be played on other levels. So I want to remove the player from being displayed and seeing others but I don't want to disconnect him from server as they can still use the private chat system. I'll write another handler but I don't know how to remove the character like the way it's disconnected.
  • Boris
    Options
    If you decrease tile dimensions you create more tiles for the same area. From that perspective it has nothing to do with view distances.

    Operation EnterWorld has a ViewDistanceEnter and ViewDistanceExit parameter that you use to setup initial view distances for your client. ViewDistanceEnter = Distance when you start seeing others, ViewDistanceExit = Distance when you stop seeing others. These distances are applied to tiles and not to items though, so this is where you start changing tile dimensions to see the effect: the smaller the tile dimension the smaller you can make the view distances to see an effect.
    Client.InterestArea.SetViewDistance sets ViewDistanceExit in relation to the tile dimensions: it's max (ViewDistanceExit + TileDimensions, ViewDistanceEnter * 1.5).
    If you use these classes you can experiment with changing both ViewDistance parameters and TileDimensions. A good value for tile dimensions is probably about the size of the min view distance.
    If you get too many tiles I wonder if the world area was chosen too big for your application.

    the mmo demo allows communication through the world only. A simple property "IsVisible" might be the easiest to stop displaying them, or set the coordinates to a position outside of the world grid.
    the clean alternative requires you to exit the world (like operation ExitWorld), but then you need to implement a different solution for chat. For instance, store online players in a dictionary that is available outside of the world.
  • Oayhan
    Options
    Thanks for the explanation on viewdistance, I've handled it easily. As for second problem, I've tried putting player outside the world coordinates but it doesn't trigger anything, I guess something prevents subscription function when outside of world coordinates. I'll try using isVisible variable now.