Results 1 to 3 of 3
  1. #1
    exonaut is offline Member
    Join Date
    Mar 2013
    Location
    USA
    Posts
    28
    Rep Power
    0

    Question Networking Issue

    So recently I've been developing a multiplayer game and when I got to networking I managed to work through most of the problems I had except for this one. Basically the client sends input and server does the logic and sends back something to render/play, called an Asset in my game, and everything is either an Entity or GUI and entities are stored and rendered/updated in WorldMaps. So every time it renders I make sure to match each EntityPlayer to its corresponding client which works fine but when I try to add other players to render on that client, so everyone can see each other, it either only renders that client or doesn't render it and renders it's own player. He's a snippet of the render code from WorldMap:

    Java Code:
    public void render(Graphics g) throws Exception   
       {
          for (Map.Entry<String, Entity> entry : entityRegistry.entrySet())
          {
             if (entry.getValue() instanceof EntityPlayer)
             {
                if (Server.getInstance().getClientFromPlayer(entry.getValue().getName()).getGraphics().equals(g))
                {
                   ((EntityPlayer) entry.getValue()).render(Server.getInstance().getClientFromPlayer(entry.getValue().getName()), g);
                }
             }
             else   
                entry.getValue().render(g);
          }
       }
    Feel free to ask any questions or give me any tips/suggestions you think will solve the problem, thanks!

  2. #2
    exonaut is offline Member
    Join Date
    Mar 2013
    Location
    USA
    Posts
    28
    Rep Power
    0

    Default Re: Networking Issue

    What the fuck does that have to do with anything?

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,912
    Rep Power
    5

    Default Re: Networking Issue

    First, I understand your frustration but you can be banned from the forum for using profanity
    (I suggest you delete your post and change your signature). Second, they are spammers and
    the threads will be deleted by a moderator.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Networking issue
    By ram in forum New To Java
    Replies: 2
    Last Post: 09-24-2013, 11:48 AM
  2. Please help, I'm new to Networking
    By etiger in forum Networking
    Replies: 2
    Last Post: 07-17-2011, 09:42 PM
  3. Help with Networking
    By mr_anderson in forum Networking
    Replies: 1
    Last Post: 07-11-2010, 10:18 PM
  4. Networking Help
    By rp181 in forum Networking
    Replies: 4
    Last Post: 09-20-2009, 06:09 PM
  5. Networking Application Issue is connecting
    By andre1011 in forum Advanced Java
    Replies: 0
    Last Post: 03-20-2009, 10:48 PM

Tags for this Thread

Posting Permissions

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