Page 1 of 1

Multiplayer game tutorial?

Posted: Fri Jan 03, 2014 8:12 pm
by waprothero
Is there a tutorial of template for creating a multiplayer game in live code? I'm considering creating a multiplayer game and am wondering what I'm getting into. The game would need fast response, as players would be competing against each other for the correct response.
Thanks

Re: Multiplayer game tutorial?

Posted: Fri Jan 03, 2014 9:04 pm
by FourthWorld
There's a lot to something like that, but the chat example included in the LiveCode package may be a good starting point, illustrating the basics of handling multiple socket communications in a custom server.

Re: Multiplayer game tutorial?

Posted: Sat Jan 04, 2014 12:17 am
by Simon
Hmmm...
This question may be about a tablet device, 4 players, one each side.
And that is much easier to code. :)

But you are probably correct, it's an online game.

Simon

Re: Multiplayer game tutorial?

Posted: Sat Jan 04, 2014 12:30 am
by Newbie4
To start simple, program it first on desktop computers. That way, you can get the logic and moves worked out. Then to move it to portable computers (tablets, phones, etc you just have to redo the input code.

Here is a link to the planning and some code for doing a 2-player game on one computer. There are also 2 working games so you can see the code in action.
https://sites.google.com/a/pgcps.org/li ... ayer-games

Here is a link to getting started doing a game using separate computers (client - server model) with some simple sample code that will get you started https://sites.google.com/a/pgcps.org/li ... uter-games. I will see if I can dig up a sample game. Some of my students tackled a tic-tac-toe game with a server that managed the graphics and communication between 2 other computers (players). It is crude and not quite finished but I believe the graphics and communications worked. They ran out of time (The school year ended before they finished it)

See if these help you get started with what you had in mind.

Re: Multiplayer game tutorial?

Posted: Sat Jan 04, 2014 3:24 am
by wprothero
This is great info! Thanks. I'll check out these resources.

I was thinking about the game being an app with a server handling the communication. I have a vps with liquidweb and should be able to open sockets at will.

I have the LC server installed as a cgi, for testing. I didn't want it to interfere with normal php, MySQL and other server functions that I rely on, by configuring Apache in the way the livecode tutorials suggest. I doubt if the cgi type configuration is right for multiplayer quick responses.

Re: Multiplayer game tutorial?

Posted: Sat Oct 31, 2020 11:51 pm
by gsillevis
Newbie4 wrote:
Sat Jan 04, 2014 12:30 am
To start simple, program it first on desktop computers. That way, you can get the logic and moves worked out. Then to move it to portable computers (tablets, phones, etc you just have to redo the input code.

Here is a link to the planning and some code for doing a 2-player game on one computer. There are also 2 working games so you can see the code in action.

Here is a link to getting started doing a game using separate computers (client - server model) with some simple sample code that will get you started [I will see if I can dig up a sample game. Some of my students tackled a tic-tac-toe game with a server that managed the graphics and communication between 2 other computers (players). It is crude and not quite finished but I believe the graphics and communications worked. They ran out of time (The school year ended before they finished it)

See if these help you get started with what you had in mind.
Any chance you have the sample game handy?