[XP] RPG Maker XP Online System (RMX-OS)

Started by Blizzard, June 20, 2009, 11:52:23 am

Previous topic - Next topic

Blizzard

As I said, if you can run the server, but you don't see it online in the game, then something with the configuration is wrong.
If both are on the same computer, then using 127.0.0.1 should work properly. :/
Have you tried it on another computer?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

feandrad

No, I don't... I'll try later....

Blizzard

July 02, 2009, 03:53:58 pm #122 Last Edit: July 04, 2009, 01:59:14 pm by Blizzard
RMX-OS 0.85 is out. It runs on Ruby 1.9.1 now. I have added in the installation guide how to install Ruby 1.9.1 "properly".


  • Slightly changed the way SERVERS is configured.

  • Improved server threading of incoming connections.

  • Added better server abortion.

  • RMX-OS now comes as a 2 part script to separate configuration and the actual script.

  • RMX-OS now runs on Ruby 1.9.1 as the 1.9.x versions support POSIX mutli-threading which can improve the performance of the server in multi-processor and multi-core environments. The Installation Guide has been updated as well.



EDIT: I have uploaded 0.85 again because I added the link for Ruby so you don't have to google for it because people can get confused whether to download the source of the binary. You can download the "right" Ruby 1.9.1 from here.

EDIT: v0.86 is up.


  • Fixed bug where sprites of other players that have disconnected or left the map wouldn't be removed properly.

  • Fixed CPU time leak in the server.

  • Fixed bug where every newly registered user would be in the admin usergroup.

  • Fixed bug with Tons of Add-ons.


Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

the ruby like you gave is just a file not an installer like I normally use when installing ruby do we just open the server.rb file with the ruby.exe?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

July 04, 2009, 03:12:41 pm #124 Last Edit: July 04, 2009, 03:19:12 pm by game_guy
RTFM

Ryex

ya i figured it out.... I read the manual.... :^_^': :P
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

Oh woops hang on read the post again xD

Blizzard

July 04, 2009, 05:28:45 pm #127 Last Edit: July 06, 2009, 06:28:37 pm by Blizzard
v0.87 is up.


  • Fixed problem with message overflow.

  • Added special characters for usage in chat.

  • Changed the Main script.

  • Improved server. Now it is even more stable.

  • Improved client. Now it handles data more conveniently.



EDIT:

Nobody's posting here? O.o; Does that mean it works all fine? xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Hellfire Dragon

Guess so :P

I have no problems with it anymore, but ya never know :xD:

edwardthefma

i havent had a problem yet XD but wen pepol play it thay like freak out XD
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1

Blizzard

@Longfellow:

Spoiler: ShowHide
Quote from: Blizzard on June 21, 2009, 07:00:09 am
Quote from: Longfellow on June 20, 2009, 01:26:02 pm
Blizz, I may be wrong, but aren't Regular Expressions, like, brutally slow? Like, hash-lookup-level-times-ten slow? 0_o It might not be such a problem with simple ones, and it might not matter since the engine might be waiting on the server anyway, but that's not the sort of thing I'd think would be very reliable in such a time-sensitive environment >_<


Depends on how the parser was implemented. But I agree, it might be a good idea to test that on speed. It's true, I don't need regular expressions to compare strings.

'abc' == 'abc'


But regular expressions aren't meant to compare strings. They are meant to find string patterns. As I said, I can change my system in such a way so I don't use string expressions. But the question is whether

if message =~ /SAV(.+)\t(.+)/
 type = $1
 value = $2
 # stuff
end


is REALLY slower than

string = message[0, 3]
if string == 'SAV'
 data = message[3, message.size - 3]
 type, value = data.split("\t")
 # stuff
end


because regular expressions don't only find string patterns, no, they also find matched substrings after matching a string to a pattern.

As I said, it depends on how the parser was implemented and what kind of regular expression you use. I've had a class that was almost only based on grammars, finite state machines and regular expressions (and I had an A, yay). What I'm trying to say is that I know what I'm talking about.


Alright, I have tested it. I used 4 different test cases.

Case 1: ShowHide
This test case is the most basic. It matches the string for the first 3 characters and then separates the rest as data from the original string. It is used on a string that matches.
This script was used in the test case:

