AppleyAppley Docs
Docs/Networking

Network Security

Prevent cheating in multiplayer.

20 min read Professional Updated 2026-07-01 v2.0 ~60 min to complete

Introduction

Prevent cheating in multiplayer. This page provides a complete guide to network security in Appley, covering everything from setup to advanced techniques.

Networking is a core area of Appley. Understanding network security will help you build better games and use the platform more effectively. This documentation is designed for professional level users.

Requirements

Before working with network security, ensure you have the following:

  • A Studio plan subscription (required for multiplayer)
  • Understanding of client-server architecture
  • An Appley project with multiplayer scenes
  • Knowledge of sync and RPC concepts

Estimated Completion Time

This guide takes approximately 60 minutes to complete. The estimated reading time is 20 minutes. Difficulty level: Professional.

Step-by-Step Guide

Follow these steps to work with network security in your Appley project:

1

Enable multiplayer

In project settings, enable multiplayer networking for network security.

2

Set up the lobby

Create a lobby system with room codes and player limits.

3

Define networked state

Mark variables as networked to auto-sync across clients.

4

Implement RPCs

Use network.rpc() for remote procedure calls between clients and host.

5

Test multiplayer

Open the game in two browser tabs to test client-host communication.

FluxScript Example

Below is an Appley Scripting (Flux Scripting) code example demonstrating network security:

Network Security — Appley Scripting
// Networking — Network Security
on start {
  if network.isHost {
    network.spawn("enemy", vec3(0, 0, 10))
  }
}

on playerJoined(player) {
  ui.toast(player.name + " joined!")
  network.sync("scoreboard", scoreboard)
}

networked score = 0

on update(dt) {
  if network.isLocalPlayer {
    if input("w") player.move(forward, dt)
    if input("f") {
      network.rpc("fireWeapon", { pos: player.position })
    }
  }
}

on rpc("fireWeapon", data) {
  effects.spawn("muzzle_flash", data.pos)
  audio.play("shoot")
}

Node Script Example

The same logic can be implemented using Node Scripting. Here is the equivalent node graph:

Network Security — Node Graph
[On Start] ──► [Branch: isHost] ──► [Spawn: enemy]

[On Player Joined] ──► [Toast: name + " joined"]
                    ──► [Sync: scoreboard]

[On Update] ──► [Branch: isLocalPlayer]
            ──► [Input "f"] ──► [RPC: "fireWeapon"]

Interchangeable Systems

FluxScript and Node Scripting compile to the same runtime. You can mix both in a single project — use whichever is best for each task.

Common Mistakes

Avoid these frequent mistakes when working with network security:

Trusting client-side data

Validate all client input on the host before applying.

Syncing too many variables

Only sync essential state; use RPCs for events.

Not handling player disconnection

Clean up objects and state when a player leaves.

Using large networked payloads

Keep sync data small — send IDs, not full objects.

Troubleshooting

If you encounter issues with network security, try these solutions:

Players cannot connect
Check that the host is running. Verify room codes. Check firewall settings.
High latency and lag
Use interpolation for remote positions. Implement client-side prediction.
State desync between clients
Ensure only the host modifies authoritative state. Use networked variables.
Players see different game states
Implement host-authoritative logic. Validate state changes on host.

Performance Tips

Optimize your use of network security with these performance tips:

  • Use host-authoritative architecture — the host validates all game-critical actions.
  • Implement client-side prediction for responsive player movement.
  • Use interpolation for remote entities to smooth over network jitter.
  • Send only essential data — use IDs and enums, not full strings.

Explore these related documentation pages:

Example Project

Download a complete example project demonstrating network security: