(23 Aug 2013, 0:43)SteZZz Wrote: I figured that this is a new project, and I just have to say I love it!
I guess I wanna make a multiplayer game, and I have seen in the API that there are some server client functions build into this framework.
But for the rest no tutorials or documentation besides the api.
So is it possible to build a multiplayer game with MurlEngine?
Many thnxs in advanced and keep up the good work ;-)
Thanks for your reply!
Yes it is possible to create a multiplayer game and you are right, there is currently no tutorial for network support available (that's one of the reasons why the engine is still in public beta).
We have some regression tests using the client/server classes, see the attached source files. Unfortunately the test code is undocumented, but if you are familiar with C++ programming and networking you should get the idea.
To add the classes to a tutorial logic code you can simply implement the following (hello_world v3):
In your hello_world_logic.h file:
class HelloWorldLogic : public Logic::BaseProcessor
virtual Bool OnInit(const Logic::IState* state);
In your hello_world_logic.cpp file:
Bool App::HelloWorldLogic::OnInit(const Logic::IState* state)
IAppConfiguration* config = state->GetAppConfiguration();
Don't forget to add the app_socket_client_logic.cpp and app_socket_server_logic.cpp to the project / makefile.
This example starts the server on a desktop computer and the client on mobile devices.
The test shows only some console outputs, but you can see how it works.
The test server uses broadcasts to announce to the clients, this works only within local networks (depending on your router configuration), so if you want to connect via wide area networks you have to specify the server name/ip on the client side.
I hope this will help you for now.