1. Click here to join our community discord server.

Dismiss Notice

Don't forget to connect your Steam account to your forum profile. Click here to do this now or click your name in the right-top corner and choose 'External Accounts'.

Creating our own game?

Discussion in 'General Discussion' started by marvel, Jul 4, 2012.

  1. Roflmahwafflz

    Roflmahwafflz Junior Member

    Stupid Voxel caves are giving me trouble with the textures. The voxel painter doesnt seem like it wants to do what it's meant to. Ill try to find a fix for this, its merely just making me redo the cave from scratch xD hopefully this time it'll let me texture the cave.
     
  2. Roflmahwafflz

    Roflmahwafflz Junior Member

    underground cave probably wont happen, The cave im adding is more of just a transition effect and a bottleneck affect, it isn't some extensive mass cave system. :P perhaps I can do underground caves on an archipelago off of the main continent, while im at it I could make the cave system in the archipelago a safe haven like you mentioned above with "safe" islands.
     
  3. cry

    cry MG Donor

    [SUP]Seems okay to me, I will create a class like that. I have one question though, it's a matter of technical preference.

    You want me to use C libraries (fopen, fputs, fclose, printf), or you want only C++ libraries? My technical preference is C libraries, however I can understand that you do not want this. I can also build it in .NET if you want to speed up the task. Just tell me.[/SUP]

    MySQL is capable of handling massive tasks. Even though for most MMO games Microsoft SQL Server is used, there is no reason to assume MySQL cannot handle it. Hence we should use MySQL since it's free and it runs on Linux, which I believe is the home OS for the MG servers.

    Edit: Never mind, I already found my answer.
     
  4. Kitties

    Kitties Head Administrator

    Only just saw this, sorry, I've been busy with work. If you could show me the algorithms you've already found, that would be great, just so I can see where to start.
     
  5. Sycorax

    Sycorax Member

    There are lot of ways to scale MySQL to handle pretty much any load. Facebook is using it, as well as Google and other big players.
    I'd say you can't do much wrong by choosing MySQL. I'm not sure what kind of data you'd have to store, how many queries per second we're talking about and what kind of ACID properties you'll need. However it's more about the database design and how well you optimize your queries. Facebook, for example, is using MySQL pretty much as a Key-Value-Store where the key might be the userid and the value is a BLOB (I think they're generating some kind of compressed JSON) with the user's attributes (Name, Address, ...). It's a weird use-case, but stuff like that is what you usually have to do once you get to their kind of load.
    You should also check out other types of databases, not just relational ones. There might be better solutions for some portions of data. Redis (pretty much a Key-Value-Store on stereoids which works in-memory but has persistence options) is pretty good at storing counters (e.g. kill counter) or a set of users which are currently online.

    Just my 0.02. If you need any help with stuff like that, I'd be happy to.
     
  6. Hey Koolaid

    Hey Koolaid Head Administrator

    Cool thread to see when i stop in. :)
     
  7. marvel

    marvel Head Administrator Staff Member

    I agree, everything is depending on your database design. e.g. if you don't have any indexes your MySQL load will be massive. You should also do cleanups regularly but other than that MySQL can handle a lot of load. Look at our stats DBs they are huge but if you configure MySQL the right way there is almost no load. Our MySQL instance is usually on 2-3% cpu load and we have replication to 3 slaves and about 12 databases which include RPG, the vbulletin forum and the stats.

    Of course you need a decent server with a decent RAID controller and fast disks and if one server can't handle it it's really easy to add another one and divide the load.

    Other than that, Linux is free and MySQL is free. Windows + MSSQL 2008 is gonna set you back at least a $1000 before you even start.

    One more thing, if you can use the Innodb storage engine. MyISAM is faster (they say, I didn't notice) but it? far more sensitive for corrupt data and MyISAM is deprecated from version 5.5.
     
  8. marvel

    marvel Head Administrator Staff Member

    Oh and I'm flattered but I'm in no way a database expert. I can do MySQL installation, tuning, replication, clustering etc. but I don't know much about database structures Sycorax is talking about. That's all Chinese to me ;)

    If you need me to compile a custom kernel or make your hardware work better with MySQL I'm your man but don't ask me anything about relational databases or key values ;)
     
  9. cry

    cry MG Donor

    What Sycorax is talking about is explaining the database design, the performance rules. For example: If you need to store a number in your database, the best performance is attained when using the integer (an integer is a 32-bit number, maximum value is 4294967296) data type. If you use a text (string) data type to store this, the performance will be degraded.

    The same goes for the amount of bits needed for number. If the maximum value of the data stored is less then a certain amount, a smaller data type, for example: instead of 32 bits, a 16 bits one, can be used. This reduces memory use on the database server, and increases performance.

    Hey marvel, a question: I am already busy with developing the new mg game, but i d be also interested in taking part in developing the mods, and other software you need/use, and web programming if needed. You can add my steam or pm me in Dutch, since that would be the easiest way, no? ​
     
  10. erik

    erik MG Donor

    After today's tumultuous events, I'd venture to guess Marv's being humble here. :-D
     
  11. lukemurawski

    lukemurawski Senior Member

    Hi Cry, there was an optimization problem within your code. Remember, you have access to Boost libraries; try to keep the code multi-threaded if you can next time (should be easy with Boost's mutex system). Otherwise, well done with the RapidXML wrapper.

    As for the MySQL stuff, thanks everyone for the responses :) Google uses the Bigtable database system for their site (not MySQL), and Facebook is suffering from MySQL load problems. For the main database (our hives), we're going to need to use a faster database engine than MySQL. There is no way hundreds of servers can relay data simultaneously to a computer that uses MySQL for its data management.

    A signed 32-bit integer ranges from
     
  12. Sycorax

    Sycorax Member

    Google is using a lot of different databases - they've created BigTable, they're using MySQL (their own version, I think the patches they're using are available) and recently they released F1, which is apparently what they've started to use as a replacement for their software that's still using MySQL.
    I still think that MySQL is not a bad thing to start with. You're not going to find a relational database that offers orders-of-magnitude performance increases compared to MySQL, databases with ACID properties just don't scale linearly if you shard the data to multiple hosts. Someone mentioned Microsoft SQL Server - when it comes to performance, replication, sharding and partitioning, MySQL can do the same (though it might be easier/more stable with Microsoft. Gotta get something for that money). Same goes for Oracle (on a higher level - also, Oracle should go kill itself. Just wanted to mention that.).
    Netflix, for example, has been on Oracle for ages and just recently (well, 1 year ago or sth. like that) started to migrate their stuff to other systems (mostly Cassandra, a mix of Google's BigTable and Amazon's Dynamo).
    Once you get to that scale, there are lot of options to choose from. There's Cassandra, Redis, HBase, Hypertable and Gazillions of others. However those databases are usually harder to maintain, and they're all targeted towards horizontal scaling - throwing more machines at the database (for example you don't wanna use Cassandra with less than 3 nodes) instead of using a small amount of big machines (which actually is cheaper at the beginning, but doesn't scale for a long time). Also you don't get ACID properties (at least not all of them, depending on the database), which means your application suddenly has to handle lots of edge cases (that's the thing most people forget about). Sometimes you won't receive the same data you just wrote if you read it afterwards, etc ("Eventual Consistency").
    Alright, I'm gonna stop writing now because I really have no idea what kind of data you're going to store, so anything else would be speculation. :D If you need anyone for that kind of, well, let's call it "back-end" stuff, and for the databases, just hit me up on Steam or something.
     
  13. lukemurawski

    lukemurawski Senior Member

    Wow, I learned more information from that one post than I did with thirty minutes of Googling. Alright, I'll stick to MySQL for now; I'm quite comfortable with it anyway. Eventually, though, once the request load substantially increases, we're going to have to switch to a faster database engine-- I'll keep that in mind when I work on the server-side mechanics.
     
  14. Kitties

    Kitties Head Administrator

    Reiterating for emphasis
     
  15. lukemurawski

    lukemurawski Senior Member

    The one I liked the best:
    http://pdf.aminer.org/000/512/826/a_distributed_architecture_for_mmorpg.pdf


    A book I found in the library that covers MMO networking:
    http://www.amazon.com/dp/1418052671/?tag=stackoverfl08-20


    P2P Load Distribution Algorithm-- I dislike this one because it can easily be hacked.

    I came up with a hypothetical algorithm of my own: combining elements of the zone distribution algorithm with an idea I had a while back, the server will relay information about clients in close proximity. For example, not only is the load dispersed across multiple servers, but the actual client info transfer between clients occur when the client is in viewable range, further lowering bandwidth.

    Should we allow custom player lobbies as well (one where the stats are not saved?) so players can play with friends?
     
  16. Kitties

    Kitties Head Administrator

    JUST what I needed, I'll be looking at the first article and seeing what I can do
     
  17. cry

    cry MG Donor

    Thanks Sycorax, i learned much from your post. I think wether using MySQL or not is about scaling. Wether Facebook has load problems or not, we are not facebook. Considering a certain amount of growth in our community, i think we are good by using MySQL.

    Oh and Luke, I will give it a go, i haven't yet used the boost library so it might take some time for me to learn. And by the way, the library wasn't yet finished, since the removal function is not functional yet. That makes sense to me as an important part too.
     
  18. marvel

    marvel Head Administrator Staff Member

    Another dutch guy ;) Sure I'll add you to steam :)

    Btw if you want you can join teamspeak as well. I'm usually there most of the evening during weekdays.
     
  19. Collector

    Collector <img src="http://mgftw.com/leadweb.png" />

    btw Luke, you can use a public part on the forums if you want. think you know how to do it. otherwise let me know and i will set it up if you give me the names
     
  20. Roflmahwafflz

    Roflmahwafflz Junior Member

    Sorry been able to get much work done on the starter island in the past few days, I have just literally run out of resources (as in stuff I can use for the island) I have seriously reused the same rocks and palm trees at least a dozen times each model.
    This is the point where I go from requesting a modeler to demanding one :smiley-signs127: