Unity Community


Page 1 of 2 12 LastLast
Results 1 to 20 of 30

  1. Location
    New York, NY
    Posts
    1,197

    How do FPS games render the character in multiplayer?

    Howdy.

    I was wondering, how do fps games render the character during multiplayer.

    I mean, other players see you as a full, animated character, with whatever weapon you have equipped.

    But the player himself only sees a pair of arms with a gun, which I think is a seperate mesh.

    Are they rendered on seperate layers?


  2. Location
    Victoria Australia
    Posts
    4,766
    In what kind of multiplayer? splitscreen or online?
    Maybe you can help me work out how to smooth my planetary gravity!


    Quote Originally Posted by hippocoder View Post
    Calm down, you're posting all kinds of nonsense that makes no sense. I suggest you post less, and follow http://unity3d.com/learn tutorials.


  3. Location
    New York, NY
    Posts
    1,197
    Quote Originally Posted by titanty View Post
    In what kind of multiplayer? splitscreen or online?
    Online.


  4. Location
    United States
    Posts
    1,088
    The engine only renders what you see.
    Experienced Unity developer, currently looking for work!

    http://forum.unity3d.com/threads/184...Tate-McCormick


  5. Posts
    2,225
    Each person's machine is creating the world and rendering it specifically for that person. It's rendering what it thinks that world looks like. It's never going to be exactly the same as what other people are seeing because of the latency. So, since you are creating a world just for you every frame, you create it as you want it to be. When you create yourself, you only show arms and a gun. When you get input on where the other players are (you have to guess a lot), you draw them with full bodies. This leads to cheating also - People can hack games and make walls transparent just for them, or remove lighting so they can see people hiding, etc.


  6. Posts
    1,579
    In your game, you only see your model with the high poly hands and guns, and then everyone else is viewed as full characters with lower poly guns etc, which allows for more detail or whatever. As to how this is done, by layer perhaps, is game specific.
    Completely new to game development and Unity? don't know where to start? You don't have to be a n00b, click here and you'll be a pro in no time! The complete scripting series will bring you from zero to hero!

    Really guys, get over it. Everyone these days wants a MMO not single player. I know we should start out small but times have changed. Anymore in the game industry no matter how small or large you have to go big or go home!


  7. Location
    New York, NY
    Posts
    1,197
    I'm very confused as to how I would do this :L


  8. Location
    Victoria Australia
    Posts
    4,766
    You dont, that is why the people at infinity ward get paid lots to do that.
    Maybe you can help me work out how to smooth my planetary gravity!


    Quote Originally Posted by hippocoder View Post
    Calm down, you're posting all kinds of nonsense that makes no sense. I suggest you post less, and follow http://unity3d.com/learn tutorials.


  9. Location
    Seattle, WA
    Posts
    1,120
    I imagine when JimmyAwesome629 joins the game and each client is updated with his name, position, etc it tells each client to instantiate Jimmy's prefab, if there's player customization it passes what options jimmy selected before joining the game.


  10. Location
    New York, NY
    Posts
    1,197
    Quote Originally Posted by lmbarns View Post
    I imagine when JimmyAwesome629 joins the game and each client is updated with his name, position, etc it tells each client to instantiate Jimmy's prefab, if there's player customization it passes what options jimmy selected before joining the game.
    Hm... That makes sense.

    So pretty much through RPC calls, Jimmy's client is sending out info such as his rotation, position, and weapon, current animation, etc. Then jimmys model is instantiated on the other clients and updated with that information every update.

    Now on jimmys client, he only sees his current gun in his hands and that's it.

    Gosh this is confusing. I will see if I can figure this out more in depth later on.


  11. Location
    Victoria Australia
    Posts
    4,766
    You dont need to send the info on wich gun he is using more then once though as it wouldn't change.
    Maybe you can help me work out how to smooth my planetary gravity!


    Quote Originally Posted by hippocoder View Post
    Calm down, you're posting all kinds of nonsense that makes no sense. I suggest you post less, and follow http://unity3d.com/learn tutorials.


  12. Posts
    399
    MrDuskling, with Unity's networking you would normally get the joining peer to use Network.Instantiate to create a GameObject on every peer in the session. This is not necessarily a renderable object - it's a placeholder that will get moved around by the networking system as and when messages are received. On top of that, the peer locally creates the hands/gun model, attaches a camera, and arranges for user input to move the character around. The other peers, when they create their shadow of the joining peer's player object, will also create the fully animated visual model, so their local player can see where the remote player is.


  13. Location
    Austin, TX
    Posts
    483
    Quote Originally Posted by Jaimi View Post
    Each person's machine is creating the world and rendering it specifically for that person. It's rendering what it thinks that world looks like. It's never going to be exactly the same as what other people are seeing because of the latency. So, since you are creating a world just for you every frame, you create it as you want it to be. When you create yourself, you only show arms and a gun. When you get input on where the other players are (you have to guess a lot), you draw them with full bodies. This leads to cheating also - People can hack games and make walls transparent just for them, or remove lighting so they can see people hiding, etc.
    This. Multiplayer is an illusion - you can't have multiple computers rendering the same world. How it actually works is that each computer has its own world that tries to imitate that of the other players'.


  14. Posts
    1,137
    Quote Originally Posted by DallonF View Post
    This. Multiplayer is an illusion - you can't have multiple computers rendering the same world. How it actually works is that each computer has its own world that tries to imitate that of the other players'.
    How is that an illusion? There's multiple people interacting, that's a multiplayer.
    Please use [code][/code] tags when posting code. Otherwise rapid eye bleeding can occur.


  15. Posts
    904
    Quote Originally Posted by Morning View Post
    How is that an illusion? There's multiple people interacting, that's a multiplayer.
    what DallonF is trying to say is that, especially in more complicated games with physics n stuff, each players "world" can be slightly different (for example, small insignificant objects like decals/pieces of trash/flying newspapers/exact positions/etc can be different), also if it's first-person, usually just the arms for the "active" player are rendered while a full model is created for the "others", etc so in a sense the word "illusion" would be accurate, but then again ALL games are illusions hehe


  16. Location
    Pennsylvania
    Posts
    2,954
    Pretty simple. Proxy/remote player prefabs are a full character mesh. Local, player-owned player prefabs have no character mesh, just hands and weapons.


  17. Location
    Virginia, USA
    Posts
    1,372
    Quote Originally Posted by Morning View Post
    How is that an illusion? There's multiple people interacting, that's a multiplayer.
    There is no ground truth in multiplayer games. Even if you are publishing data at 60 FPS, there is still latency in the transmissions. Each client renders what it 'thinks' to be true. It's called Dead Reckoning - there's a chapter on it in Game Engine Gems 2.

    Gigi.
    What Went Well - a Meditation on Gratitude and Happiness
    Good Sex, Great Marriage - Still The #1 Marriage App on iOS *** Also on Android!
    The Gratitude Habit - 1000 5-star reviews

    The Secret of Success? Try; Improve; Repeat- 'till too good to ignore.


  18. Location
    Pennsylvania
    Posts
    2,954
    Right. A multiplayer game isn't one game with 16 (or however many) players looking at it, its 16 separate games, kept as closely synchronized as possible through network updates.

    What would happen in this case is a new player would connect, and the server (or the player, if it was non-authoritative) would say "hey, a new player connected. Tell the new player to create a player prefab in his game that has animated hands/weapons and no body mesh, that he owns and controls. Tell all other players to create a proxy prefab in their games, that has an animated full body mesh. When the owner player moves his prefab, he'll tell me, and I'll tell all the other players where to move the corresponding proxy, to keep them in sync."


  19. Location
    Austin, TX
    Posts
    483
    Quote Originally Posted by Morning View Post
    How is that an illusion? There's multiple people interacting, that's a multiplayer.
    They're not interacting. Say Player A shoots Player B in a "multiplayer" FPS.
    What actually happens is that Player A, in his game, shoots an NPC that just happens to be mimicking the actions of Player B in his own game.

    Meanwhile, in Player B's game, the NPC that represents Player A receives word of what Player A has done, and proceeds to shoot Player B.

    The only true multiplayer games are those that have multiple players on the same console. Splitscreen works very differently than online, so the OP's challenge is actually more of an issue here.

    Online multiplayer is a very powerful illusion, but it's extremely difficult to create if you don't recognize it for what it is and take advantage of the differences between the connected worlds.


  20. Posts
    1,137
    It's true that each world is simulated on it's own, but state syncing from a master server (or other players in case of p2p) makes it a multiplayer game as all these NPCs are still controlled by players.
    Even in a singleplayer game the player is controlling an npc that receives commands from an input device.
    That's why in unreal they're called pawns, because each player gets to control one or more of them, you're never there, you're just controlling a chess piece on a board.
    Please use [code][/code] tags when posting code. Otherwise rapid eye bleeding can occur.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •