Jump to content

How exactly does MaNGOS allow "multiplayer" usage!


meniacle

Recommended Posts

I have been wondering this for awhile, because I have started up a little project of my own, a little fun thing I am doing out of boredom. I am in the process of creating something, and I was hoping to add a multiplayer feature. The first thing that came to mind was Ajax. I thought I could use it to relay the player's position to a server-other players could then receive and read that data, in the end creating a multiplayer environment. Also a server-side element that can generate floor plan data and send it back to the game, thusly creating multiple levels. I also thought the idea of other player's being able to receive and transmit their own data to each other allowing them to host their own mazes. But the big question is, is there anyone on here to happen to know any Ajax coding? I could use some insight on the whole aspect!

So I was wondering what MaNGOS uses for this!

Link to comment
Share on other sites

AJAX (asynchronious Javascript and XML) is good if you want to write an application that runs in a web browser (like an HTML 5 game) and dynamically loads data from sources on the web (usually a web server with some scripts to generate the XML data)

Mangos is not a browser based application and does not use AJAX. Mangos uses sockets to handle packets from the clients. This is much more efficient because the data from mangos goes directly to the client and data from the client goes directly into mangos, versus storing it in XML files and waiting for the web browser to check for new data some time later (along with tons of HTML and application overhead in serving the data) or sending it in HTML requests.

If you want to learn more about writing networked applications in C++, a simple (at least compared to sockets) network interface is the QtNetwork module (http://doc.trolltech.com/4.2/qtnetwork.html)

Link to comment
Share on other sites

Ahh thank you Patman! But the question that remains is, where exactly do I start? I've never worked with C++ for networking before..

I would start with getting the basic application working in Qt and then adding networking on top of it (since Qt modules are relatively easy to integrate into Qt applications)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use