I'm making a mesh submarine game, and I don't have a problem with the programming. But how do I create a co-op mesh part of the game?
I may post screenshots of the game when I can.
Offline
Programming a project with Mesh is similar to programming a project for two players - but instead of having two controls on the same computer, you have one control on each computer.
Remember - the only extras with programming in Mesh is:
• Broadcasts are received on all computers
• You can use other computers' variables by using the ([slider] sensor value) block
Try and imagine it like a normal Scratch project that has two controls on the same computer - it's sort of like that. (But you're not supposed to program it like that, of course.)
Last edited by Jonathanpb (2010-03-13 04:49:40)
Offline
You don't 'program' in Mesh - Mesh is just a way to have different Scratch programs interact.
Hmm... maybe you could try experimenting with Mesh? It helps. (You can connect Scratch programs that are on the same computer.)
Last edited by Jonathanpb (2010-03-13 23:13:34)
Offline
so, with mesh can a person play the same game on the same project online? or would they have to have two different projects, so you could play something together, or would you have to have two separate similar projects?
Offline
st3althdg wrote:
so, with mesh can a person play the same game on the same project online? or would they have to have two different projects, so you could play something together, or would you have to have two separate similar projects?
1. I think mesh is only for offline projects.
2. There would only be one project, but you would assign the actions to variables and broadcasts.
Offline
If there are three or more computers connected to a mesh, how do you access the variables for the Scratch instance running on each one? Or can the clients only read the host's variables?
Offline
A quick question, how do I make a Mesh game on one project when I program the scratch project in TWO scratch windows. I get confused.
__________________________________________________________________
Thehero, big fan of
Offline
I'm sorry, but Mesh only works offline. I attempted online and epicly failed.
Offline
1stCorinthians wrote:
I'm sorry, but Mesh only works offline. I attempted online and epicly failed.
Epic Fail. LOL.
Offline
how do you program in mesh [blocks] <mesh> [/blocks]
Offline
fullmoon wrote:
If there are three or more computers connected to a mesh, how do you access the variables for the Scratch instance running on each one? Or can the clients only read the host's variables?
the program will return the value of the last variable that was changed (except its own)
Offline
The most common, is a scratch messaging system. The most creative made up one is probably scrolling/messaging or a game of some kind.
Offline
Here is a guide to Mesh.
• When a health bar or something changes, use a broadcast so it receives on all Scratch programs.
So, for example, you got a 2-player bar.
When 1 player sets it to a different value, a broadcast is then sent to do the same on the other player's Scratch program.
• Variables from another Scratch program are handled with a sensor block which does not have A connected option, but has a few motor options like tilt, etc. One of those handle variables from another Scratch program. When a mesh session is started with you, things get slightly different:
• Broadcasts are sent to all Scratch programs.
• As above, you can access eachother's variables.
That is pretty much what you need for a chat program in Scratch.
Offline
1stCorinthians wrote:
I'm sorry, but Mesh only works offline. I attempted online and epicly failed.
Was the fail so epic that it was almost a win?
Offline
Has this been resolved?
It's been megabumped yesterday, and I honestly even forgot I'd rpelied to this thread...
Offline
Sorry this is a bit off topic, but you can play Mesh over the internet, it's just how your doing it is not working. You need to learn how to port forward. What happens is, a Scratcher 1 [Host] hosts a Mesh on their computer, then gives his IP to Scratcher 2 [Client], then Scratcher 2 types that in and presses connect, doesn't work! Because what happened was he connected to the Router, since the router wasn't listening on ports it told Scratcher 2 that it couldn't connect. So Scratcher 1 port forwards his router to his internal IP. ( 198.256.89.54:42001 [router] --> 10.0.0.54:42001 ) Basically he redirected port 42001 on his router to his computer: Scratcher 2 connects, it works! ( I'll see about making a tutorial about port forwarding )
Offline
You can use hamachini for mesh
Offline
Magnie wrote:
Sorry this is a bit off topic, but you can play Mesh over the internet, it's just how your doing it is not working. You need to learn how to port forward. What happens is, a Scratcher 1 [Host] hosts a Mesh on their computer, then gives his IP to Scratcher 2 [Client], then Scratcher 2 types that in and presses connect, doesn't work! Because what happened was he connected to the Router, since the router wasn't listening on ports it told Scratcher 2 that it couldn't connect. So Scratcher 1 port forwards his router to his internal IP. ( 198.256.89.54:42001 [router] --> 10.0.0.54:42001 ) Basically he redirected port 42001 on his router to his computer: Scratcher 2 connects, it works! ( I'll see about making a tutorial about port forwarding )
Have you made a tutorial? Because whenever I try it fails. Even with a tutorial (I don't think it was a very good one)
Offline
Magnie wrote:
Sorry this is a bit off topic, but you can play Mesh over the internet, it's just how your doing it is not working. You need to learn how to port forward. What happens is, a Scratcher 1 [Host] hosts a Mesh on their computer, then gives his IP to Scratcher 2 [Client], then Scratcher 2 types that in and presses connect, doesn't work! Because what happened was he connected to the Router, since the router wasn't listening on ports it told Scratcher 2 that it couldn't connect. So Scratcher 1 port forwards his router to his internal IP. ( 198.256.89.54:42001 [router] --> 10.0.0.54:42001 ) Basically he redirected port 42001 on his router to his computer: Scratcher 2 connects, it works! ( I'll see about making a tutorial about port forwarding )
I figured you could do it like that. I just didn't know which port
Offline
It's pretty easy. Scratch's mesh feature does most of this for you. Mesh detects if two people are running the same project, connected using the mesh mod, then broadcasts broadcast to ALL computers "mesh'd" together. So if something happens in one computer, make a broadcast for the event in the project, and say that when the project recieves the broadcast, then it should do _______. Making tutorial soon!
Offline