Thread: Runesource Revised [V2.0]

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Runesource Revised [V2.0] 
    Java Programmer
    _Jon's Avatar
    Join Date
    Jan 2015
    Age
    30
    Posts
    206
    Thanks given
    36
    Thanks received
    63
    Rep Power
    47
    Runesource

    Release Information

    This release contains a cleaner framework with work started on the entity system as well as improvements to the handling of packets and player events

    Third Party Dependencies
    -Netty 4

    Change Log
    -Removed static player updating.
    -Added entity event system.
    -Improved upon packet system.
    -Fixed multiplayer.
    -Cleaned up player class.
    -Implemented a Singleton world class. (Multiple world support isn't realistically necessary)
    -Refactoring and general object orientation of specific things like player appearance.

    Hot Fixes

    Location -> World.java
    Code:
    	@Override
    	public void run() {
    		while (true) {
    			long start = System.currentTimeMillis();
    			try {
    				playerRespitory.values().forEach($it -> $it.getEventHandler().updateMovement($it));
    				playerRespitory.values().forEach($it -> $it.getEventHandler().update($it));
    				playerRespitory.values().forEach($it -> $it.reset());
    				long elapsed= System.currentTimeMillis() - start;
    				long sleepTime = 600 - elapsed;
    				if (sleepTime > 0) {
    					Thread.sleep(sleepTime);
    				}
    			} catch (Exception e) {
    				e.printStackTrace();
    			}
    		}
    	}

    Release
    Client & Source - Here

    Media
    Github - Here
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    Michael P's Avatar
    Join Date
    Dec 2013
    Posts
    1,264
    Thanks given
    499
    Thanks received
    321
    Rep Power
    674
    I didn't look at much as I'm about to head to bed, though I quickly found a major problem.

    Code:
    @Override
    	public void run() {
    		while (true) {
    			try {
    				playerRespitory.values().forEach(player -> {
    					player.getEventHandler().updateMovement(player);
    					player.getEventHandler().update(player);
    					player.reset();
    				});
    				Thread.sleep(600);
    			} catch (InterruptedException e) {
    				e.printStackTrace();
    			}
    		}
    	}
    You are not factoring in the time it took to process before sleeping. Instead, it should be:
    Code:
    @Override
    	public void run() {
    		while (true) {
                            long start = System.currentTimeMillis();
    			try {
    				playerRespitory.values().forEach(player -> {
    					player.getEventHandler().updateMovement(player);
    					player.getEventHandler().update(player);
    					player.reset();
    				});
    				long elapsed= System.currentTimeMillis() - start;
    			        long sleepTime = 600 - elapsed;
    			        if (sleepTime > 0) {
    				  try {
    					Thread.sleep(sleepTime);
    				  } catch (InterruptedException e) {
    					e.printStackTrace();
    				}
    			}
    			} catch (InterruptedException e) {
    				e.printStackTrace();
    			}
    		}
    	}
    Reply With Quote  
     

  4. Thankful users:


  5. #3  
    Extreme Donator Runesource Revised [V2.0] Market Banned



    Join Date
    Dec 2010
    Age
    25
    Posts
    6,060
    Thanks given
    1,692
    Thanks received
    1,238
    Rep Power
    1765
    Keep them coming, getting better & better.
    Reply With Quote  
     

  6. Thankful user:


  7. #4  
    Developer


    Join Date
    Oct 2013
    Age
    29
    Posts
    1,038
    Thanks given
    689
    Thanks received
    321
    Rep Power
    260
    Nice release, thanks for the contribution I will be taking a look at this soon, firstly i'm getting my new computer set up.

    Attached image
    Spoiler for vouches(20+):

    Reply With Quote  
     

  8. #5  
    Banned

    Join Date
    Jun 2015
    Posts
    1,517
    Thanks given
    31
    Thanks received
    143
    Rep Power
    0
    Nice release, thanks for the Contribution !
    Reply With Quote  
     

  9. #6  
    Banned

    Join Date
    Dec 2011
    Posts
    572
    Thanks given
    34
    Thanks received
    74
    Rep Power
    0
    Nice release, wont be using but thanks
    Reply With Quote  
     

  10. #7  
    Registered Member
    Join Date
    Oct 2015
    Posts
    136
    Thanks given
    3
    Thanks received
    7
    Rep Power
    11
    First of all, thank you for the release. IŽll be using this to try and extend my Java knownledge and hopefully piece together a nice server.
    Second, IŽve got the server properly setup and it runs. However, the client wonŽt run for some reason. Getting the following error:
    Code:
    RS2 user client - release #317
    Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid
    
    Process finished with exit code 0
    I'm using intelliJ.
    Reply With Quote  
     

  11. #8  
    Java Programmer
    _Jon's Avatar
    Join Date
    Jan 2015
    Age
    30
    Posts
    206
    Thanks given
    36
    Thanks received
    63
    Rep Power
    47
    Quote Originally Posted by monsterbull v2 View Post
    First of all, thank you for the release. IŽll be using this to try and extend my Java knownledge and hopefully piece together a nice server.
    Second, IŽve got the server properly setup and it runs. However, the client wonŽt run for some reason. Getting the following error:
    Code:
    RS2 user client - release #317
    Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid
    
    Process finished with exit code 0
    I'm using intelliJ.
    Use the bat inside the client folder, otherwise you will have to set the runtime arguments with the the ide's run configuration.

    I added a hot fix to account for the time delay on the world update event as well as fix the player movement update.
    Github - Here
    Reply With Quote  
     

  12. #9  
    Registered Member
    Join Date
    Aug 2016
    Posts
    32
    Thanks given
    10
    Thanks received
    4
    Rep Power
    20
    This is a tidy little server foundation.

    Edit: Player updating is still too primitive for the server to be useful for people to host, i.e: multi-player rendering works, but you do not see another player move when they walk, nor do you see other players chatbox text.
    Reply With Quote  
     

  13. #10  


    RS Wiki's Avatar
    Join Date
    Mar 2011
    Age
    29
    Posts
    9,688
    Thanks given
    1,752
    Thanks received
    3,103
    Rep Power
    5000
    Host this on github instead
    All the best,
    Wiki




    coming soon
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Runesource Revised [v1]
    By _Jon in forum Downloads
    Replies: 6
    Last Post: 12-04-2016, 03:44 AM
  2. 317beta [RuneSource][Revision 17]
    By lare96 in forum Projects
    Replies: 48
    Last Post: 11-24-2012, 09:03 AM
  3. [RuneSource] Extrania v2 Official Release
    By Rene Eats Waffl3z in forum Downloads
    Replies: 110
    Last Post: 02-29-2012, 03:17 PM
  4. [RuneSource]Extrania V2 Project [RuneSource] BETA SOON
    By Rene Eats Waffl3z in forum Projects
    Replies: 66
    Last Post: 01-19-2012, 12:05 AM
  5. [RuneSource/Any] Checking Client Revision
    By Mikey` in forum Snippets
    Replies: 0
    Last Post: 12-31-2011, 09:17 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
  •