Thread: What makes a server give better performace?

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 What makes a server give better performace? 
    Registered Member
    Coke zero's Avatar
    Join Date
    Jun 2012
    Posts
    624
    Thanks given
    178
    Thanks received
    75
    Rep Power
    197
    I've been looking at making a server with everything done; so all the stuff is done besides the content.
    I've chosen Project Insanity but I don't want to even touch this base without cleaning up stuff.
    I've got a clean PI and the code is messy and just all over the place.
    What would make it cleaner and give better performance and make things easier to handle.?

    Would it be more classes but classes with less code?
    Would it be less classes with jam packed code?
    Instead of so many cases in buttonhandper.java; make extra classes handling a certain thing? Eg: Emotes tab in enums
    Any others
    I just need to know what makes a better performing, stable and easier to work with framework before adding content.

    Thanks in advance
    I'm fluent in Java-Script as well as Klingon... lol jks
    sig removed
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Dec 2010
    Posts
    761
    Thanks given
    86
    Thanks received
    137
    Rep Power
    0
    Don't jam shit in process
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Banned
    Join Date
    May 2013
    Posts
    201
    Thanks given
    0
    Thanks received
    40
    Rep Power
    0
    Worst thing to do is to add stuff into process. I suggest cleaning out every class.
    Reply With Quote  
     

  5. #4  
    Registered Member
    Coke zero's Avatar
    Join Date
    Jun 2012
    Posts
    624
    Thanks given
    178
    Thanks received
    75
    Rep Power
    197
    Quote Originally Posted by Myuria View Post
    Don't jam shit in process
    LOL the process class is jam packed with shit so I gotta clean that. So smaller classes with more code or a lot of classes with less code?
    How would I handle process? Just methods instead of heaps of crap?
    I'm fluent in Java-Script as well as Klingon... lol jks
    sig removed
    Reply With Quote  
     

  6. #5  
    Donator


    Join Date
    Mar 2011
    Posts
    2,350
    Thanks given
    1,193
    Thanks received
    824
    Rep Power
    856
    Quote Originally Posted by Coke zero View Post
    LOL the process class is jam packed with shit so I gotta clean that. So smaller classes with more code or a lot of classes with less code?
    How would I handle process? Just methods instead of heaps of crap?
    The amount of code is redundant. It's how the code is being used.
    Reply With Quote  
     

  7. Thankful users:


  8. #6  
    Registered Member
    Coke zero's Avatar
    Join Date
    Jun 2012
    Posts
    624
    Thanks given
    178
    Thanks received
    75
    Rep Power
    197
    Quote Originally Posted by Pegasus View Post
    The amount of code is redundant. It's how the code is being used.
    Good ways to use code?
    Enums?
    Switches?
    Whole lot of ifs?
    I'm fluent in Java-Script as well as Klingon... lol jks
    sig removed
    Reply With Quote  
     

  9. #7  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    extreme lack of object orientation and abstraction are the main problems

    you shouldn't need to even focus on performance

    rather focusing on how you can implement content easier
    Reply With Quote  
     

  10. Thankful users:


  11. #8  
    Registered Member
    Coke zero's Avatar
    Join Date
    Jun 2012
    Posts
    624
    Thanks given
    178
    Thanks received
    75
    Rep Power
    197
    Quote Originally Posted by Harlan View Post
    extreme lack of object orientation and abstraction are the main problems

    you shouldn't need to even focus on performance

    rather focusing on how you can implement content easier
    Please elaborate on object orientation; I know java is object oriented but dont know what it means...
    Also elaborate on absraction and give examples of the 2
    I'm fluent in Java-Script as well as Klingon... lol jks
    sig removed
    Reply With Quote  
     

  12. #9  
    Registered Member

    Join Date
    Jan 2013
    Posts
    553
    Thanks given
    38
    Thanks received
    154
    Rep Power
    127
    Example of object orientation...Instead of using itemId and itemAmount like PI does make an Item object that will hold both...

    Code:
    package org.niobe.model;
    
    import org.niobe.model.definitions.ItemDefinition;
    
    /**
     * Represents an item which is owned by a player.
     * 
     * @author relex lawl
     */
    
    public class Item {
    	
    	/**
    	 * An Item object constructor.
    	 * @param id		Item id.
    	 * @param amount	Item amount.
    	 */
    	public Item(int id, int amount) {
    		this.id = id;
    		this.amount = amount;
    		this.definition = ItemDefinition.forId(id);
    	}
    	
    	/**
    	 * An Item object constructor.
    	 * @param id		Item id.
    	 */
    	public Item(int id) {
    		this(id, 1);
    	}
    	
    	/**
    	 * The item id.
    	 */
    	private int id;
    
    	/**
    	 * Gets the item's id.
    	 */
    	public int getId() {
    		return id;
    	}
    	
    	/**
    	 * Sets the item's id.
    	 * @param id	New item id.
    	 */
    	public Item setId(int id) {
    		this.id = id;
    		return this;
    	}
    	
    	/**
    	 * Amount of the item.
    	 */
    	private int amount;
    	
    	/**
    	 * Gets the amount of the item.
    	 */
    	public int getAmount() {
    		return amount;
    	}
    	
    	/**
    	 * Sets the amount of the item.
    	 */
    	public Item setAmount(int amount) {
    		this.amount = amount;
    		return this;
    	}
    	
    	/**
    	 * The item's definition, checks things like value, is stackable, is noted, etc.
    	 */
    	private ItemDefinition definition;
    
    	/**
    	 * Gets item's definition.
    	 */
    	public ItemDefinition getDefinition() {
    		return definition;
    	}
    	
    	/**
    	 * Copying the item by making a new item with same values.
    	 */
    	public Item copy() {
    		return new Item(id, amount);
    	}
    }
    Reply With Quote  
     

  13. Thankful user:


  14. #10  
    Registered Member
    Coke zero's Avatar
    Join Date
    Jun 2012
    Posts
    624
    Thanks given
    178
    Thanks received
    75
    Rep Power
    197
    Quote Originally Posted by iLiftPlenty View Post
    Example of object orientation...Instead of using itemId and itemAmount like PI does make an Item object that will hold both...

    Code:
    package org.niobe.model;
    
    import org.niobe.model.definitions.ItemDefinition;
    
    /**
     * Represents an item which is owned by a player.
     * 
     * @author relex lawl
     */
    
    public class Item {
    	
    	/**
    	 * An Item object constructor.
    	 * @param id		Item id.
    	 * @param amount	Item amount.
    	 */
    	public Item(int id, int amount) {
    		this.id = id;
    		this.amount = amount;
    		this.definition = ItemDefinition.forId(id);
    	}
    	
    	/**
    	 * An Item object constructor.
    	 * @param id		Item id.
    	 */
    	public Item(int id) {
    		this(id, 1);
    	}
    	
    	/**
    	 * The item id.
    	 */
    	private int id;
    
    	/**
    	 * Gets the item's id.
    	 */
    	public int getId() {
    		return id;
    	}
    	
    	/**
    	 * Sets the item's id.
    	 * @param id	New item id.
    	 */
    	public Item setId(int id) {
    		this.id = id;
    		return this;
    	}
    	
    	/**
    	 * Amount of the item.
    	 */
    	private int amount;
    	
    	/**
    	 * Gets the amount of the item.
    	 */
    	public int getAmount() {
    		return amount;
    	}
    	
    	/**
    	 * Sets the amount of the item.
    	 */
    	public Item setAmount(int amount) {
    		this.amount = amount;
    		return this;
    	}
    	
    	/**
    	 * The item's definition, checks things like value, is stackable, is noted, etc.
    	 */
    	private ItemDefinition definition;
    
    	/**
    	 * Gets item's definition.
    	 */
    	public ItemDefinition getDefinition() {
    		return definition;
    	}
    	
    	/**
    	 * Copying the item by making a new item with same values.
    	 */
    	public Item copy() {
    		return new Item(id, amount);
    	}
    }
    How would this be used?
    I'm fluent in Java-Script as well as Klingon... lol jks
    sig removed
    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. Replies: 5
    Last Post: 01-26-2013, 10:01 PM
  2. What makes such server types popular?
    By Tyluur in forum RS 503+ Client & Server
    Replies: 17
    Last Post: 11-20-2012, 01:17 AM
  3. Little things to make your server look better?
    By Sir Rivera in forum Configuration
    Replies: 6
    Last Post: 03-07-2010, 02:19 AM
  4. What makes a server stable?
    By Cjay00091 in forum Help
    Replies: 5
    Last Post: 01-27-2009, 01:59 PM
  5. What makes a server exciting and fun?
    By Shelton in forum RS2 Server
    Replies: 4
    Last Post: 07-23-2008, 04:54 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
  •