Multiplayer game tutorial?

Creating Games? Developing something for fun?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Multiplayer game tutorial?

Post by waprothero » Fri Jan 03, 2014 8:12 pm

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
Bill Prothero

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8169
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Multiplayer game tutorial?

Post by FourthWorld » Fri Jan 03, 2014 9:04 pm

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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Multiplayer game tutorial?

Post by Simon » Sat Jan 04, 2014 12:17 am

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Newbie4
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sun Apr 15, 2012 1:17 am
Location: USA
Contact:

Re: Multiplayer game tutorial?

Post by Newbie4 » 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.
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.
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/

wprothero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 54
Joined: Tue Sep 20, 2011 4:57 pm
Contact:

Re: Multiplayer game tutorial?

Post by wprothero » Sat Jan 04, 2014 3:24 am

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.

gsillevis
Posts: 27
Joined: Tue Oct 13, 2020 10:55 pm

Re: Multiplayer game tutorial?

Post by gsillevis » Sat Oct 31, 2020 11:51 pm

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?

Post Reply

Return to “Games”