game logic on server/client

Options
ashkan
edited August 2010 in Photon Server
hi
we are new to game server coding.
we want to create a fighting game.
is it safe to create the logic on clients and just send them by server.
i mean client says the server that i kicked and it collided to the other. server says ok and tell others that it happened.

how can we prevent others to cheat?
can we make it safe just with asking special keys from clients to see if their our programs. i think it's not save because .net programs and so oour unity scripts can be disassembled easily.

Comments

  • dreamora
    Options
    technically there will never be a way to prevent cheats.

    But the most save way to approach is it to reduce the client to do rendering and have the server do the game logic. That will be required for an MP fighting game anyway cause the enemy sees something different than you.
    to prevent local input lag you would back that up with client side prediction on the client so they see their input immediate but apply it against a state from the past
  • @dreamora
    what about using unity's own raknet system.
    can i make one of the players server and the other as client.
    in this way one of the will always see the current state but the other will se something from the past. in game logic i'll apply commands and operation to correct times from the past but i think it might be unfare.

    what about using photon just for other features like buying items and ...
  • dreamora
    Options
    thats not how you can set it up with unity networking, that is how it always will be, there is no alternative to a server + many connected clients.
    also you can only have 1 scene and session per server and game.


    and using photon this way would be a horrible idea, you lose the main reasons you use it for like scaleability, independence of users being able to host games at all etc.
  • Tobias
    Options
    Making a fighting game multiplayer is really a hard task. We talk about games like Tekken or so, right?
    These depend heavily on timing and good reactions and networking always adds a layer of delay to this equation. It might be extremely hard to get this right and I can only advise you to create a prototype for his early.

    For security questions in Unity, you should ask for help on their forum. We support Unity with Photon but in the end, they are the experts.

    So far, we don't have any way to import Unity scenes into Photon. This is important to know when you plan on using Unity's Physics to detect collisions. If you find a suitable physics engine which runs in Unity and Photon you could create the game easier and make the server authoritative. This prevents some cheating and it's more fair, cause any player is lagging behind.
  • @Tobias
    is it common to have it all client side? do you know other games like freaky creatures or CMUNE's paradice paintball's approach. if they handled it client side so we might do it. i don't know if you can provide me information about them.

    @Dreamora
    you are right. if we use unity as networking solution so a database can handle other things and why photon? we want to use photon for it's scalability and great flexibility but creating anything from scratch is not a small team say welcome to it easily!
  • Tobias
    Options
    In most bigger games it's common to have an authoritative server, so it controls everything and each client only shows an estimation and gets corrected if it's wrong.
    I'm not too sure if I would compare a fighting game to Paradise Paintball as it does not have visible shots. Only the hits are visible, not the moving projectiles.
    Freaky Creatures was internally more a round robin type of game. As far as I know, they did not use realtime positions of their creatures but an internal calculation of hits and damage.

    The problem is, we don't know a lot of our customers solutions. In most cases, support is limited to core networking problems and we rarely get a glimpse of the game mechanic.

    Did you try to search www.GameDev.net and www.gamasutra.com for info? I know there are one or two big fighting game that have multiplayer, but I forgot their names. Maybe there are post-mortems of these?
  • can you tell us more about your ideas about integrating unity logic with photon in later releases and the amount time that it takes. maybe we should start with another idea now and take a look at a fighting game later.
    we are a small indie team with 2 programmers and some freelancers for modeling and animations.
  • dreamora
    Options
    You can't integrate unity logic with photon. The engine can't be used as standalone library and its not even threadsafe.

    If you want unity logic on the server, you will have to develop "verification nodes" (unity clients that are reduced for the purpose of verifying physics data, collision reports etc) which run on the server or in its cloud and are directly connected to the server
  • @Dreamora
    i know that. i asked about future. they can buy unity's source code or make a partnership and make photon a great MMO server for unity games. sales numbers will go higher much.
    big games are being made by photon so chanses are high!
    did you see MMO engines? they can load scenes and create collision geometry and do operations like movement and collision detection serverside ...
  • dreamora
    Options
    If they can get such a special deal.

    but I think it needs to be understood that the price for such a thing then would be 3-4 times as high as the current "tech independent" one and I'm forced to question its chances of success or even paying back the 6 figure for the u3 source license.