LynnaLab/Networking
Overview
LynnaLab supports cooperative editing over the network. It uses a client/server model, where the server "hosts" their copy of oracles-disasm for others to edit.
There is no theoretical limit on the number of clients that can connect to a server. If multiple people make edits that conflict with each other, some clients' changes may be discarded, and a non-fatal error message will be shown. The server's changes always take priority over clients if there's a conflict.
A note about security: Allowing unknown people to connect to your computer is always a risk. While security precautions were made when designing the network protocol, bugs are always possible, and even in the best case, the client has write access to most files in the oracles-disasm folder (specifically the ".s", ".png", ".bin", and ".properties" files, but nothing else). Therefore it's not recommended to allow completely unknown people to connect if you're hosting a server. You can use git diff to check what changes were made.
Limitations
- Currently, only the host can build and run the game. (Hopefully this will be resolved later.)
- Changes made on a client may sometimes be rejected due conflicting changes made by others combined with network latency.
- All other LynnaLab features should be supported, but obviously, any changes that need to be made externally (editing data files manually) need to be done on the host.
Setup instructions
Follow these steps to begin a LynnaLab server on your computer and allow a client to connect. These steps were written for LynnaLab 2.2.0.
1. Host: Open oracles-disasm
The server user opens oracles-disasm as normal. See LynnaLab#Setup for setup instructions.
2. Host: Start the server
Once oracles-disasm is opened, open the networking window and click on "start server".
You shouldn't need to change the default options.
Depending on your operating system, you may need to configure your firewall to allow LynnaLab to open port 2310. Windows will probably open a popup window where you can simply click "Allow".
3. Host: Set up port forwarding
This part can be a bit tricky - the exact steps will depend on your modem. The goal is to forward TCP port 2310 (the port the server is listening on) to your computer running LynnaLab.
This article provides some extra guidance. You need to determine your modem's IP address, login with the admin password, then locate the "port forwarding" settings.
On Windows, start by opening a command prompt and typing "ipconfig" to get the internal IP address for your modem and your computer:
1: Computer's internal IP address; 2: Modem's internal IP address.
In this example, you would enter "192.168.129.2" (the modem's IP address) in your web browser's URL bar to access the modem's configuration page. Locate the "port forwarding" option. (The screenshot below is from a Bell Home Hub 3000.)
Set the "internal port" and "external port" to 2310, and set the "Protocol" to "TCP".
It will also ask you for either your computer's name or its IP address. Since the IP address can change, it's best to use the computer's name if that option is available. Otherwise, you can enter your computer's internal IP address (192.168.129.128 in this example).
4. Host: Determine your public IP address
Visit icanhazip.com to get your public IP address. Give this to the client (hopefully someone you trust well enough). Beware! This is usually different from the internal IP address from step 3.
5. Client: Connect to the server
Boot up LynnaLab without opening anything. Go to "Project -> Connect to server...".
In the popup box that appears, leave the port as "2310", and use the IP address that the host gave you from step 4. (Replace the made-up number below.) Then click "connect".
6. Host: Accept the connection
The host should then see the connection attempt from the client. They must manually accept the connection before the client can do anything.
7. Start editing!
The host will send the project to the client, after which both will be editing the same project. You'll know it's working if you can see their cursor in the room editor. You can also check the connection status through "Windows -> Networking".
Troubleshooting
If you're having issues, check the following:
- Your firewall is not blocking port 2310.
- You are both using the same version of LynnaLab.