Welcome to RaGEZONE - MMORPG Development Forums (sponsored by tfn.gr) Mark forums read | View Forum Leaders
RaGEZONE - MMORPG Development Forums (sponsored by tfn.gr)

Ragescape Discuss, RaGESCAPE Updates - Perfect Performance at Free MMORPG Servers forum; Aye, Since Meth0d has been working on his conversion to MySQL, i thought i'd work on even better proformance (Server-Side) ...




Reply
Thread Tools
RaGESCAPE Updates - Perfect Performance
 
 
ßσяи.тσ.яαgз

Rank: Supervisor


Reply With Quote
Blog Entries: 1
 
Join Date: May 2007
Location: Toronto, ON
Posts: 3,530
11-20-2008, 12:39 AM
 
Aye,

Since Meth0d has been working on his conversion to MySQL, i thought i'd work on even better proformance (Server-Side)

Turns out, it is a big success. The writing processors and buffering processor of the server are much more enhanced, it can be powerful enough to save files EVERY SECOND (We must convert to MySQL first)

Most of these performance enhancements are now LIVE on the server, but some of them will have to wait for the switch to MySQL as the buffering will be too intense on flatfile subjectivitys and possibly cause lagg.


According to client, the speed of the server is much more faster than we've ever had.

Before Update
Quote:
Raw Channeling:

Request speed(secs): 0.49281
Receive speed(secs): 0.21938

Ping on request: 2.15 per packet size
Ping on receive: 0.92 per packet size
After Updating
Quote:
Raw Channeling:

Request speed(secs): 0.32019
Receive speed(secs): 0.19724

Ping on request: 1.79 per packet size
Ping on receive: 0.87 per packet size


These updates are fully functional, you might not notice the performance, nor think it's something big, But if you see how it's being handled, you will be


NPC UPDATES & IMPROVEMENTS

I've also improve NPC dashing and rendering when upon objects & hardmaps

PHP Code:
public void getNextNPCMovement(NPC n) {
        if (
== null) {
            return;
        }
        if (
n.moveX == && n.moveY == 0) {
            return;
        }
        if(
n.freezeTimer 0){
            return;
        }
        
int dir direction(n.absXn.absY, (n.absX n.moveX), (n.absY n.moveY));
        if (
dir == -1) {
            return;
        }
        
n.updateReq true;
        
dir >>= 1;
        
n.direction dir;
        
n.absX += n.moveX;
        
n.absY += n.moveY;
    } 
The npc follows it's own route and thinks upon moving to avoid going into objects etc.


Player UPDATES & IMPROVEMENTS

- I have added many different NoClip handlers, now when you try walking though items, objects etc you will be directed AROUND it, you will never find yourself going though objects anymore.

- Users chatting is NOW logged, as we have some more performance, i have added chat logging. The chatlog will contain everything you type. So now we will have DIRECT chatlogs so when something is reported, we can check immediately, I will be talking to meth0d, seeing if we can add chatlogs to db and grab it via CMS so all mods can see it aswell.

