Skip to content

Adopt Weave in an existing game

A game that already runs moves to Weave in steps that each leave it playable. This guide gives the order. It applies to a place with scripts spread across containers, with or without a framework.

Do not move everything at once. A rewrite that touches every script cannot be tested one part at a time.

Run the check and keep the count. Every step below lowers it, and a step that raises it went wrong.

Add the empty folders of the folder map, and the project README. Nothing runs differently yet.

Add Main and Client. Have each start the boot folders, which are empty. The scripts the game already has keep running beside them.

Pick the script that does the most. Turn it into a ModuleScript with a Start function, place it in Services under one name, such as GameService, and delete the original script. Do the same on the client.

The code is unchanged and still does too much. It boots from one entry point, which is what R1 asks.

List every remote. For each one, answer two questions:

  • Does it carry a result the client computed? Change it to carry the request, and compute the result on the server.
  • Does the handler check type, range, ownership, and rate? Add what is missing.

This step protects players more than any other. Do it before any step that only tidies.

Search for every line that writes saved data. Group the lines by field, choose an owner per field, and move each write behind a function on that owner.

Start with the fields that hold currency and items.

Take one feature out of the wrapped module: move its handlers to <Feature>Service, its private code to Modules/<Feature>, and its remotes to Shared/Remotes/<Feature>. Play. Repeat for the next feature.

Split a feature when it is about to change. A part of the wrapped module that nobody touches can stay where it is.

Replace each script on a part or a model with a tag, and bind the behaviour in an entry with Watch.Tagged or CollectionService. See Bind behaviour to tagged instances.

Stop when the check reports nothing and the five questions in the README have the answer yes for each change you make. Code that follows the rules and is still large is not a Weave problem.