a = 'CHTBlizzard: Hi, guys. What\'s up?'
count = 1000000

time = Time.now
count.times {
 if a =~ /CHT(.+)/
   data = $1
 end
}
p Time.now - time

time = Time.now
count.times {
 if a[0, 3] == 'CHT'
   data = a[3, a.size - 3]
 end
}
p Time.now - time


The test times for regex method:
1.234
1.219
1.235

The test times for direct string manipulation:
2.532
2.500
2.484


Case 2: ShowHide
This test case is identical to the first one except for the string that is checked. This time the string does not match the pattern.
This script was used in the test case:

a = 'CHTBlizzard: Hi, guys. What\'s up?'
count = 1000000

time = Time.now
count.times {
 if a =~ /MOV(.+)/
   data = $1
 end
}
p Time.now - time

time = Time.now
count.times {
 if a[0, 3] == 'MOV'
   data = a[3, a.size - 3]
 end
}
p Time.now - time


The test times for regex method:
0.500
0.515
0.500

The test times for direct string manipulation:
1.688
1.750
1.703


Case 3: ShowHide
This test case is the most complex and requires regex perform multiple separation of data.
This script was used in the test case:

a = 'LINBlizzard\ttestpass'
count = 1000000

time = Time.now
count.times {
 if a =~ /LIN(.+)\t(.+)/
   user, pass = $1, $2
 end
}
p Time.now - time

time = Time.now
count.times {
 if a[0, 3] == 'LIN'
   user, pass = a.split("\t")
 end
}
p Time.now - time


The test times for regex method:
0.781
0.797
0.765

The test times for direct string manipulation:
4.672
4.734
4.688


Case 4: ShowHide
Again the test case is the same as the one before but the string is not matched.
This script was used in the test case:

a = 'LINBlizzard\ttestpass'
count = 1000000

time = Time.now
count.times {
 if a =~ /REG(.+)\t(.+)/
   user, pass = $1, $2
 end
}
p Time.now - time

time = Time.now
count.times {
 if a[0, 3] == 'REG'
   user, pass = a.split("\t")
 end
}
p Time.now - time


The test times for regex method:
0.547
0.610
0.546

The test times for direct string manipulation:
1.750
1.750
1.781


In all 4 test cases I have not included the calculation of standard deviation and distribution as the purpose is comparison rather than precision of the measurement.

Interpretation of results:

Regex matches strings (several times) faster. In case the string isn't matched, the direct string manipulation method still needs to create a new substring for the first match and then extract the rest of the string while regex does that all at once. This is due to regex matching is implemented with a parser and a finite state machine mechanism that doesn't need to check the entire string or alter the string in order to determine whether it does or does not match a pattern.

Conclusion:

Regex is much better for string pattern detection. Use it when you can, but don't use it when you don't actually need it!
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

fugibo

Quote from: Blizzard on July 13, 2009, 08:43:08 am
@Longfellow:

Spoiler: ShowHide
Quote from: Blizzard on June 21, 2009, 07:00:09 am
Quote from: Longfellow on June 20, 2009, 01:26:02 pm
Blizz, I may be wrong, but aren't Regular Expressions, like, brutally slow? Like, hash-lookup-level-times-ten slow? 0_o It might not be such a problem with simple ones, and it might not matter since the engine might be waiting on the server anyway, but that's not the sort of thing I'd think would be very reliable in such a time-sensitive environment >_<


Depends on how the parser was implemented. But I agree, it might be a good idea to test that on speed. It's true, I don't need regular expressions to compare strings.

'abc' == 'abc'


But regular expressions aren't meant to compare strings. They are meant to find string patterns. As I said, I can change my system in such a way so I don't use string expressions. But the question is whether

if message =~ /SAV(.+)\t(.+)/
 type = $1
 value = $2
 # stuff
end


is REALLY slower than

string = message[0, 3]
if string == 'SAV'
 data = message[3, message.size - 3]
 type, value = data.split("\t")
 # stuff
end


because regular expressions don't only find string patterns, no, they also find matched substrings after matching a string to a pattern.

