Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Realtime server client conversation  (Read 4411 times)

0 Members and 1 Guest are viewing this topic.

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Realtime server client conversation
« on: October 28, 2012, 01:31:24 pm »
Hello,

i´m currently working on multiplayer modes for my further programmed games like Ping Pong Tetris etc.

I have a debain based root Server so I´m using it as Server, (my router doesnt support portforwarding, so I have to use it).

First i started with Tetris and it was no Problem i used TCP, the Clients only send the information from their blocks to the Server and he spread this Informations to the other Clients, all no Problem.

But now I´m trying to do the same with Ping Pong. At the Moment the Server does all the Work, the Clients only send their keyinputs and the Server send all the information about the positions etc (every frame). The Problem is, it´s lagging and i have no idea how to make it better.

Should i use UDP? Or is there a better way to manage the informations?


P.S sry for my English but i´m not a native speaker

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Realtime server client conversation
« Reply #1 on: October 28, 2012, 06:39:16 pm »
TCP is good for turn based and slow games while UDP is good for real time and fast games. That's about all I know since I have yet to get a multiplayer game up and running.
I have many ideas but need the help of others to find way to make use of them.

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Realtime server client conversation
« Reply #2 on: October 28, 2012, 09:01:36 pm »
K, thanks for your answer, i will try it with UDP and post my results later

Azaral

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Re: Realtime server client conversation
« Reply #3 on: November 05, 2012, 06:49:51 pm »
From my limited knowledge, UDP is a lot faster than TCP, but it is also less safe and could cause errors. If you are doing anything realtime, use UDP.

egyware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Realtime server client conversation
« Reply #4 on: November 06, 2012, 03:20:06 am »

 

anything