Topic: Multiplayer?

Hi,
I was just wondering if multiplayer would be possible to make, over LAN would be pretty hard i'm sure but what about splitscreen? Half the screen for one camera, the other half for the other, this would make it possible for 2 cars in my game.
What do you think?

Re: Multiplayer?

Hi,

a lan would need to use an external library in c++, maybe someone know a good lib for lan ?

For splitscreen, it's possible in c++ with a custom MGame : draw function
or in script with render to texture : draw two cameras in two different textures

Re: Multiplayer?

How about asio?

Re: Multiplayer?

hi,
thanks, asio seems a good network api,
there should be no problem by using it in a game plugin in c++.

Re: Multiplayer?

Thanks, I will try looking into render to texture for splitscreen.

Re: Multiplayer?

Almighty Laxz wrote:

Thanks, I will try looking into render to texture for splitscreen.

I don't if this point can be overcome with good coding skills or not, but I thought it prudent to note, that asio has no mobile support that I can see, at least from its home page info.

cheers
gm

Re: Multiplayer?

Yes, for mobile you normally have to use build-in feature only, at least for iOS. For Android I'm not sure, as it is a linux-based system, a desktop lib might work.

Re: Multiplayer?

I've had a look at networking libraries recently for another project. I was very disappointed when I couldn't find an open* equivalent for networking. I ended up using this lib which, although old, was easy to get working, and it supposedly would work for Windows too. I seem to remember that, on iOS at least, you can use raw BSD sockets... so most networking libs should be fairly trivial to port.

Even if you don't use a library, it's possible to write quite a simple wrapper over both BSD Sockets and WinSock quite easily. There's a surprisingly small amount of work that you actually have to do. The majority of the work is in synchronising the world, which would have to be hand rolled anyway.

Re: Multiplayer?

I added kNet into my Maratis for MinGW version, and it was very easy to compile (just like Maratis). It compiled even on my Debian server, and it compiles also for Android and many other platforms.

Re: Multiplayer?

I think there is an available socket library for Lua. LuaSocket

Re: Multiplayer?

The lib Nistur mentioned seems to clearly have the most features, though as noted a tad old. Knet seems to only support win and lin so who knows there ( knet website only shows support for ubuntu and windows though android as noted by lumooja).

I think given the features grapple has, that it would logically be the  way to go ?

cheers
gjhs