As I said, it depends on how the parser was implemented and what kind of regular expression you use. I've had a class that was almost only based on grammars, finite state machines and regular expressions (and I had an A, yay). What I'm trying to say is that I know what I'm talking about.


Alright, I have tested it. I used 4 different test cases.

Case 1: ShowHide
This test case is the most basic. It matches the string for the first 3 characters and then separates the rest as data from the original string. It is used on a string that matches.
This script was used in the test case:

a = 'CHTBlizzard: Hi, guys. What\'s up?'
count = 1000000

time = Time.now
count.times {
 if a =~ /CHT(.+)/
   data = $1
 end
}
p Time.now - time

time = Time.now
count.times {
 if a[0, 3] == 'CHT'
   data = a[3, a.size - 3]
 end
}
p Time.now - time


The test times for regex method:
1.234
1.219
1.235

The test times for direct string manipulation:
2.532
2.500
2.484


Case 2: ShowHide
This test case is identical to the first one except for the string that is checked. This time the string does not match the pattern.
This script was used in the test case:

a = 'CHTBlizzard: Hi, guys. What\'s up?'
count = 1000000

time = Time.now
count.times {
 if a =~ /MOV(.+)/
   data = $1
 end
}
p Time.now - time

time = Time.now
count.times {
 if a[0, 3] == 'MOV'
   data = a[3, a.size - 3]
 end
}
p Time.now - time


The test times for regex method:
0.500
0.515
0.500

The test times for direct string manipulation:
1.688
1.750
1.703


Case 3: ShowHide
This test case is the most complex and requires regex perform multiple separation of data.
This script was used in the test case:

a = 'LINBlizzard\ttestpass'
count = 1000000

time = Time.now
count.times {
 if a =~ /LIN(.+)\t(.+)/
   user, pass = $1, $2
 end
}
p Time.now - time

time = Time.now
count.times {
 if a[0, 3] == 'LIN'
   user, pass = a.split("\t")
 end
}
p Time.now - time


The test times for regex method:
0.781
0.797
0.765

The test times for direct string manipulation:
4.672
4.734
4.688


Case 4: ShowHide
Again the test case is the same as the one before but the string is not matched.
This script was used in the test case:

a = 'LINBlizzard\ttestpass'
count = 1000000

time = Time.now
count.times {
 if a =~ /REG(.+)\t(.+)/
   user, pass = $1, $2
 end
}
p Time.now - time

time = Time.now
count.times {
 if a[0, 3] == 'REG'
   user, pass = a.split("\t")
 end
}
p Time.now - time


The test times for regex method:
0.547
0.610
0.546

The test times for direct string manipulation:
1.750
1.750
1.781


In all 4 test cases I have not included the calculation of standard deviation and distribution as the purpose is comparison rather than precision of the measurement.

Interpretation of results:

Regex matches strings (several times) faster. In case the string isn't matched, the direct string manipulation method still needs to create a new substring for the first match and then extract the rest of the string while regex does that all at once. This is due to regex matching is implemented with a parser and a finite state machine mechanism that doesn't need to check the entire string or alter the string in order to determine whether it does or does not match a pattern.

Conclusion:

Regex is much better for string pattern detection. Use it when you can, but don't use it when you don't actually need it!



I see. I was looking at the problem from a more C-oriented perspective, in which case something like Regexp would be a bit of overkill. The architecture you're using for the server protocol also plays a big part.

But you win. *bows, and powers up for teh epic*

Blizzard

The only one that wins are the users of RMX-OS because these results show that they definitely have a good and optimized server. :)

Also, I don't think the architecture (except for the communication protocol) is that relevant. These results don't mean that more complicated regular expressions wouldn't be slower. i.e. It could be that Netplay+ message protocol (in form of "<tag_name>data</tag_name>") wouldn't work so fast with regular expressions.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Hellfire Dragon

July 15, 2009, 08:59:57 am #133 Last Edit: July 15, 2009, 09:01:02 am by Hellfire Dragon
I have a weird problem, whenever I enter Map002 it runs common event  2 auto-matically :O.o:
I checked to make no event on the map called it and that wan't hard because there's only 2 on it, a transfer event and one that changes your graphic

