Results 1 to 10 of 10

Thread: game servers

  1. #1
    mrguy is offline Member
    Join Date
    Jul 2012
    Posts
    27
    Rep Power
    0

    Default game servers

    I want to make my java games have private servers for playing games with friends over the internet. Do you guys know where to start? or what APIs I should look into? and should I put this in the networking section? Thanks.

  2. #2
    noctarius is online now Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: game servers

    Depends on the game you want to play. If you need a so called "freeshard" server for a commercial game, you could be very lucky that there is possibly a more or less done server (maybe not in Java).
    Ich you want to do your own game there are nice frameworks like Smartfox, RedDwarf, ElectroServer, ...

  3. #3
    mrguy is offline Member
    Join Date
    Jul 2012
    Posts
    27
    Rep Power
    0

    Default Re: game servers

    All I want to do is be able to send small amounts of data across the internet to the people that download the client side of the game. I would have a client and a server running on my computer. the data sent to each of the clients would look something like this

    [(103,621),(12,10)][(215,390),(1,3)][(189,531),(0,0)]

    every frame. Each square bracket has inside it the position and velocity of one client on the screen.

    every time a client presses a key or moves the mouse it is then sent to the server some how like this

    38 for up arrow key press or (259,10)D for mouse drag.

    so all I want it to do is be able to send data to and from a server to clients on completely different computers with internet access. Code examples appreciated.

  4. #4
    noctarius is online now Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: game servers

    Every frame could be hard to be synchronized if you think of 30-60 frames.

  5. #5
    mrguy is offline Member
    Join Date
    Jul 2012
    Posts
    27
    Rep Power
    0

    Default Re: game servers

    I don't think they need to be synchronized do they?

  6. #6
    noctarius is online now Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: game servers

    that's what you wrote :)

    the data sent to each of the clients would look something like this

    [(103,621),(12,10)][(215,390),(1,3)][(189,531),(0,0)]

    every frame

  7. #7
    mrguy is offline Member
    Join Date
    Jul 2012
    Posts
    27
    Rep Power
    0

    Default Re: game servers

    actually I don't even think that the clients need timers. They just would react when ever the server sends the data which will then be every frame. The clients will just have events and they send data over every time they get one. I apologize I'm still trying to figure out how this will work.

  8. #8
    noctarius is online now Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: game servers

    You need to figure out which data the clients need to run "nearly synchronous", that's the data you need to send to them. For example to move a character you need the speed, the direction, the time the movement will take and the endpoint. The client can calculate the way to the endpoint. At regular base the server would send an updateposition package to make client synchronous again to the gameserver (and to all other players).
    Not sure if this is the kind of information you searching for.

  9. #9
    mrguy is offline Member
    Join Date
    Jul 2012
    Posts
    27
    Rep Power
    0

    Default Re: game servers

    I'm don't really care too much about the preciseness of the motion of the characters I just want to know how to send the information. Later when I have some examples of sending data then I will get too the actual things that I need to worry about like synchronous of the clients and the server. So for now does any one have experience in this realm of networking and have any code examples?

  10. #10
    kammce's Avatar
    kammce is offline Senior Member
    Join Date
    Dec 2010
    Location
    California
    Posts
    194
    Rep Power
    4

    Default Re: game servers

    Sorry, I cannot be of more help to you. I was working on Java Servers and I had a project, but things got in the way and I never completed it. So I was half way there and I never got a full understanding on making a MultiThreaded Server. Maybe you will have better luck then I did, and be able to implement this where I could not. For your problem, I looked at Sun's (I will always see them as Sun and not Oracle) tutorial on:Writing the Server Side of a Socket (The Java™ Tutorials > Custom Networking > All About Sockets)
    look through the whole tutorial so you can make the client work as well.

    Hope this helps!
    My API:
    Java Code:
    cat > a.out || cat > main.class

Similar Threads

  1. How do i get a list of SQL Servers from network?
    By flyto9 in forum Networking
    Replies: 0
    Last Post: 03-16-2011, 05:13 PM
  2. Javamail and different servers
    By Clockwork in forum Java Servlet
    Replies: 3
    Last Post: 07-12-2010, 07:57 PM
  3. how to connect two servers??
    By init in forum Networking
    Replies: 8
    Last Post: 03-28-2010, 06:59 PM
  4. subforum for servers
    By tushar88 in forum Suggestions & Feedback
    Replies: 3
    Last Post: 03-10-2009, 02:25 AM
  5. Looking for servers on ports
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-13-2007, 09:28 AM

Posting Permissions

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