Search Unity

[Archived] Alk MMORPG Framework

Discussion in 'Assets and Asset Store' started by Alk Studios, Jun 16, 2014.

  1. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    The current database system is built upon the robust Fluent NHibernate framework (http://www.fluentnhibernate.org/) which has support for the following databases:
    • Microsoft SQL Server (including Compact Edition)
    • Oracle
    • Microsoft Access
    • Firebird
    • PostgreSQL
    • DB2 UDB
    • MySQL
    • SQLite
    The connection handling script provided shall focus on MySQL, however these settings are easily to port towards the other supported database platforms.
    These questions are more aimed towards the provided game service template as opposed to the actual networking framework, thus the answers provided are based on the demo product "out of the box".

    Handling a large amount of concurrent users would rely on factors outside the scope of this topic, such as server resources, location and bandwidth etc. The framework has been tested with over 1000 concurrent user bots on a cheap (4gb/100Mbps) test server located across the Atlantic, however this was early in development and may not be indicative of a final game product.

    The demo server system comprises of 3 separate server daemons (GLink, GameDB and World), these daemons are each responsible for specific features of the system and are designed to operate remotely on separate physical servers (although they can also be run on a single host/physical server). Communication for these segregated server daemons is simply achieved via the sending and handling of data packets.
    • GLink - Act as a proxy between the game client and the GameDB/World daemons. All received packets from clients are sent to required daemon.
    • GameDB - Responsible for retrieving and querying the database (MySQL) and creating/sending element objects to WorldServer. This is the only daemon with direct access to the database.
    • World - Responsible for controlling game centric logic, representation of the game world and is also responsible for authoritative functions and validation.
    Out-of-the-box the framework include one of each of these daemons to serve as a example of usage for the framework. These daemons include full source code so can be modified as desired. each daemon has either an asynchronous socket listener or a connector instance to connect to other daemons, after which daemons are registered (via a registration packet) into a dictionary:
    Code (CSharp):
    1. Dictionary<string daemonName, ServerConnection connectionInstance>
    from which communication can be achieved via a simple send request:
    Code (CSharp):
    1. Servers["GameDB"].SendAsync(LoginPacket)
    You can implement as many of each daemon as you desire, however some modifications may be required as the system is designed to demonstrate the implementation of a single instance of each daemon.

    Server collision is an issue, due to dynamic and irregular shaped bounding volumes. We are currently working on a possible solution that is not resource intensive, however it may not be ready for the initial beta release.
     
  2. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    You have been added :)
    The beta shall be out around mid July :) (as long as no horrific bugs are present).
     
  3. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    Beta tester list has been moved to the first post.
     
  4. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Thank you. I look forward to trying this out.
     
  5. Muber Gaming

    Muber Gaming

    Joined:
    Jan 24, 2014
    Posts:
    48
    Awesome explanation regarding on how the server handles large amount of concurrent users,

    I do have another question regarding the same topic as per the features in the main thread it says:
    Distributed server support (multiple servers/daemons).


    a working server instance consist of 3 daemons , right?
    -proxy, db and world. <--- lets call this set a 1 server instance for better interpretation here

    and this 1 server instance can be hosted in a single hardware node the 3 of the daemons or each separated in 3 hardware machines for better performance,

    now, as your stress testing with bots you said they handled around 1000 concurrent bots, is tat correct? offcourse give or take and depending of the hardware nodes capacity factors and limitations etc..

    now if the user base were to grow more than 1000 ccu in this particular server instance setup, are the server instances daemons able to dynamically load balance themselves if we were to deploy another hardware node with another server instance in a different location to hold another 1000 concurrent users in the same game?

    i guess the question is, does the server support automatic load balancing among deployed server instances for one large world?

    or each server instance can not talk to another server instance therefore one single game is capped to the capacity of that server instance hardware nodes?


    hmmm, not sure if i am getting confused or confusing others with the terminology on how to reference the server instances daemon group or hardware nodes etc...

    hope it makes sense :)


    thanks in advanced
     
  6. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    The use of 1000 concurrent users was arbitrary and merely used to test potential resource usage growth and performance at peak times. The 1000 figure was randomly chosen and is not a maximum CCU limit and as such a server cluster could potentially have a lot more CCUs should it satisfy the requirements.

    The example daemons provided are designed to be extremely flexible, as such you could run 20 World daemons should you want, however you would have to slightly modify some code to keep track of which server daemon a player exists in. This would be fairly simple.

    There is no limitation on the amount of daemon instances one may run.

    I understood your questions :), however for simplicity, I usually refer to each daemon as a server.
     
  7. Muber Gaming

    Muber Gaming

    Joined:
    Jan 24, 2014
    Posts:
    48
    thanks for the quick reply,

    sorry but maybe I did not get to the point with my overall big picture question: :)

    so here is a more straight way to put it.

    as you said there is no limitation on the amount of daemons one can run, like you said one can have 20 world servers, but my question was :
    can your technology dynamically load balance the multiple world daemons?

    or one world server = one game only and if one wants to have many world servers the player needs to logout or exit the current world server and get into another world server back again? like world of warcraft realms selection?

    in other words, having a 1 game only that can support several thousands of concurrent users distributed and load balanced across multiple world servers and in different hardware nodes.

    and if the current hardware setup starts to choke because of ccu growth, to fire up another world server and hardware and the servers dynamically load balance themselves?

    or you saying that once player connect to existing game like in a lobby that will list all world servers online so the player can join to that particular realm or server?

    thanks again.
     
  8. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    Ah my apologies, The template supplied is flexible enough for you to do so, but is not currently set up in that manner, as stated you could easily implement such a system by starting a new instance of the world server then simply sending the character data to that instance, i.e. if you want all players on each separate map to be hosted on a different world server, you could store a list of users per map and then add a parameter to the client connection to list the current users world serverID. You could also have it so that if a server load gets to 80%, send 20% of player data to World server X etc.

    The character data is stored as character objects which can be sent to any server instance.

    Hope that helps.
     
    Last edited: Jul 4, 2014
  9. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Hi guy's,

    Any chance you will add a building system later on?

    Doesn't need to be complicated just a basic claim square grid with ability to build a full house on it or any other building type.

    We can code it also but if it was already there it would save us precious time.

    This kind of feature would be last in the priority order or you can do it and sale it as a plugin that we would surely purchase.
     
  10. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    We have investigated this in the form of a guild housing/base system. Once we have the core framework stable and the feature-set fully implemented, we shall begin to release expansion plugins such as a building/housing system.
     
    Teila likes this.
  11. Muber Gaming

    Muber Gaming

    Joined:
    Jan 24, 2014
    Posts:
    48

    no, not really, sorry but did not understand your reply.

    so i guess long story shot your server technology does not support right out of the box one big continuous world with dynamic load balancing between server worlds.


    is that correct?


    so you saying your tech is some sort of lobby system with world servers attached to it so player can choose which server to login to?

    is this what your current setup offers?

    i just want to make sure what we getting exactly.

    thanks again for your patience.
     
  12. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    Sorry I'll try again to answer your query, however I think we may have different interpretations with regards to load balancing.

    You are correct, out of the box we have not implemented load balancing, as it is outside of the scope of the initial template system, but may become available in the future.

    Now from what I understand, you would like the dynamic load balancing of entity data based on location within a large map area based on server load. i.e. If over 500 concurrent users are online, you would like to spawn a new instance of a World daemon and place some of the pressure (in this case players) within this new instance, resulting in 250 users within each "shard" yet both within the same game world.
    Am I correct in that assumption?

    If so you would be required to modify several areas of code, however depending on your desired implementation, it should not be too difficult.

    No, although you could modify it into such a system if desired. I was simply trying to explain that the provided daemons (for demonstrative purposes) are flexible enough for you to do any form of set-up to suit your needs.
     
  13. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Sound good and for the plugins i suggest a poll to ask users what plugins they would like the most in order of priority.

    Really anxious to start testing your framework and i smell some very positive outcome from you guy's.
     
  14. Muber Gaming

    Muber Gaming

    Joined:
    Jan 24, 2014
    Posts:
    48
    something like that but...,
    maybe if i compare of some existing tech that does what i mean, or at least trying to mean :)
    something like what pikko server from "uLink" does, copy paste directly from their feature description:
    or Bigworld:
    so to have a 1 game with a big continuous seamless world, distributed in several world servers where on the client side all is seamless continuous world, but on the server side all the world is distributed among several hardware
    but not instanced gameplay, all in one big cluster.





    I asume by the way you have explained is that your server can do that but instanced. right?

    as if one world server gets filled up then you can deploy other world server and redirect the new users but now there will be two separate world instances where the players from instance 1 can not see players from instance 2, right?

    something in the region of: each world server can have 500 ccu but all instanced apart. right?
     
  15. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    My example was actually based on the load-balancing of BWT :). As mentioned previously, the load-balancing is something that has yet to be implemented and we shall work on creating a plugin to provide that functionality once the core system is stable and tested etc.

    As mentioned in my previous post, you could, with relative ease, create such a system within our framework, you would however have to create some login to keep track of what world instance players are within. My example would allow all players "see" each other regardless of world server instance... Please keep in mind that when I say "Instance" I am discussing an actual instance of a server daemon and not instance as seen in actual game play i.e. dungeons.

    So to answer your question, it is currently not employed but we shall work on it soon, it you need help doing so during the early beta testing, I can provide advice.

    With regards to "continuous" seamless terrain, not even BWT employed this due to the limitations causes by location systems based on 32-bit floating point precision, after ~10km from the map centre...odd artefacts occurred. You could implement this if you wish, however it is often not used in commercial MMORPGs so we have not really considered it as of yet. As with other features, if there is a demand, we may consider developing a plugin at a later time.
     
  16. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    Thanks, once we have released the initial framework version, we shall begin evaluating desired plugin solutions :)
     
  17. Muber Gaming

    Muber Gaming

    Joined:
    Jan 24, 2014
    Posts:
    48
    awesome,
    thanks for the clarification,

    i definitely take your advice to achieve something similar down the road when testing the beta.

    thanks again.
     
  18. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    You might also want to get a group of load testers to help by putting up a private access web player. Getting this data and detecting bugs while you are getting this ready for release will make for a much better product.

    As long and you give realistic information about your product and test it before putting it out here you will do great.
     
  19. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
    Should be like that and we would pay for Beta Assess Permission ^.^
     
  20. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    I see the quest editor is running on a Windows box, out of curiosity is this programmed on top of Mono as well thus providing a cross-platform build or are we tied to a Windows machine?
     
  21. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    That's the idea, we shall release a demo game before the framework so customers can test the provide game template for features and performance from a end-user perspective.
    Originally written as a WPF application, the editors are currently being ported to GTK.
     
  22. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    How easy is it to add new modules? I need a gang system and house system (both of which will be pretty similar to your guild system). How easy will it be for me to modify/duplicate the guild system to fit my needs?

    My chat system requirements are unusual too, so I'd need to rewrite that to suit - will that be fairly easy to do?
     
  23. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    The complexity of those tasks is based upon your coding proficiency and exactly what it is you plan to implement. You have access to the code and can change it to suit your needs or even write you own modules, however I cannot really discuss the ease without more specific information regarding your desired implementation.
    The chat system is fairly simple and simply comprises of several conditions for handling incoming messages based on type and recipients.
    Long story short, it would be fairly simple for you to edit those system based on basic programming knowledge and complexity of your intended system.

    Hope that helps :)
     
  24. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Brilliant, thank you :) I'm going to stop work on my own server now, and wait for this one. I think it's going to be exactly what I need.
     
  25. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Thinking again...

    Can we have multiple World Servers ie one per zone? I'm thinking that a single world server would be overstretched to manage an entire world.
    If this is the case, how then do we handle chat messages that cross world (zone) servers; like private chat, guild chat, etc?

    There is also the issue of passing a character from one zone to another, and dealing with zone instancing:-
    Private Instanced Zones - for personal storylines, and single-player dungeons
    Semi-Instanced Zones - for groups of people like player housing and dungeons (where not all players enter at the same time)
    Normal Zones - take upto a max ccu before starting a clone "overspill" instance of the zone
     
  26. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    Upon initial release, no form of load balancing or instancing shall be included "out of the box" however, features such as instancing a dungeon are not difficult, you simply need to keep a list of players/groups along with an instance ID for each desired instance.
    The provided template is designed to be as generic as possible whilst providing a basis for further development. We have plans for developing several additional plugins, including load balancing and map instances, however these shall be released after the initial beta product, the main reason for this is to reduce potential bugs during early release and to also allow us to hopefully release the framework as soon as we are able.
     
  27. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Cracking! I'm well up for it now :)
     
  28. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    You guys really have to get a web site and forums of your own.
     
  29. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    How are you dealing with game-items? I've found that I need a database or library of items which contains all the basic info on the item (name, description, rarity, price, category, etc), with the items that users have in their inventories being along these lines pseudo-code:-

    Code (csharp):
    1.  
    2. class item {
    3.     int library_id;
    4.     int quantity_in_stack;
    5.     string made_by;
    6.     int[3] dye_colours;
    7. }
    8.  
     
  30. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    We are currently working on getting the website up, hopefully it shall be finished by either tonight or tomorrow.
    Items, equipment and NPCs etc are stored within binary files on both the client and server systems. the binary files contains the template data for items, upon entry into the game world, items are stored into a characters inventory data and persistently stored in relevant fields within the database.
     
  31. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    perfect :)
     
  32. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Very excited about this.:D
     
  33. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    Currently working on integrating UMA for character creation, however UMA seems to build avatars based on large (4kb+) configuration strings, we are currently looking to optimise this to lower the requirement as sending 4kb of data to and from a server for each character is not ideal.
     
  34. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    That's fantastic news. You guys are moving faster than I thought.
     
  35. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    The website and forum are now live and can be found Here.
    It is still a work in progress so bear with us.

    I am off to bed now, so good night all.
     
  36. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Looking forward to seeing how the server-side collision detection might work. It could be handy for working out what bullets or other projectiles hit first. That would be massively useful.
     
  37. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    UMA seems to be a bit of a mess to start with as there is not any real documentation, however we have started to get to grips with it and have begun developing the character creation system.

    Here is an early development image:

    Separate GUI elements shall be created to allow the editing of the body, face and colour aspects of characters.
     
    Hazor likes this.
  38. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    Uma character creation is nearing completion :)

     
    Gunhi likes this.
  39. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
    does it have function that can reduce tris/poly for the whole model?
     
  40. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    For compatibility with future releases of UMA, this system makes use of the base UMA installation and as such uses the default models provided with UMA. My understanding is that UMA does not offer any functionality to low poly/tri counts, so to achieve a lower tri count, you would need to create/obtain your own base models with a lower tri count.
     
  41. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    UMA comes with medium poly body parts, a set of high poly body parts are available on the assetstore. Currently, there is no low poly set, although the original idea was to have high, medium, and low poly sets - so it's quite likely there will be a low poly set in the future. Timing though would be down to Fernando's work load.

    Changing sets is simply a case of which Slot-Items you include in the recipe. You can have many different poly sets in a single game, and use them as LOD if required.

    If anyone wants adding to the Skype group for UMA, send me a PM with your skype name :)
     
  42. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    After spending the past 2 days working on an update for our SafeSave solution, we have now returned to AMF development and have completed the UMA character creation system :)



    We are currently optimising the serialization of character data for sending over the network, so far we have gone from ~4,000 to ~120 bytes.
    Whilst included in the AMF package, we may also release the character creation system separately for those wishing to use the system in non-MMO projects.
     
  43. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    This is great! And an excellent idea to release the system separately. It seems there are so many options now for multiplayer and this would be handy. :)
     
  44. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Yes good idea. Just getting UMA to work is great.
     
  45. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    Our apologies for not posting for the last few days, we are currently working hard on the game elements of the framework together.
    For those interested in the UMA component, we have released a version which can be seen Here.
    We hope to have the Alk MMO framework (including the template MMO) up in the next 7-14 days as we had previously ran into some issues.
    The framework itself, as in just the networking library, shall be available before then for those wishing to solely test the networking library.
     
  46. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Great project. Please add me to the list. Does this work on Web Player?
     
  47. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    see you also have the framework in your store. Are all those features working? Whats the status on it all?
     
  48. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    It is currently on the store simply as a place holder until it is ready.
    The core framework & networking is finished and currently being tested. We are currently working on the actual template MMO and as such are working on game play elements.

    Ill update the progression list soon, once we have completed and tested further features :)
     
  49. Alk Studios

    Alk Studios

    Joined:
    May 28, 2014
    Posts:
    115
    It may do, however due to the limited future life of the webplayer platform, we are not actively developing with consideration for it.
    We shall however actively developer for the WebGL platform when that becomes available during the unity 5.x life-cycle.
     
  50. taichiu727magnus

    taichiu727magnus

    Joined:
    Sep 16, 2013
    Posts:
    144
    Hello, so I am currently developing an anime mmorpg and is currently using atavism server. I have been looking for better alternative and came across this from one of your beta testers. I wonder if I can be part of the beta testers?