RMX-OS 'Dedicated' servers?

Started by Xolitude, February 06, 2013, 07:36:21 pm

Previous topic - Next topic

Xolitude

Hey people! Another question for me :P (I know I must be getting annoying), but you guys are amazing on support and deeply appreciate it.

Anyways, here is my question.

Would I be able to re-write some things to make a "Dedicated server client" so people can run their own servers WITHOUT the need of MySQL??

What I mean is, can I re-write a few scripts so the "buddy_list, guilds, inbox, ips, save_data, user_data, users" all save in-to their own '.dat' or '.txt' files so people can host their own instead of having to play off my server host?

Blizzard

February 06, 2013, 09:50:04 pm #1 Last Edit: February 06, 2013, 09:52:18 pm by Blizzard
I think you are mixing up the concept of a dedicated server. MySQL is part of how it works. A dedicated server means it's a PC that's solve purpose is to run a RMX-OS server with an MySQL database. You can install a MySQL server on any computer just like you did on yours.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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.

Xolitude

Quote from: Blizzard on February 06, 2013, 09:50:04 pm
I think you are mixing up the concept of a dedicated server. MySQL is part of how it works. A dedicated server means it's a PC that's solve purpose is to run a RMX-OS server with an MySQL database. You can install a MySQL server on any computer just like you did on yours.


You are 100% correct(obviously). I just didn't want people to go through the same chaos I did, that's all.

Blizzard

February 06, 2013, 10:19:48 pm #3 Last Edit: February 06, 2013, 10:22:03 pm by Blizzard
Well, I made an installation guide that guides you step-by-step and there is an FAQ for certain problems. That's all I can offer. There simply is a limit to how simple something can be made. If things would be even simpler than this, other areas would suffer greatly (e.g. SQL databases are very efficient ways to store data, a simple structured file would cause incredible problems even with smaller servers/databases/number of players).

I know that people sometimes have trouble understanding even step-by-step instructions (often because of many professional terms used), but if people are not ready to familiarize themselves with the technology they are working with, I don't see much point in continuing game development in the first place. It's not going to get easier, especially not when one wants to make an MMO.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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.

Xolitude

Exactly, good point. Thanks :) you can close this if you'd like.

P.S: You're damn patient and mature :P

Blizzard

Comes with the years. :)
I actually just edited the text a bit.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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.

Xolitude

I see it. Well thanks man, appreciate the help and such.

Oh, one thing from that though, this is probably a dumb question but how would a simple .txt file mean a less player-base/user-base?

Blizzard

SQL databases are internally organized in files, but these files have a lot of indexes for super-fast data search.

