Thread: Networking similar to Runescape .

Results 1 to 3 of 3
  1. #1 Networking similar to Runescape . 
    Registered Member Dev_RyanJ's Avatar
    Join Date
    Sep 2013
    Age
    28
    Posts
    211
    Thanks given
    46
    Thanks received
    34
    Rep Power
    1
    Anyone know of a framework that has been released or example that's similar to RS. I like the way rs handles their packets & am curious if there is anything similar using netty 4+. I'm to the point in my game where i'm ready to add multiplayer. I need to be able to send specific packets (ping, login, etc..) I'm only looking for a skeleton because I'll be using it a lot for a learning experience.
    Reply With Quote  
     

  2. #2  
    Registered Member SuperMario's Avatar
    Join Date
    May 2012
    Posts
    329
    Thanks given
    30
    Thanks received
    26
    Rep Power
    5
    Hyperion or Apollo, I guess.
    I have been learning from it for RuneSpire.
    You can convert Hyperion's code for Netty, that shouldn't be too hard.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2011
    Posts
    36
    Thanks given
    3
    Thanks received
    3
    Rep Power
    27
    Really you should be creating your own packet system. The networking is specific to the application. Java In/outputstreams have the option to send objects, all you have to do is send two 4 byte ints (object byte size) (packet ID)
    then on the other end you .read() for the size (byte[4] i = inputstream.read()), assign a new byte array to the size of the size: new byte[i], then read for the packet (byte[4] packetID = inputstream.read()), then read for the object and assign it to the byte array you created with the size of the object using

    object u = inputstream.readObject(arrayName);

    then do a case switch on the packetID

    case 1: //walking packet ect
    //cast object to class
    (WalkingClass) a = (WalkingClass) u;
    break;

    Walking class will be serializable and visible to both the client and server (two copies or global scope (same project)).

    and because .read() on the input/outputstreams are blocking methods they act as interrupts meaning optimal efficiency.

    If you need more of an explanation add me on skype: KieranDevvs
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 03-27-2013, 07:23 PM
  2. Login lobby ( Similar to runescape )
    By Mr House in forum Show-off
    Replies: 31
    Last Post: 02-09-2012, 09:23 PM
  3. Replies: 12
    Last Post: 02-13-2009, 02:27 PM
  4. Armies of Glienor resemblance to RuneScape
    By wizzyt21 in forum RS 503+ Client & Server
    Replies: 12
    Last Post: 01-18-2009, 02:19 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •