Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411512 Posts in 69380 Topics- by 58436 Members - Latest Member: GlitchyPSI

April 30, 2024, 10:16:41 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)How do MMORPGs store their users data?
Pages: 1 2 [3] 4 5
Print
Author Topic: How do MMORPGs store their users data?  (Read 18999 times)
OneMoreGo
Level 3
***

Stop looking at my chest


View Profile
« Reply #40 on: July 04, 2013, 10:31:27 AM »

MySQL (or Maria DB) is fine, I think it would be an actively bad thing to use either MS SQL or Oracle, if nothing else they are difficult to install and make your OS choice more difficult. Open Source stuff is good enough for 99% of use cases.  I use this stuff professionally and would rather work with MySQL than Oracle any day.

It's a multi year project being realistic, unless you already have a part written RPG somewhere already?  Grin    Pick the smallest possible scope you can and get something working, then build on that.
Logged
Dacke
Level 10
*****



View Profile
« Reply #41 on: July 04, 2013, 10:37:34 AM »

I meant that MySQL is owned by Oracle, and that MariaDB is a free fork. I didn't mean Oracle's Oracle Database Smiley

What's bothering you with the Go syntax? To me it mostly feels like an improved C.
Go also has the best language specification I've ever seen (no, I haven't read the C specification Wink). It's easy to read and explains all the features of the language:
http://golang.org/ref/spec


Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
comma
Level 0
**

Magnus


View Profile
« Reply #42 on: July 04, 2013, 10:48:58 AM »

Mhmm... I think that MySQL isn't the best option ever for big databases, there are powerful DBMSs like MS SQL Server which will be good for this activities.

Haha, lol, what? Use a non-free Microsoft thing for server stuff?

I said for big databases.
Logged

It\'s me Magnus!
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #43 on: July 04, 2013, 10:49:36 AM »

Quote
It's a multi year project being realistic, unless you already have a part written RPG somewhere already?      Pick the smallest possible scope you can and get something working, then build on that.

Oh, it's a really, really, really vanilla RPG. Mechanisms are just really bare. I have coded this before:

and what I am aiming for is easier (there are no events / map - player depth / pathfinding for NPC), so I believe I am able to code such trivial thing quite nicely.

Quote
Pick the smallest possible scope you can and get something working, then build on that.

I will Smiley

Quote
What's bothering you with the Go syntax? To me it mostly feels like an improved C.
Go also has the best language specification I've ever seen (no, I haven't read the C specification ). It's easy to read and explains all the features of the language:
http://golang.org/ref/spec

Mostly the huge dose of freedom. I am used to hard-typed syntax, like C++, and here I can declare a variable like that:
var a int = 5

or like that:
var a = int(5)

or like that:
a := 5

Not mentioning for loops Giggle

Also, that weird reversed variable type declaration. In my opinion the language also lacks some examples, like setting up UDP server / TCP server and such.
But in the end, it indeed looks a bit like C (besides no semicolons :D)


PS.
I have no expierience with setting up mySQL by yourself on windows. Is MySQL Server Community Edition fine? Or is there something more... lightweight?
Logged

Dacke
Level 10
*****



View Profile
« Reply #44 on: July 04, 2013, 10:55:54 AM »

I said for big databases.

And I said:

MySQL is also used in many high-profile, large-scale websites, including Wikipedia, Google (though not for searches), Facebook, Twitter, Flickr, and YouTube.

Wink


@karmac:

Use the := syntax whenever you can. It's completely compile-time safe (like C++), just that the (pre?)compiler does the extra typing for you. The same is true with semi-colons. The language does have semi-colons, but most of them get automatically inserted at compile time.

The for loops just use the same word for all the different looping constructs, it should be familiar.

Yes, lack of examples is the main problem. It's a relatively young language so you won't find as many tutorials/code-examples/frameworks as you would in other languages.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Gregg Williams
Level 10
*****


Retromite code daemon


