Multiplayer Chat

chatroom

After spending months pouring over chapters and tutorials on game networking, I jumped into what (I thought) would be a simple first exercise: a 3D chat room. I’m here to say that the warnings are very much true: multiplayer is crazy hard!! In this test, I built an eight player lobby that synchronizes avatar movement, collision, and GUI over a wifi network. Each client has their own unique chat input that relays the submitted string to every other player and prints it to a GUI Box that is locked to the 3D avatar’s position. Here I rather slowly and painfully learned how to:

  • Initialize/Disconnect a Server
  • Create distinct experiences for the Host and Clients
  • Instantiate Objects across all sessions
  • Display unique avatars of distinct color based on player number
  • Create a WASD control scheme
  • Utilize Network View Components
  • Utilize RPCs
  • Parent and rename objects across all sessions
  • Identify Objects based on unique Network View IDs
  • Convert world space (Vector3) to screen space (Vector2)
  • Resize and expire GUI based on String length
  • Clean up across all sessions
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s