A simple question

Hello everybody, long time no talk!

Okay I got Photon Server running but I'm trying to understand how to do 2 (i hope quite simple things).
Exactly how do I go about adding in 2 features?

I want to make sure each player has a Credits (In-game Money) per {MATCH}.
And how to deal with teams server-side.

Right now I just want to know how to implement it, once I understand how I can add this in, I'm sure I can do everything else once I understand it.

I looked at the plugins page, but I'm not even sure if that's what I'm trying to do. All I want to do is just give each player per room an int for credits and assign a team and that's it. Creating plugins seems more in-depth than something I am wanting to do that is simple.

Comments

  • hi, @N1warhead
    you may use actor properties for credits.
    for teams you may want to create groups per team, so that some messages will be sent only to team
    and you also may add property to see on clients what team belongs this or that player

    best,
    ilya
  • chvetsov said:

    hi, @N1warhead
    you may use actor properties for credits.
    for teams you may want to create groups per team, so that some messages will be sent only to team
    and you also may add property to see on clients what team belongs this or that player

    best,
    ilya

    Would I modify the Actor.cs file in PhotonHive? That's the only thing I see that relates to Actor in any area.
  • @N1warhead not sure why do you need to edit actor.cs. it has already everything you need.

    best,
    ilya
  • chvetsov said:

    @N1warhead not sure why do you need to edit actor.cs. it has already everything you need.

    best,
    ilya

    That's what I was wondering lol.
    Like where would I even put 'Public int credits' server side (so players can't cheat their in-game money during the match). There's just so much stuff in the server I'm not entirely sure what to even look at and where to put it.

    What I mean is - is there already a server-side (PhotonPlayer/Actor) Script that I can modify just to include the 'public int credits' and then have the server just add the credits to the players.

    I'm trying to stick to everything in server-side rather than client side, just seems like it would be more efficient that way.
  • first, i would recomend you to use plugins. it is easier to modify them. you also may use our enterprise cloud to host your game with plugin. if you change sources, you must do hosting your self. It is easier to upgrade with release of new skd.

    second, i would recommend you use properties for everything what should be synchronized with clients. Clients will send update operation, you should validate it and accept or reject

    if you still want to modify server side code, then you should take all responsibity for correctness on your shoulders. And do efforts to get what server side code does. Neither I not others from company may spend hours explaining all details. or even some of them

    best,
    ilya
  • btw, with plugins it will be also easier to deploy new versions. clients will not be interupted

    best,
    ilya
  • Thanks for the tips! Now I do have a much better understanding on what to go for now.
    Hopefully that's all I'll need help with.

    Thanks mate.