Multiplayer game tutorial?

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, 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: 9801
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
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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: 327
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: 40
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?

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

Re: Multiplayer game tutorial?

Post by FourthWorld » Wed Nov 17, 2021 1:50 am

arise big.jpg
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9250
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Multiplayer game tutorial?

Post by richmond62 » Wed Nov 17, 2021 9:44 am

I'm just not sure that making a game on LiveCode is really a good idea.
I think the answer to that must lie in the area of what type of game you want
to make.

ALSO: from what I have seen of Unity you are constrained by all the clever stuff that is on offer there, while
with LiveCode you'll have to start pretty well at the bottom; but that will allow you to aavoid those constraints.

I have made a prototype of the Warcraft type game in LiveCode.

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Multiplayer game tutorial?

Post by stam » Wed Nov 17, 2021 11:50 pm

"constrained" wouldn't be the word i would use! Calling that a 'constraint' is a bit like saying the data grid is a constraint, and we should prefer to write our own data grids from the ground up ;)

Unity is a tool honed at making games. It has many features that promote that, which LC does not. The real downside is it's a much more complex beast - but then you can do a heck of a lot more with it. LC doesn't even have basic openGL-type functionality.

My old boss used to say 'use the right tool for the job' and he wasn't wrong - LC is good for many things but it is not a game building engine. Yes you can build some games with it and some of these will be quite good.

But a lot of games require functionality that isn't native to LC - you could bend over backwards to make it work if that rocks your boat, or you could just use an engine that does it for you - Unity, Godot, Unreal Engine - lots of alternatives, just depends on what you want to achieve, and how much time you're willing to invest to learn...
Of course, if you can achieve what you want with LC you should definitely use that ;)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9250
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Multiplayer game tutorial?

Post by richmond62 » Thu Nov 18, 2021 10:04 am

That explanation was really good.

Post Reply

Return to “Games”