Construct 2 game with multiplayer? (state of MP?))

Discussion and feedback on Construct 2

Post » Thu Jul 25, 2013 9:58 am

Hi,
I'd like to make a top-down 2D action game with multiplayer.

How does the state of multiplayer looks like in Construct 2? From what I have seen it's rather bad, but I haven't searched for long.

I found http://www.scirra.com/forum/topic61563.html but sadly it seems to be useless as it even doesn't compensate for latency (which is essential for doing anything I'd like to profit from).

Than there's a matter of AI - I'd need something that can not only synchronize players compensating for the lag, but also synchronize AI.

Have anyone done anything similar? Are there any code samples available?
B
13
S
5
Posts: 7
Reputation: 831

Post » Thu Jul 25, 2013 11:22 am

The current version of Construct 2 doesn't officially support multi-player at all, other than providing the very basic facilities offered by the AJAX and WebSocket plug-ins. These provide some basic functionality for establishing connections and sending/retrieving data, but nothing higher level and obviously nothing server-side. They would be sufficient for most turn-based games, but in the general case won't be suitable for more real-time multi-player games, and you'll have to handle all higher-level logic (such as synchronisation) for yourself. This may be further addressed in future releases, as multi-player functionality is a pretty popular request.

That leaves you with third party plugins anything you can find in the forums. I've seen some good progress from some users, but don't have any links handy or specific advice on it -- other users might have more information for you.


Hope that's helpful.
B
32
S
8
G
2
Posts: 110
Reputation: 3,648

Post » Thu Jul 25, 2013 11:24 am

Multiplayer links I found useful:
One:
http://gamedev.tutsplus.com/tutorials/from-scratch/construct-2-bombing-chap-multiplayer-menus/
Look at the whole series - very nice example.
Two:
http://berryijmker.com/how-to-create-a-pokemon-battle-system-in-construct-2-html5-part-2/
Nice simple Example player turns or AI
Three:
http://www.scirra.com/forum/tirahan-turnbased-strategy-game-for-2-players_topic59733.html?KW=

All are basic, but that is all you going to get in terms of examples as C2 can't handle anything too advanced. Simple turn based games type deal.DUTOIT2013-07-25 11:27:02
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Thu Jul 25, 2013 2:14 pm

I'm working on providing a solution that relies on PubNub, which is why I posted this thread.

I've currently got a fully functional MMO platform with PHP- and MySQL-based user authorization up and running. However, I'm not going to release it until it's been refined and worked over with the input of more talented individuals than myself (and that's not something I'm going to make an exception to).

However, PubNub is fairly easy to wrap one's head around, so give it a go and I'm sure you'll find it more than sufficient.
B
22
S
5
Posts: 107
Reputation: 2,354

Post » Thu Jul 25, 2013 3:33 pm

If it does support WebSockets than at some point in future we should be able to use http://www.w3.org/TR/2008/WD-html5-20080122/#peer-to-peer though right now it's in very, very sketchy draft page (look at the comments "Does anyone know enough about Bluetooth to write this section?" - lol)
In theory server-client WebSockets might work, though my knowledge of them is slightly too limited to implement real-time multiplayer with it, especially when it'd also require quite possibly short response times (all I did was some simple messaging component on a website with websockets).

@bolosaur - isn't PubNub a commercial solution? Considering that I'd most likely want to have my game as a one-time-purchase I don't think it's an option - in a long run such solution most likely would be unsustainable (especially considering a very limited amount of slots - I already can see a scenario when in first 2 days everyone rage because they can't connect, and in after a year I have to pay from my own pockets for a server because people buying game don't cover the maintenance costs).

For any solution to be worthwhile it needs to relay on self-hosted servers (or even better: P2P as much as possible with only one central tracker-type server).
B
13
S
5
Posts: 7
Reputation: 831

Post » Fri Jul 26, 2013 9:33 am

[QUOTE=Skywalker] @bolosaur - isn't PubNub a commercial solution? Considering that I'd most likely want to have my game as a one-time-purchase I don't think it's an option - in a long run such solution most likely would be unsustainable (especially considering a very limited amount of slots - I already can see a scenario when in first 2 days everyone rage because they can't connect, and in after a year I have to pay from my own pockets for a server because people buying game don't cover the maintenance costs).[/QUOTE]
Well sure. I figured that there are already a couple of solutions to choose from in regards to client-to-client networking since it requires less functionality to be implemented, so I'm aiming for something that's a bit harder to attain. At worst I'm pretty sure you could extrapolate a couple of the solutions used in my project, perhaps by replacing PubNub with a different networking layer.

Anyway, didn't mean to go off-topic if you're only interested in client-to-client networking. :-)
B
22
S
5
Posts: 107
Reputation: 2,354

Post » Fri Jul 26, 2013 10:52 am

It's not offtopic at all :)

I'm interested any solutions that might make a good multiplayer platform, including client-server-client, but as said - PubNub maintenance costs might be bit of a pain. I already have a few LAMP servers, so I'd assume (or rather: hope) that I could host server with my own infrastructure which would greatly reduce long-term costs.

I'm quite curious what degree of synchronization can be achieved with NodeJS (http://nodejs.org/) - I guess I'll eventually give it a try with this tutorial: http://buildnewgames.com/real-time-multiplayer/ - looks rather encouraging, especially because it includes corrections for latency issues.
B
13
S
5
Posts: 7
Reputation: 831


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 0 guests