Blizzard

I don't think that it has anything to do with RMX-OS.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Hellfire Dragon

That's the only non-default script I'm using :uhm:

Blizzard

Quote from: Blizzard on July 15, 2009, 03:12:22 pm
I don't think that it has anything to do with RMX-OS.


Meaning that your eventing is messed up. RMX-OS doesn't affect events at all.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Hellfire Dragon

How can my eventing be messed up? I even replaced the common event with plain text box and it still showed up... the common event doesn't use a switch to activate and it isn't called at all on the map... I can't find the problem :-/

fugibo

Quote from: Blizzard on July 15, 2009, 04:58:02 am
The only one that wins are the users of RMX-OS because these results show that they definitely have a good and optimized server. :)

Also, I don't think the architecture (except for the communication protocol) is that relevant. These results don't mean that more complicated regular expressions wouldn't be slower. i.e. It could be that Netplay+ message protocol (in form of "<tag_name>data</tag_name>") wouldn't work so fast with regular expressions.


I meant that a basic C server would most likely just stuff everything into a 3-4 bytes per message (one identifier, 2-3 arguments, each as a char, maybe a short/int) and evaluate it in a simple loop, which definitely has the potential to be much, much faster. Of course, in Ruby stuff like that becomes slightly more complicated and a waste of effort.

Blizzard

July 16, 2009, 04:17:04 am #139 Last Edit: July 16, 2009, 04:18:22 am by Blizzard
Quote from: Longfellow on July 15, 2009, 11:21:18 pm
Quote from: Blizzard on July 15, 2009, 04:58:02 am
The only one that wins are the users of RMX-OS because these results show that they definitely have a good and optimized server. :)

Also, I don't think the architecture (except for the communication protocol) is that relevant. These results don't mean that more complicated regular expressions wouldn't be slower. i.e. It could be that Netplay+ message protocol (in form of "<tag_name>data</tag_name>") wouldn't work so fast with regular expressions.


I meant that a basic C server would most likely just stuff everything into a 3-4 bytes per message (one identifier, 2-3 arguments, each as a char, maybe a short/int) and evaluate it in a simple loop, which definitely has the potential to be much, much faster. Of course, in Ruby stuff like that becomes slightly more complicated and a waste of effort.


What you are talking makes no sense. You are saying that in C you can make a message like "CHTBlizzard: Hello. My name is Blizzard and I am a programmer." be 3-4 bytes long which is complete bullshit.
First thing, the message is far too long to be compressed down to 3 bytes.
Secondly, my message identifiers are 3 characters long which translates into 3 bytes of application data that are sent over the network (sent using Win32API which was written in C/Assembly, helloooooooooo). Altogether it means that whatever I do in Ruby, it will be turned into actual C data before sent over the network. In fact, this will happen in any language because practically all socket controlling programs were written in low level languages because nobody would make one in a high level language. That's like coding an operating system in a high level language: You don't do that.
Thirdly, sending a message over the network using TCP isn't just sending 3 bytes. It's sending at least 160 + 3 bytes. That results in actually far better communication when you use longer messages or put several messages in one TCP package (but I didn't go that far with RMX-OS because that could create lag significant lag). That also means using a single byte and all of 256 possible states as identifier is just idiotic. Sending 2 additional bytes over the network is much less costly than manipulating raw byte streams so it's just a minimal message. You fail at computer communcation protocols. Horribly.

That's what I hate about C programmers. They are so narrow-sighted that they think C is the best and the fastest language for every single purpose that there is out in the world. They think that they can do just everything with "just a few bytes" while they completely ignore the practical usability. If they did just that, it would be actually ok, but they are much worse. They have no problem wasting irreasonable amount of CPU time just to save 10% of memory. We don't live in a time anymore where we have only 64kB of memory. I'm not saying to waste memory, but I have no problem increasing memory usage by 10% if I can speed up execution time by 400% because the program doesn't recalculate some things over and over again. I guess that is what makes the difference between a "programmer" and a "programm engineer".

Saying stuff like this just to make you look smart is really idiotic. Level down for that degree of arrogance. "just stuff everything into a 3-4 bytes per message" Woah, you should listen to yourself.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.