Hey guys! I've decided to write a quick tutorial on the basics of lacewing. I will be explaining how lacewing works and some techniques to avoid annoying bugs I've only learned OINC and Lacewing for three months now, but I almost understand it completely! It that easy! If you want to know how to make an online game, then keep reading

To get Lacewing Beta #5 go here: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=166246#Post166246



Setting Up:
Okay, so first you need to find a server to use. Go to http://www.klikfarm.com/status/ to see a few servers. A good server for lacewing is:

server.klikfarm.com ON PORT 6121

The first online condition in your game should be to connect to a server. Enter server.klikfarm.com with the quotes and press enter. Then enter 6121 without the quotes. Congratulations, you connected to a server.

Next you'll need a name. The name will serve as your identity in the online server. It's good to have a edit box on one frame and then save the entered user name using global strings so you can jump to the next [game] frame. Make sure as another condition, you set Is Connected? then for the actions you add Set Name.

Finally you'll have to connect to a channel. Channels are separate rooms in the server. Imagine the server as a building. To enter you have to state your name. Then when you enter you see many endless rooms. Each room has a specific name and only the people that are connected to that room [channel] will see you. To connect to a channel, first make sure that your name was set correctly by using On name set then add the event Connect to channel > (any channel name)

Messaging:
Okay so now you know how to connect to a server, set your name, and connect to a channel. Make sure you keep those three events in that order! If other players connect to the same channel as you, than you'll be able to communicate with them with messages.

Lacewing uses messages to alert other players in the same channel. Everything is done by sending text or numeric messages to other players either by Server, Channel, or Peer. Note that other people in the server are called peers. If you ever use the peer count action, this will not apply to yourself. So if there are 3 people all together, there are only 2 peers.

Okay, back to messaging. To send a message go to Send>text>(choose between options). As I said before, you'll be able to send to servers, channels, or peers. The expression editor will pop up telling you to choose a sub-channel. Sub-channels are smaller channels so to say... you can send different information to different sub-channels.

To receive the message, add the condition on message recieved and then state the sub-channel. Note, make sure you specify the right kind of message, whether it was a text or numeric message or if it was sent to a channel or to a peer. After that you can add any actions you want.

Blasting is just like sending messages, but they are faster and less reliable. If you want to send a lot of messages such as player positions, then use blasting.

Choosing the right player:
Sometimes it can get confusing to specify which active to select, and since MMF2's selection isn't that great, you'll need a way to distinguish the players. This is where their names come in handy. Once peers connect to your sub-channel (using the on peer connect condition) you can create their player active (preferably a different color that your player) and set their alterable value A to [lacewing] Peer > Name. Since the active was just created, MMF2 selected it and when it just connects, you can set it's alterable value to it's name so you can distinguish it.

For example if you get a [coordinates] received message on sub-channel 1, then you can get the message and set the player's coordinates to what you just received. If you add the condition alterable value A = [lacewing] peer name under the message recieved, then you can specify the peer and it will work.

Tips to know:
You CANNOT use the compare two general values when trying to specify the peer. You HAVE to use the compare to an alterable value or else it will not work!
Remember to have CONNECT > SET NAME > JOIN CHANNEL
You can also connect to multiple channels and switch between them

Examples
(in OINC, but almost the same as Lacewing. You can convert the examples with the OINC to Lacewing converter):

How to make a chat room & how to make basic movement online
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=128853#Post128853