====== Testing a Game ====== Before launching a game for actual players, it is extremely important to make sure that all tasks are displayed correctly, codes are accepted without failures, and hints arrive on time. ===== 1. Quick Testing by the Author (Single Test) ===== Any author can test the game in one click, straight from the [[en:authors_main:task_editor:editor|editor]]: the **"Test the Game"** button in the top bar opens the game in a new tab. If the draft has unsaved changes, the editor first lists them and offers to save — the test shows what is on the server. ===== 2. The Tester Panel ===== At the bottom of the page a tester gets a panel a player does not have. Every testing tool lives in it: they used to be scattered over the page, now they are collected into tabs. * Collapse and expand it by clicking the red **"Testing the game"** caption on the left, an empty spot on the bar, or the × on the right. The × only collapses too: the panel holds the script-error block, and it cannot take it off the page altogether. * **The height is changed by dragging** — by the bar itself or by the thin handle above it. A double click brings the default height back. * Whether it is collapsed is remembered within the browser tab; the height, across reloads. The number next to a tab's caption is its counter: for "Tasks" it is "opened out of all", for "Templates" how many templates were parsed, for "JS errors" how many distinct failures there are. ==== The "Tasks" Tab ==== {{ :authors_main:lifecycle:tester_tasks_en.png?800 |The "Tasks" tab: the scheme of the order, the state of every level and the action row}} At the top — the tools: * **"Rewind time"** — not "plus ten minutes" but "jump to the nearest timer on the page". There is no need to actually wait for a hint. If the level has no timers, the button does nothing. * **"Game editor"** — a link to the editor of the whole game. * **"Restart the game"** (red) — wipes the team's progress entirely and starts from the first level. Below — **"Task order"**, if the game has more than one order. Picking an order **applies nothing by itself**: it shows that order's scheme in grey numbers, set off by a line on the left, and it is applied by a restart — the **"Restart from level 1"** button or "Restart from here" on a chosen level. === The Scheme of the Order === This is not a flat list of numbers but the structure of the game: sequential levels go to the right through ''›'', storm branches hang downwards off a common bar, a random order is marked with ''?''. A level's state is visible in its number: ^ Look ^ What it means ^ | filled blue | the level you are on | | blue outline | open, but you are not on it | | green | passed | | dashed | still closed | === Go There or Start From There === Below the scheme is the action row. Until a number is picked, it holds the current level. * **"Go there"** — simply open the level, the course of the game stays as it was. It exists **only for an open** level: into a passed or a closed one the engine will not let you, and on the current one there is nowhere to go. * **"Restart from here"** (red) — wipes the progress and marks the path to this level as passed, as if the team had walked here itself. In a storm the neighbouring branches stay closed. > **Clicking a number no longer restarts the game.** The first click only **picks** the level and shows what can be done with it. A second click on the already picked number is "Restart from here": on a phone numbers get hit by accident, and a restart cannot be undone. Both actions are ordinary links, so a level's address can be copied and sent to the author. > Not every tester may change the order: for an invited team the jump between levels works, but picking an order quietly does not apply. ==== The "Templates" Tab ==== It shows what the engine did with the ''{% match %}'' [[en:authors_main:task_editor:advanced:edit_templates|templates]] on this page: which template, which value was checked, which branch fired and what the options were. Nested templates are shifted to the right — they were parsed only because the branch above them fired. {{ :authors_main:lifecycle:tester_templates_en.png?800 |The "Templates" tab: which match checked what, and which branch fired}} * **Hover** a row — what that branch put in gets highlighted on the task. * **Click** the row — the page scrolls to that spot. * **The arrow** to the left of the name unfolds the branch's own text. * **Clicking an option** shows the task **as if that branch had fired**. {{ :authors_main:lifecycle:tester_templates_pick_en.gif |Picking a branch: the task is redrawn as if that one had fired}} While a branch is picked by hand, a yellow banner stands above: the task is shown **not** the way a player will see it. Take it off with the **"put it back"** button or by clicking the same option again. The substitution lives until the browser is closed and is visible only to you. This is how you check a branch you could not reach otherwise: an individual task meant for another team, the ''?'' branch, the "no answer yet" branch. ==== The "Editor" Tab ==== The current task in the editor without leaving the game: the text, the codes, the bonuses, the hints. This used to be a folded block above the task — now it is a tab. > The editor is opened from the **admin host**, and its session is its own. If you have not signed in there, the tab will hold a login form, and you cannot sign in inside it. Then use the **"Open the editor in a new tab"** link, sign in there, and the tab will work. Everything about the game as a whole — the settings, the task order, a task's number — is edited in the game editor: the **"Game editor"** link is on the "Tasks" tab. ==== The "JS errors" Tab ==== It is not there while all is well; **the very first error in a script shows the tab and opens the panel by itself**, even if the panel had been switched off. Errors are caught in the scripts of tasks, hints, bonuses and spanning bonuses, and also the **asynchronous** ones — from ''setTimeout'', ''fetch'' and ''async'' functions: those used to fall silently. Identical ones are folded into a single record with a counter. Deliberately **not** recorded: errors from browser extensions and the nameless "Script error." from other domains — that is not your code, and in the log they are nothing but noise. ==== Tabs That May Not Be There ==== A missing tab means there is nothing to show, not that something broke: * **"Codes"** — every code, bonus and spanning bonus of the level; a click puts one into the answer box. It is seen only by the **author of the game or an admin of the domain**. An invited team of testers does not see the codes and plays blind, like players do. * **"GPS"** — there only if gps is switched on for the task. The status, the map, the marker zones and the coordinate override; details on the [[en:authors_main:task_editor:advanced:gps|GPS codes]] page. * **"Actions"** — there only if the [[en:authors_main:task_editor:advanced:server_actions|server markers]] did something on this load. Markers merely being present do not create the tab. * **"Templates"** — there only if at least one ''{% match %}'' was parsed on the page. ==== Taking the Panel Off the Screen ==== The **"Test controls"** switch is in the game's menu: the hamburger at the top right, the **"Settings"** section, the last switch. It hides the panel, but **not for good**: the very first script error brings it back and opens it on "JS errors". To have no panel at all — for screenshots or video, say — open the game with ''?debug_panel=0''. ''?debug_panel=1'' brings it back. Mind that the tester is then left with no tools whatsoever. ===== 3. Team Testing (Testers) ===== You can invite outside players or whole teams for independent testing: - The team of testers submits an ordinary application to your game on the site. - In the **"Applications"** block on the game page two buttons appear next to that team: **"Accept"** lets the team into the game for real, **"Allow test"** — only for testing. {{ :authors_main:lifecycle:game_requests_en.png?800 |Applications: "Accept" lets a team into the game, "Allow test" — only for testing}} - Once accepted, the team can enter the game at any time (even before the official start). - Testers play in the absolutely real game interface: the codes of the levels are not visible to them. An invited team gets the tester panel too — without the "Codes" tab and without the right to change the order. A restart and rewinding time are available to them, on the "Tasks" tab. ===== 4. Testing as Your Own Team ===== The author of a game can apply as their own team and accept it as testers. This lets you check how the game looks on your teammates' screens. > **Note:** In that case every member of your team gets access to the game before it starts. Make sure the members of your team are not actual participants of the coming game.