Projects & Assets
Pyxen uses a simple file-based project model: your projects are files on your device. An account is optional, and nothing needs one.
The .pyxen format
A Pyxen project is a .pyxen file. It’s a ZIP archive containing your code, images, and sounds. You can:
- Rename it, duplicate it, or move it in the Files app
- Store it in iCloud and access it from multiple devices
- Share it by AirDrop, email, or any file-sharing method
- Back it up by copying the file
Because it’s a standard ZIP, you could even unzip it on a computer to inspect the contents.
A project remembers which Pyxen saved it. A project made with a newer Pyxen still opens and runs; the first time you open it, Pyxen says once that what the newer version added may not show or work until you update. Nothing is refused.
Where your projects are
Pyxen keeps the projects you save in its folder: iCloud Drive › Pyxen when iCloud Drive is on for Pyxen, otherwise Pyxen’s own folder on the device (On My Mac › Pyxen on the Mac, On My iPad › Pyxen in the Files app on the iPad). Settings › General › Projects says which, and Show in Finder (on the iPad, Show in Files) opens it.
For the project you have open, click or tap its name in the title bar and choose Show in Finder (Show in Files on the iPad), or choose File › Show in Finder (⌥⌘R). On the home, it’s in a project’s menu. The Files app can’t select a file, so on the iPad it opens the folder the project is in. A project you haven’t saved yet isn’t in any folder: its menu offers Save… instead.
A project you saved or opened somewhere else stays where it is: Pyxen lists it in Continue and never moves it. While you try Pyxen, the projects in its folder are the ones that count.
Adding assets
Your project can contain:
- Images — PNG files used for sprites and tile sheets
- Sounds — WAV files for sound effects
- Music — OGG Vorbis, MIDI, and tracker modules (MOD, XM, IT, S3M) for background music
A project’s README.md, and its translations such as README.fr.md, are one Read Me row at the top of Files, above Scripts. It opens the page in your language. Its menu has the other languages (Open in Another Language) and Edit as Text, which opens the file itself.
Add assets with File › Import Images or Sounds…, or make one with File › New Asset… (the + in Files). Once added, you reference them by name in your code:
Sprite("hero") # references an image named "hero"
Sound("jump") # references a sound named "jump"
Music("overworld") # references a music track named "overworld"
A new tile map
In File › New Asset…, Tilemap asks which tiles the map is painted with. It shows the project’s images, each with how many tiles it makes, then the images of the asset packs the project uses, under each pack’s name, and last Pyxen’s Tiles: ground, walls, floors, a door, a target, hills, clouds, bushes and a crate, 40 tiles of 16 pixels in the project’s palette.
A new map starts with the tiles another map of the project uses, else an image whose name says “tiles”, else Pyxen’s Tiles. Tileset names the choice, and the line under it says what Create does:
- With an image of the project or of a pack, the map uses it as it is. Nothing else is added.
- With Pyxen’s Tiles, Create also adds
tiles.pngto the project (tiles2.pngwhen that name is taken), and the map is ready to paint. The picture is yours to redraw, and Undo takes the map and the tiles back in one step.
Cell Size follows the choice, and you can still change it. The map’s Map Settings › Tileset links it to another image later.
Asset packs
Pyxen includes asset packs — collections of images, sounds, and tiles that you can use in your projects. Asset packs use the .pyxenpack format (also a ZIP archive).
A few packs come with the app. The others are downloaded when you choose them: their card says Download and the pack’s size, and a project that uses a pack this device doesn’t have yet offers the download in its Files list. If the download can’t happen (you’re offline, for instance), Pyxen says so and your project stays as it was. New packs can appear without an update to Pyxen: it checks the list of packs when it starts and when you open Asset Packs, and offline it shows the list it saw last.
Each pack’s page says who made it and how you may use it. Most packs are public domain (CC0): use them freely, in exported games too. A pack marked Credit required asks your game to name its maker. When you export, Pyxen writes the credits of every pack the game uses into licenses.txt and CREDITS.txt; the page’s Copy the Credit gives you the line for anywhere else.
A pack’s files are shared by every project that uses it, so they open read-only, with a bar that says whose they are. To change one, choose Edit a Copy in that bar or in the file’s menu in Files (drawing on it opens the same sheet): the file, or the frame you picked, becomes your project’s own, and the code that names it uses the copy, in one step that Undo takes back. The copy keeps its credit. Project Settings › Credits lists everything in your game that someone else made, says Changed once you change a copy, and keeps your own thanks; Preview CREDITS.txt shows what an export writes.
Sample games
Pyxen comes with finished games, with all their code and assets: real, playable games you can study, change, and learn from. Find them in Pyxen’s home, under Play and read. They open unsaved, so you can change anything; save one to keep your changes.
The home’s Snippets are ten lines each: one idea, running.
Dungeon Survivors is ten minutes in the Moonlit Cellar: foes come in waves from every side, your weapons aim themselves, and each level up offers a choice of three. Its five weapons are in weapons.py, a function each, to read and change. Big Slimes leave chests: one holds a weapon’s evolution when the weapon is at level 8 and you keep its passive. At ten minutes the Slime King comes; puff it and the night is won.
Files and iCloud
Pyxen uses the standard iPadOS and macOS document model. Projects appear in Files on the iPad and in Finder on the Mac, alongside your other documents. If you have iCloud enabled, your projects sync automatically.
An account is optional, and Pyxen collects no telemetry. Your files stay where you put them.