Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. {{indexmenu_n>15}} ====== Game Files ====== Pictures, sounds, and everything else shown to the player live in the game's folder on our storage. They are uploaded on the **"Files"** tab of the editor. This is the one place in the editor that does **not** go through the draft: a file goes to the server at once, and it is deleted at once too. The "Save..." button has nothing to do with it. {{ :authors_main:task_editor:files_tab_en.png?800 |The "Files" tab: pictures and sounds are uploaded here, past the draft}} ===== What Can Be Uploaded ===== ^ Type ^ Extensions ^ No larger than ^ After compression ^ | Picture | jpg, jpeg, jfif, png, gif, webp | 10 MB | 2 MB | | Sound | mp3, m4a, ogg, wav | 5 MB | — | | Video | mp4 | 5 MB | — | | Document | pdf, txt | 1 MB | — | | Code file | js, css, json, html, svg | 256 KB | — | | Data file | zip | 1 MB | — | The same table is in the editor itself — under the question mark next to the block header. The case of the extension does not matter: ''PHOTO.JPG'' uploads the same as ''photo.jpg''. The list of formats is not arbitrary: it is exactly what our server hands to the player. A file outside the list would upload and then fail to open for the player, which is why mov, heic, avif, webm and fonts are not accepted. > **There is no total limit per game.** The limits are per file only. ===== Optimize Images ===== The checkbox is ticked by default. With it on, the engine: * shrinks the picture to **1102 pixels wide** (it never enlarges); * re-compresses it; * **saves a png without transparency as jpeg** — the extension changes with it; * loses the metadata (EXIF). If the result is not at least five percent smaller, the original is kept. **Untick it for a particular file** when you need the full width — a picture meant to be zoomed into, say — or when the EXIF is part of the task: in city games coordinates and shooting time get hidden in a photo. The checkbox is not remembered and comes back ticked on every load: "remembering" it would quietly cancel compression for everything else. > With the checkbox off the **2 MB limit applies to the original** — you will have to shrink the picture yourself. The browser refuses such a file before it is even sent. The engine does not touch animated pictures (gif, apng, animated webp) or pictures over 40 megapixels — those have to fit into 2 MB on their own. ==== A Picture on Its Way ==== The engine hands out the link **not straight away**: the row first says "A picture is on its way, waiting for the link", with a "Cancel" button next to it. That is deliberate — the file name itself can change (a png became a jpeg), and an early link would be a dead one. Two pictures are compressed at a time, the rest wait their turn. If the wait went over two minutes you will be told: "The server is busy compressing pictures, try again in a minute". Nothing is lost — repeat. If the compression failed outright, the file is uploaded anyway, the link works, and underneath it there is a note: **"Uploaded without optimization: the picture could not be compressed"**. That is not an error — the picture is simply the original. But if it is also over 2 MB, it is refused instead. ===== The File Name ===== By default the engine gives the file a short name of its own, remembers yours and shows it in the list. The **"Keep the name"** checkbox keeps your name — and it is then the name in the link. * Your name — up to **128 characters**; the name on disk — up to **64**. * ''/'' ''\'' ''#'' ''?'' are not allowed — slashes would lead the file out of the game's folder, and ''#'' and ''?'' cut the link short in the browser. The name checked is the one that lands on disk: ''photo #1.jpg'' uploads fine without the checkbox and is refused with it. * ''.php'' and ''.htaccess'' anywhere in the name are not accepted at all. * Spaces and non-Latin letters are allowed, but they stay in the link as they are. **Names beginning with ''item_''** are inventory item pictures. Their name is kept always, whatever the checkbox says, and their format is never changed: the engine looks such a picture up **by its name**. Details are on the [[en:authors_main:task_editor:advanced:inventory|Player Inventory]] page. ===== The Link to a File ===== Every row of the list is a link; clicking it copies it to the clipboard. The ''?v=…'' tail is the file's timestamp: it changes when the file is replaced, and the player's browser picks up the new version instead of showing the old one from its cache. Put the link into the task **after** the upload, not before: the name may differ from what you uploaded. ===== Replacing and Deleting ===== **Replacing.** Upload a file under the same name into the same game and it replaces the previous one, while the link stays the same. This is the usual way to fix a picture without touching the tasks. One exception: if the compression changed the extension (a png became a jpeg), the old link stops working, and the tasks that spell it out have to be fixed. > A different picture under a name already taken **silently replaces** the previous one in every task it stood in. **Deleting.** The "Delete" button in the list. The engine does not check whether the file is used by any task: the picture simply disappears everywhere it stood. There is no "where is it used" list and no undo — only uploading the file again under the same name. ===== A Copy of a Game ===== **Copying a game does not copy its files.** The copy has its own, empty folder, while its tasks go on referring to the files of the **original** game. That works as long as the original game is alive. But the copy's file list is empty, replacing a picture in the copy does not affect its tasks, and deleting the original game breaks the copy. If the copy is to live on its own, upload the files into it and fix the links. Exactly the same goes for tasks copied between games. ===== Audio and Video ===== **Sound** — mp3, m4a, ogg, wav up to 5 MB. A player can be inserted with the button in the task editor's toolbar (next to the picture button) or by hand, in "Source" mode: <code HTML> <audio controls><source src="link_to_uploaded_file" /></audio> </code> **Video** — your own is possible, but only **mp4 and only up to 5 MB**. Nothing is transcoded, so the clip has to be squeezed into that limit by you. The markup is written by hand: <code HTML> <video src="link_to_uploaded_file" controls style="max-width:100%"></video> </code> A YouTube clip is still embedded as a frame — as [[en:authors_main:task_editor:basic#video|described in the basic editor]]. ===== Pictures Straight from the Text Editor ===== The picture button in the task editor's toolbar uploads a file to the same place under the same rules: the same types, the same limits, the same optimization, and the same "Cancel" button. There is no need to go to the "Files" tab separately. ===== Who May ===== Files of a game may be uploaded and deleted by its author and by an admin of the domain the game belongs to. Somebody else's file the engine calls not found rather than forbidden. A domain has a file folder of **its own**, separate from the games — it is on the awards page of the domain's admin panel. The lists do not overlap. ===== See Also ===== * [[en:authors_main:task_editor:basic|Basic Editor]] — how to put a picture, audio, and video into the task text. * [[en:authors_main:task_editor:advanced:inventory|Player Inventory]] — item pictures and what the ''item_'' prefix does. * [[en:authors_main:task_editor:editor|Game Editor]] — the other tabs and the draft. en/authors_main/task_editor/files.txt Last modified: 2026/09/18 06:51(external edit)