llemes4011's Profile User Rating: -----

Reputation: 2 Apprentice
Group:
Members
Active Posts:
33 (0.02 per day)
Joined:
05-November 09
Profile Views:
2,275
Last Active:
User is offline Aug 27 2013 08:37 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Playstation
Your Car:
Nissan
Dream Kudos:
0

Latest Visitors

Icon   llemes4011 has not set their status

Posts I've Made

  1. In Topic: Networked Player Movement - Client/Server out of Sync

    Posted 26 Aug 2013

    View PostJTG2003, on 26 August 2013 - 03:00 PM, said:

    Hm, ok. I'll give that a shot .. not sure how it would be any different though.


    It's cleaner, and you don't have to worry about inconsistent timings, since the Timer will trigger every X milliseconds. Just makes your life easier.

    View PostJTG2003, on 26 August 2013 - 03:00 PM, said:

    Yeah.. I wonder if I stupidly put my sleep inside the FOR loop that goes through each client. That would explain why it's slower for each player, each player adds another 10ms delay. I'll check as soon as I get home. Man that would be great.


    Happens to the best of us xD

    View PostJTG2003, on 26 August 2013 - 03:00 PM, said:

    View PostButchDean, on 26 August 2013 - 12:47 PM, said:

    I don't see anything regarding the server specification and whether you are sure you are not loosing packets one way or another. Does java.swing handle these concerns for you?


    Hm, not exactly sure what you mean by server specification. It's using TCP so if a packet is lost, it will re-send it, no? I'm not using swing in my networking code, just for GUI.


    TCP traffic will resend, that isn't the issue here. (Frequent packet loss can screw you, but overall, that's VERY unlikely in a test environment)

    Cheers
  2. In Topic: Networked Player Movement - Client/Server out of Sync

    Posted 26 Aug 2013

    Try modifying your Server Update Thread to use javax.swing.Timer and an ActionListener to handle updates, rather than a loop. I think it might be an issue with where you sleep for 10ms. Also, you might want to check your rendering & update functions on the client, and see if there's a sleep in there in the wrong place (that would certainly cause tearing if the server is forcing a position change every second).

    If there's too much code, you could always host it on GitHub, and link to specific sections, or just give a slimmed down version here.

    Can't do much else for you without code :)

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Indiana, USA
Interests:
Programming, Reading, Learning, Computer, ect.
Full Name:
Neil Semmel
Years Programming:
2
Programming Languages:
Java, C, C++

Contact Information

E-mail:
Click here to e-mail me
MSN:
MSN  llemes44011@hotmail.com
Website URL:
Website URL  http://jiso.sourceforge.net
Facebook:
http://www.facebook.com/neil.semmel

Friends

llemes4011 hasn't added any friends yet.

Comments

llemes4011 has no profile comments yet. Why not say hello?