Multiplayer Game... Logic...Networking Questions

Discussion in 'General Programming Support' started by rover2341, Jul 16, 2015.

  1. rover2341

    rover2341 Is riding a roller coaster...Wee!

    +114 / 0 / -0
    I am starting a starting two projects.

    The First Project is HTML Based with the requirements: 1 class, 5 monsters types, 100 human players, Player have 3 abilitys, and can get 3 Levels. I am using [2D]

    The second Project is Unity Based with the requirements: 1 class, 10 monster types, 100 human players, Player has 3 ablitys, and can get 3 Levels. Will Use Unity [3D]

    They are seperate projects but ill carry what i can from one to the next.

    End Goal Is not to be successful, but to prove to a gaming company I have some skills in unity, and can get a proof of concept done.


    Where Does Game Logic Live (Ex: moving, AI pathing, striking a target...)
    Are there any other good options? What do you suggest?

    Option 1
    100% Server Based, Super Thin Client. The Client is basically a controller for the game nothing more.

    + Limited Hacking Options
    + Single Base Of Logic
    + Flexible

    - Speed
    - Can not use Or Unity logic to help ex: Pathing, striking target, moving

    Option 2
    50% Server Based, 50% Client Based. Run the exact same game on the client and on the server, and have the server version. The server version of the client would be the master version.

    + Single set of logic
    + Fast On Client Side
    + Ability to use or unity to deal with a great deal of the logic.

    - Complex on syncing

    Option 3
    100% Client. Allow client to client based game. server does little to nothing. all logic is run on clients, closer to option 2.

    + No server resources
    +/- Less Jumps, between players, but would still be slower, due to no detected Server.
    - Most hackable
    - semi complex when master player leaves

    No networking is done on this, but its a start. arrow keys walk around.
    Last edited: Jul 16, 2015
  2. Accname

    Accname 2D-Graphics enthusiast

    +1,551 / 4 / -4
    The answer depends on what exactly you want to do.
    Blizard, for example, wants to keep a tight grip on the game and control everything, thats why they do most things server based.

    But perhaps you dont need to control everything, perhaps you simply dont care if people cheat in their own custom games.
    Before planning the software you have to plan the product.
  3. rover2341

    rover2341 Is riding a roller coaster...Wee!

    +114 / 0 / -0
    Good Point.
    Its most important to me that i get something done. Next most important that i prove i did some cheat protection.
    Its more important i flex my coding skills then make a product. The goal being to show that I have some understanding of how a product could behave, and be strutuctured. so Its important to me that there is at least some protection, but not important to me that its impossible to brake, or even hard.

    So Option 3 Is really off the table. Option 1 makes sense, but I fear it would run terrible for the user.
    So Option 2 is likely my best bet.

    I found this last night. and it gave me some thoughts. but its for a server based solution, just ways of handling the lag.
  4. Accname

    Accname 2D-Graphics enthusiast

    +1,551 / 4 / -4
    If you want to impress people then give clients the ability to host games in which case it will be 100% server based.
    But they also have the ability to play over the server for cheat protection. The ability to host yourself is meant to reduce lag. Imagine you want to play a game with a friend, you know neither of you is going to cheat, but the build-in cheat protection slows the game down too much (too many people playing simultaneously) so even though you dont need the cheat protection it hinders you from playing.

    When the server is involved I would advice you to do the calculations both on client and server side anyways. This way the client has a local approximation of the result which will be either confirmed or discarded when the server sends the official result. The good thing is that lag can be disguised by using the approximated values. Once the server response is there you can correct your output to the official value if needed. This way, if you often approximate correctly, you will see much more fluid gameplay without random stuttering when the round trip time is long.
  5. rover2341

    rover2341 Is riding a roller coaster...Wee!

    +114 / 0 / -0
    Right that's option 2. Run the game on the server and on the client.
    But more then that you were talking about server reconciliation according to this site.

    Server reconciliation -
    Lets client play game, as if it was on its own machine, in real time, runs all the same commands on the server and comes back to client. If there is no issues it continues, the client never waits for the server to replay it just keeps going. (assuming no problems will occur) only correcting the user if things get our of sync. (like the server realizes the he cast hes spell on had already died)

    Issue here is the other player would be jumping around, so I would also need to apply Entity interpolation. This basically shows the other players .1 to .2 sec behind, for my purposes that's not a issue.
    A few things will always wait for the server, like when someone dies, due to if 5 people are hitting the target no one would be able to predict when the target dies.
  6. Accname

    Accname 2D-Graphics enthusiast

    +1,551 / 4 / -4
    Of course. But every little improvement is something positive.
    For video games the most important thing is customer satisfaction. A game that feels "sluggish", even just a little bit, can be enough to put people off.

Share This Page