Imagine you have 10000 players on the server and somebody is trying to login. In an SQL database the table containing usernames can be immediately accessed and the name can be found via an index. Not to go into too much detail, but lots of SQL database system use an index with letters if the searched field is of a text type. That means that the username "Alpha" would be search by first finding the index for A (which is 1/26 letters), then the next linked index for L (which is yet again only 1/26 and it's only that high if all other letter entries actually exist) and so on until it gets the text ALPHA together. At this point the index points directly to the entry in the database containing all user information with only 5 * 26 = 130 reads (worst case scenario).

In a normal file you would have to go through 10000 user data entries to find that username and the worst case scenario is that you have to go through all of them. Not to talk about first finding the part of the data that is actually related to user data (not save data, ip logs, etc.) It's true that such a file could be split into several files and indexes could be added in there as well, but SQL already does that and so much more. What if 2 players try to save some data in the same file? One of them would have to "wait" until the other one finishes or they could corrupt each other's data. SQL databases also handle the problem of concurrent access.

There are even more advantages, but there are literally books written on this subject so I will stop here. If you are interested, you can always google a bit. It's quite an interesting topic. I even had two classes back at university all centered around SQL database systems.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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.

Xolitude

Quote from: Blizzard on February 06, 2013, 10:34:25 pm
SQL databases are internally organized in files, but these files have a lot of indexes for super-fast data search.

Imagine you have 10000 players on the server and somebody is trying to login. In an SQL database the table containing usernames can be immediately accessed and the name can be found via an index. Not to go into too much detail, but lots of SQL database system use an index with letters if the searched field is of a text type. That means that the username "Alpha" would be search by first finding the index for A (which is 1/26 letters), then the next linked index for L (which is yet again only 1/26 and it's only that high if all other letter entries actually exist) and so on until it gets the text ALPHA together. At this point the index points directly to the entry in the database containing all user information with only 5 * 26 = 130 reads (worst case scenario).

In a normal file you would have to go through 10000 user data entries to find that username and the worst case scenario is that you have to go through all of them. Not to talk about first finding the part of the data that is actually related to user data (not save data, ip logs, etc.) It's true that such a file could be split into several files and indexes could be added in there as well, but SQL already does that and so much more. What if 2 players try to save some data in the same file? One of them would have to "wait" until the other one finishes or they could corrupt each other's data. SQL databases also handle the problem of concurrent access.

There are even more advantages, but there are literally books written on this subject so I will stop here. If you are interested, you can always google a bit. It's quite an interesting topic. I even had two classes back at university all centered around SQL database systems.


Wow, you're damn smart at this, I will diffidently look into it a lot more. Thanks a ton! :D

Blizzard

And that's why RMX-OS is better than Netplay+. xD It's been made by a software engineer rather than just a programmer.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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.

Xolitude

February 06, 2013, 11:15:08 pm #10 Last Edit: February 06, 2013, 11:20:07 pm by Xolitude
Bro, don't even get me started on Netplay+, haha. RMX-OS is the best.

EDIT: Blizzard, can I ask another question on this thread not about Dedi servers? :P

Blizzard

You can ask here, it's no big deal. Or if you think that it might require a longer answer/discussion, a new thread might be better after all.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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.

Xolitude

Ok.

Would it be possible to add in bits and pieces of Blizz-ABS into RMX-OS without all those files? For example, just adding in a HUD(player name, HP, mana + minimap)?

Blizzard

Tons of Add-ons has a lot of things that Blizz-ABS also uses. But for some other stuff you will have to use custom scripts.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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.

Xolitude


KK20

Well I guess this means that there really isn't a practical way to allow players in my Advance Wars engine to freely play against each other in such a similar way as wirelessly connecting 4 Nintendo DS systems together, at least not without going through the whole process of downloading RMX-OS, setting up their own servers, and distributing the client to their friends. This, of which, can prove to be a problem for those (particularly, the friends I have interested in this project) who don't even have RPG Maker XP (or have any knowledge of programming/game design/computers-in-general/etc.).

And I don't even have a personal server...rather, one that I can have running 24 hours.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Ryex

not necessarily you write it so that one of the clients will act as a server for the other players. of course this will cause problem if that player trying to host the game doesn't know how to port forward or clicks off the screen pausing the game
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 />

KK20

Hrm, still not sure what I'm going to do. Granted this is still a while away, I kinda want to know my options. It'd probably also help if I had more knowledge on this subject matter.

Eh, who knows, maybe I'll have a server by that time.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Ryex

frankly writing a server isn't that hard. especially if your only dealing with a few players at once and you don't have need of a database to store the data.

all you do is send messages and receive messages. and if you think of the messages as normal method calls. just that your calling them on another computer it's really not that different than normal programming. you have a function and it's arguments and you call or process accordingly. for you kind of thing with just a 4-8 player server non data intensive you don't even need to worry about threading. you can just process 1 message at a time in a single thread and you wont notice any problems.

but here we've gone a hijacked this poor guy's thread.

@Xolitude

it is possible to rewrite the server to use sqlite, a server less sql database that is stored in 1 file local to the server. heck it might even be relatively simple considering the database language doen't change you would just need to re root the method calls accordingly (and write a small sqlite binding of course). this would mean setup of the server would only require running the server in a folder.

I can not vouch for the performance of sqlite, I hear that it doesn't scale anywhere near as well as MySQL or other server driven databases (meaning it's performance will fall off as you get more and more users) but a modest server serving about 50 people at once should be well within it's abilities.

I myself do not have the time to attempt such a rewrite but perhaps armed with this knowledge you can find someone who can.

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 />

KK20

I guess the only thing stopping me now is knowledge. I'll let this be a summer project. Thanks for the insight~

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!