Field editor and level sharing
Fieldwork is a field editor for an area-cutting game.
In the editor the field is a grid. The Wall tool draws obstacles — drag your finger to lay them down. The Ball tool adds and removes a ball’s starting point; you get as many balls as you place points. The slider sets the target — the share of the field you have to cut off — and the list beside it sets ball speed.
A ceiling is shown under the field at all times: the most that can possibly be cut off with the walls drawn and the balls placed. Every ball needs somewhere to end up penned in, and that area is subtracted from the count. If the target sits above the ceiling, the level will not save — the editor says so before saving rather than after.
Cells walled off from every ball are drawn dim. They are cut off by themselves in the first instant and do not count at all, so the percentage is measured against the area you actually have to fight for.
Any saved level produces a short code. The code describes the field completely — walls, balls, speed and target — so whoever enters it gets exactly the same level. It leaves out letters that are easy to confuse in writing, case and dashes do not matter, and a checksum sits at the end: a code with a typo is rejected rather than loaded as a distorted field.
Drag across a free cell and two walls start growing from there in the direction you chose. Finished walls become part of the field. An area fully fenced in and left without a ball is cut off. If a ball hits a wall still under construction, you lose a life. The round is won when the required share is cut off, and lost when lives or time run out.