- Many combat oppositions have been deleted because they were many causes of lags when massive wars (eg. when there is lots of people around, and people are fighting, it will lagg the player thread along with all clients, so deleting the combat nulling after every hit was removed now it only nulls at beginning of battle, and either when it ends or when somebody dies.

- Some buttons have been added, there not yet useful, but the buttons on the tools tab have been added, soon will be useful for stuff.

Misc UPDATES & IMPROVEMENTS

- Implemented Herblore skill and works perfectly, it can make potions, it can clean leaves etc, It is not available at the moment, but it will be on the release date of MySQL.

- Some writting & buffering have been changed when writing on .cfg's etc so it doesn't write in cgfs all at onces all requests are quenched in line.
-----------------------------------------------------------------------












 
 
permalink
 

RaGEZONE is proudly sponsored by
 
Average Member

Rank: Omicron


Reply With Quote
 
Join Date: Oct 2007
Posts: 60
11-20-2008, 01:20 AM
 
Very Nice! I'm looking forward to the MySQL conversion. Just make sure that you guys secure all the forms to avoid SQL injections. I know a lot of private servers who had that problem. But all in all, excellent work!
 
 
permalink
 

 
<3

Rank: Subscriber


Reply With Quote
 
Join Date: Aug 2008
Location: United Kingdom
Posts: 489
11-20-2008, 01:49 AM
 
Wow great update AJ, Looks like you have been very busy. Good work!
 
 
permalink
 


 
ßσяи.тσ.яαgз

Rank: Supervisor


Reply With Quote
Blog Entries: 1
 
Join Date: May 2007
Location: Toronto, ON
Posts: 3,530
11-20-2008, 02:08 AM
 
Another update;

Chatlogs are PURELY filtered now, everything you type, even yelling, it's all logged
 
 
permalink
 

 
Banned
xblackcat's Avatar

Status: Banned


Reply With Quote
 
Join Date: Aug 2008
Location: nowhere
Posts: 1,968
11-20-2008, 02:16 AM
 
aww, all the bad words are going to be gone?
 
 
permalink
 

 
ßσяи.тσ.яαgз

Rank: Supervisor


Reply With Quote
Blog Entries: 1
 
Join Date: May 2007
Location: Toronto, ON
Posts: 3,530
11-20-2008, 02:21 AM
 
No i said all is logged, nothing is blocked
 
 
permalink
 

 
Average Member

Rank: Omicron


Reply With Quote
 
Join Date: Oct 2008
Location: Ireland
Posts: 56
11-20-2008, 02:22 AM
 
That's great! =]

Good to see you're all so active
 
 
permalink
 

 
ThuGie.nl - Webmaster

Rank: Subscriber


Reply With Quote
 
Join Date: Apr 2006
Location: Holland
Posts: 872
11-20-2008, 03:09 AM
 
Sorry but these days i hardly work with java but here are some questions about the small piece of code you posted

PHP Code:
public void getNextNPCMovement(NPC n) {
        if (
== null) {
            return;
        }
        if (
n.moveX == && n.moveY == 0) {
            return;
        }
        if(
n.freezeTimer 0){
            return;
        }
        
int dir direction(n.absXn.absY, (n.absX n.moveX), (n.absY n.moveY));
        if (
dir == -1) {
            return;
        }
        
n.updateReq true;
        
dir >>= 1;
        
n.direction dir;
        
n.absX += n.moveX;
        
n.absY += n.moveY;
    } 
First the return type = void, meaning using return is useless right ?
Also wouldnt it be better to use make it one big if ?

PHP Code:
public void getNextNPCMovement(NPC n) {
    if (
!= null ) { //First check if n isnt null since else it will error when checking.
        
if (n.moveX != && n.moveY != && n.freezeTimer <= 0) { //Check if x/y isnt 0, And npc isnt frozen.
            
int dir direction(n.absXn.absY, (n.absX n.moveX), (n.absY n.moveY)); //Get npc direction.
            
if (dir != -1) { //If dir isnt -1 update npc location.
                
n.updateReq true;
                
dir >>= 1;
                
n.direction dir;
                
n.absX += n.moveX;
                
n.absY += n.moveY;
            }
        }
    }

But as i said i hardly code in java,
So i might be wrong.

Edit:
Changed code tags to php.
 
 
permalink
 

 
GunZ Semi-Pro

Rank: Member


Reply With Quote
 
Join Date: Oct 2008
Posts: 1,023
11-20-2008, 03:10 AM
 
Nice updates!
 
 
permalink
 

 
ßσяи.тσ.яαgз

Rank: Supervisor


Reply With Quote
Blog Entries: 1
 
Join Date: May 2007
Location: Toronto, ON
Posts: 3,530
11-20-2008, 05:14 AM
 
@ ThuGie, without returning, you'd just be in a loop trying to figure out the if statements are
 
 
permalink
 

 
Creating a new Server....



Reply With Quote
Blog Entries: 2
 
Join Date: May 2006
Location: Chandler, Az, U.S., North America, Earth, Milky Way, Universe, ???
Posts: 1,379
11-20-2008, 05:18 AM
 
either of those will work just as well, ThuGie. Although, AJ, I would use else ifs to end it if anything is found

Code:
public void getNextNPCMovement(NPC n) {
        if (n == null) {
            return;
        }
        else if (n.moveX == 0 && n.moveY == 0) {
            return;
        }
        else if(n.freezeTimer > 0){
            return;
        }
        int dir = direction(n.absX, n.absY, (n.absX + n.moveX), (n.absY + n.moveY));
        else if (dir == -1) {
            return;
        }
        n.updateReq = true;
        dir >>= 1;
        n.direction = dir;
        n.absX += n.moveX;
        n.absY += n.moveY;
    }
this is much more efficient code. if you have else if, it will only check those if the above if was false. Without the else, it will check all the ifs, regardless of a return statement( I think, not 100% positive on that). Thugie's method is also efficient on accomplishing the else if stuff without the madness

Edit:
To respond to AJ's post, you can avoid the looping by adding one else statement to go with the first if statement.
Code:
ublic void getNextNPCMovement(NPC n) {
    if (n != null ) { //First check if n isnt null since else it will error when checking.
        if (n.moveX != 0 && n.moveY != 0 && n.freezeTimer <= 0) { //Check if x/y isnt 0, And npc isnt frozen.
            int dir = direction(n.absX, n.absY, (n.absX + n.moveX), (n.absY + n.moveY)); //Get npc direction.
            if (dir != -1) { //If dir isnt -1 update npc location.
                n.updateReq = true;
                dir >>= 1;
                n.direction = dir;
                n.absX += n.moveX;
                n.absY += n.moveY;
            }
        }
    }
    else 
        return;
}
 
 
permalink
 

 
Member

Rank: Omicron


Reply With Quote
 
Join Date: Oct 2008
Posts: 32
11-20-2008, 05:25 AM
 
ragescape is getting better and better :D keep it up aj
 
 
permalink
 

 
ThuGie.nl - Webmaster

Rank: Subscriber


Reply With Quote
 
Join Date: Apr 2006
Location: Holland
Posts: 872
11-20-2008, 05:47 AM
 
Thanks for clearing that up,
And yeah i myself find my code more uhm readable.
But also if you need to set a return you will have to add else 3 times as there are 3 if checks :p.


Or just set a return; without else, 1 time then it should simply always at the end of the function return.
But just trying to help ;), + learn a bit myself :p.

Edit,
And if you dont want to return something when it should actually execute,
You could set a boolean and if the boolean = false return.
 
 
permalink
 

 
Wymm

Rank: Member


Reply With Quote
 
Join Date: Oct 2008
Location: Naples, Italy
Posts: 317
11-20-2008, 07:10 PM
 
I wish I knew java >_< I only know BASIC at the moment.. >_<
 
 
permalink
 

 
RageScape Supporter

Rank: Member


Reply With Quote
 
Join Date: May 2008
Posts: 286
11-20-2008, 09:04 PM
 
Is there going to be a wipe with teh conversion to MySQL?
 
 
permalink
 

 
Wymm

Rank: Member


Reply With Quote
 
Join Date: Oct 2008
Location: Naples, Italy
Posts: 317
11-20-2008, 09:07 PM
 
I believe they said that there will not be a wipe.
 
 
permalink
 

 
RageScape Supporter

Rank: Member


Reply With Quote
 
Join Date: May 2008
Posts: 286
11-20-2008, 09:32 PM
 
Quote: Originally Posted by Blufner View Post
I believe they said that there will not be a wipe.
Yay! Thx for clearing that up =p
 
 
permalink
 

 
Alpha Member

Rank: Alpha Member

1 Highscore

Reply With Quote
Blog Entries: 6
 
Join Date: Dec 2006
Location: The Netherlands
Posts: 4,914
11-20-2008, 09:47 PM
 
they were making an dat -> sql converter
 
 
permalink
 

 
ßσяи.тσ.яαgз

Rank: Supervisor


Reply With Quote
Blog Entries: 1
 
Join Date: May 2007
Location: Toronto, ON
Posts: 3,530
11-20-2008, 10:03 PM
 
Meth0d told me something about items, not sure if it was a problem or not, I tried messaging him but goes away too quick
 
 
permalink
 

 
ThuGie.nl - Webmaster

Rank: Subscriber


Reply With Quote
 
Join Date: Apr 2006
Location: Holland
Posts: 872
11-20-2008, 10:12 PM
 
Uhm since you already have the read/write functions of the accounts items etc,
In java,

You should be able to use that to read account per account and then add it to MySQL,
This would be the best solution wouldnt it.
 
 
permalink
 

 
ßσяи.тσ.яαgз

Rank: Supervisor


Reply With Quote
Blog Entries: 1
 
Join Date: May 2007
Location: Toronto, ON
Posts: 3,530
11-20-2008, 10:16 PM
 
We'd have to login to every account, and since we encrypted every single password, we can't go on accounts

Server engine only grabs variables from players when online
 
 
permalink
 

 
ThuGie.nl - Webmaster

Rank: Subscriber


Reply With Quote
 
Join Date: Apr 2006
Location: Holland
Posts: 872
11-20-2008, 10:45 PM
 
Your wrong.
You have all information in flatfile, Meaning normal txt files,
Password might be encoded but thats no problem,

You only have to read the files/ and write them to mysql,
You dont actually need to know the passwords for the accounts since you read the information strait from the files themselfs.

You dont need the server for this,
Just the read function you use to load the user information item information etc,
And write them to a mysql table.
 
 
permalink
 

 
ßσяи.тσ.яαgз

Rank: Supervisor


Reply With Quote
Blog Entries: 1
 
Join Date: May 2007
Location: Toronto, ON
Posts: 3,530
11-20-2008, 10:56 PM
 
We are already doing it (via converter but items are messed up, there stored in a different way)
 
 
permalink
 

 
Keep on Trying!

Rank: Moderator

1 Highscore

Reply With Quote
Blog Entries: 1
 
Join Date: Feb 2007
Location: US
Posts: 4,962
11-21-2008, 12:53 AM
 
Can't wait till the release of RageScape v.2
 
 
permalink
 

 
Creating a new Server....



Reply With Quote
Blog Entries: 2
 
Join Date: May 2006
Location: Chandler, Az, U.S., North America, Earth, Milky Way, Universe, ???
Posts: 1,379
11-21-2008, 01:23 AM
 
I see what you mean, ThuGie. Yea I didn't realize that having an else return would mess things up a bit. Just having the return; would work, although I agree with your readable aspect. However, using a boolean doesn't help, since it has to meet 3 conditions; The ifs that return false inside of the big if will make the main if false, thus running the return statement outside. I like your version purely because it does the same thing with less work.
 
 
permalink