Using plugins to do authoritative game logic

Options
Hi,

I used PUN to prototype my game. It works really well but I am concerned for client cheating. What I want to do is have some sort of validation going on on the server. I am also using PlayFab for player accounts, leaderboards etc. The way I see it, I'd have two options:

1- Switch to UNET, create a server that can handle multiple rooms per instance, deal with client side prediction and host the server in PlayFab as a custom game server.
2- Either use Photon Server self hosted (on something like amazon EC2) or Enterprise cloud, and use plugins.

If I go with option 2 (Photon Server), I got a few questions:

1- I get it that rooms are already implemented, I continue doing the same thing on my client, connecting to the master server who deals with load balancing and matchmaking, right?
2- Are plugins the right tool for validating player positions over time as well as simple trigger collisions in a real time game? If so, how do I intercept position updates in the plugin? Are there any examples?

Thanks!


Answers

  • chvetsov
    Options
    hi, @sowee15
    1. right.
    2. yes, plugins right tool for that. plugin intercepts all operations which might be triggered by client. on server you get Dictionary wchich contains all data wich client sent. so, you may parse them and use what you need for checks. Well, there is no example for this, but it is not really difficult to see what is inside.
    All movements are sent as RaiseEvent operation, you need to intercept it and see what is inside.

    if you need more info about data structure, you may add in PUN forum

    best,
    ilya