View Profile WWW
« Reply #45 on: July 04, 2013, 11:01:06 AM »

C# is plenty capable, and has pretty much every piece of functionality you want as part of .net
Logged

Dacke
Level 10
*****



View Profile
« Reply #46 on: July 04, 2013, 11:04:59 AM »

Except that it's a Microsoft thing and won't run properly on his VPS. Java would be a comparable choice (and it's often used server side, for example at Google), but I don't think it's a great fit.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #47 on: July 04, 2013, 11:11:07 AM »

Just not karmac!  Sad  ka - mac. kamac. Smiley

Quote
Except that it's a Microsoft thing and won't run properly on his VPS

That's right.

Quote
Java would be a comparable choice (and it's often used server side, for example at Google), but I don't think it's a great fit.

I think that it consumes some RAM, and while I would have 512MB, uh, well..


Oh, by the way, now I have to pick either UDP or TCP Tears of Joy
I will probably go for TCP, as it's not an action game and doesn't stream that much of data, I think. Besides, I will need to communicate between website & game server with sockets to reach certain data.. Or I might aswell do that by accessing the database with PHP My Word!

Programmers world - while being very fun, it gives a variety of choices.
Logged

Dacke
Level 10
*****



View Profile
« Reply #48 on: July 04, 2013, 11:15:07 AM »

Sorry, sorry, kamac.

You should have a separate "module" that handles communication for you. Implement it using TCP now. Re-implement the module using UDP later if you need to. The rest of the program shouldn't notice the difference.

edit: The same goes for the database. Just have a data-module that communicates with the database. Let Go talk directly to the database now. If you need to scale up later re-implement that module to access another server via sockets or whatever.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #49 on: July 04, 2013, 11:22:02 AM »

Quote
Sorry, sorry, kamac.

 Wink

Quote
You should have a separate "module" that handles communication for you. Implement it using TCP now. Re-implement the module using UDP later if you need to. The rest of the program shouldn't notice the difference.

edit: The same goes for the database. Just have a data-module that communicates with the database. Let Go talk directly to the database now. If you need to scale up later re-implement that module to access another server via sockets or whatever.

Those are good points, only one question though - what do you mean by module, though? I am just beginning with Go and maybe I have not read about some terms? Or something?
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #50 on: July 04, 2013, 11:24:50 AM »

Seeing as you are making a realtime MMO, and just a prototype at that, have you considered having no database? You need to maintain the game state in memory no matter what for any pratical realtime game, why bother with ensuring you can survive a server crash until you've got the basics running.


FWIW, I think this discussion is pointless. Loads of languages are possible, and choice of database/configuration is irrelevant as it can likely be changed much later, if you get performance problems.

Also, I would plan to fail, considering your experience and the level of difficulty/work involved. My advice would be to get a prototype done without too much initial planning, and then take stock of what went wrong for your real game.
Logged
Daid
Level 3
***



View Profile
« Reply #51 on: July 04, 2013, 11:27:20 AM »

Quote
You should have a separate "module" that handles communication for you. Implement it using TCP now. Re-implement the module using UDP later if you need to. The rest of the program shouldn't notice the difference.

edit: The same goes for the database. Just have a data-module that communicates with the database. Let Go talk directly to the database now. If you need to scale up later re-implement that module to access another server via sockets or whatever.

Those are good points, only one question though - what do you mean by module, though? I am just beginning with Go and maybe I have not read about some terms? Or something?
I think he means class/library or "thing with a implementation independent interface". A http://en.wikipedia.org/wiki/Database_abstraction_layer
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
Dacke
Level 10
*****



View Profile
« Reply #52 on: July 04, 2013, 11:28:06 AM »

Yeah, I'm just talking general code architecture (nothing Go-specific). You have different parts of the program that communicate with each other. Each part (or "module" or whatever) shouldn't care know how other parts work internally.

You just need to define some kind of interface/API that the different parts use to communicate with each other. Either via public methods, an event system or channels.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Dr. Cooldude
Guest
« Reply #53 on: July 04, 2013, 11:31:05 AM »

My experience with MSSQL was pretty bad compared to MySQL.
Logged
Gregg Williams
Level 10
*****


Retromite code daemon


View Profile WWW
« Reply #54 on: July 04, 2013, 11:32:11 AM »

Except that it's a Microsoft thing and won't run properly on his VPS. Java would be a comparable choice (and it's often used server side, for example at Google), but I don't think it's a great fit.
Mono will likely run it just fine.
Logged

kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #55 on: July 04, 2013, 11:32:38 AM »

Quote
Also, I would plan to fail, considering your experience and the level of difficulty/work involved.

I do plan to fail Smiley
I have attempted that before, and failed miserably. Even if that was quite a while ago, and now I know that my skills are developed at a certain degree, I still plan to fail. In fact, I'll be very excited if I ever get the basic stuff working (log in / walk around / chat)

The whole server topic, is actually theory for two purposes:
1) If I would succeed [somehow]
2) For the future

I find it a valuable experience.

Oh, by the way, each fail brings me closer to my target Smiley

Quote
You just need to define some kind of interface/API that the different parts use to communicate with each other. Either via public methods, an event system or channels.

Looks like I'll have to look into developing such thing within Go, as it's not OOP, it might  differ a bit from what I have learned with object oriented languages.
Logged

Dacke
Level 10
*****



View Profile
« Reply #56 on: July 04, 2013, 11:38:24 AM »

It's actually pretty close to OOP, just simplified and cleaner. Structs+methods act like classes. You can "inherit" from a struct by in-lining it in a new struct.
http://golangtutorials.blogspot.se/2011/06/inheritance-and-subclassing-in-go-or.html

But you should probably look into how channels are used to communicate internally. It opens up lots of new possibilities, but it can take some time to get your head around.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Gregg Williams
Level 10
*****


Retromite code daemon


View Profile WWW
« Reply #57 on: July 04, 2013, 11:42:07 AM »

Use TCP/IP, if your worried about supporting tons of players and want low overhead use async sockets like boost ASIO if using C++, .net has its form.

For your scale I'd ditch the database and just keep everything in memory, then serialize to disk every 30 minutes or hour. If you were familiar with it all I'd say having a basic login, walk, chat thing could be up and running in a week or less. It usually gets a lot more complex than that though quickly.

I'd still standby mono and .net plenty of emulated uo servers written in .net have been deployed to Linux in this fashion. I can't say anything about GO.
Logged

kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #58 on: July 04, 2013, 11:44:58 AM »

Quote
It's actually pretty close to OOP, just simplified and cleaner. Structs+methods act like classes. You can "inherit" from a struct by in-lining it in a new struct.
http://golangtutorials.blogspot.se/2011/06/inheritance-and-subclassing-in-go-or.html

Oh, this I know Wink
I ment those channels. Will have to look into them further. And will - tommorow.

Thanks for all the help, those were mostly tough choices.


Also, about the database - I need it, since it's not that the game & the server are alone, and the server can keep all of the data for itself. There's also website which needs to access players data from time to time, for certain purposes, and I don't think sending the data by TCP socket back to the website by a request is a fine idea. (is this even safe?)

I will most likely just save user state to database every 10 minutes automatically, and once when user logs out. Not too demanding, is it?  WTF
Logged

Dacke
Level 10
*****



View Profile
« Reply #59 on: July 04, 2013, 11:47:07 AM »

Mono will likely run it just fine.

Quite possible, but afaik .net isn't fully supported by Mono. I think there are issues with Windows-specific features and Microsoft being patent-jerks.

If C# was a properly free language I would probably use it instead of Java, but Microsoft are huge jerks with a terrible track record.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Pages: 1 2 [3] 4 5
Print
Jump to:  

Theme orange-lt created by panic