Your world's own art


title: "Your world's own art"#

Every world has the game's own tiles, sprites, item pictures, effects, music and sounds. A server can add its own beside them: a tile sheet of its own, sprites for its monsters, its own music. Players' games fetch it when they join, and it never replaces the game's own art. A world uses both.

All of this is on the Asset catalog page of Odyssey Server Admin.

How art is named#

Every piece of art has a key, which is how maps, items, monsters and scripts choose it. The game's own art starts with official:, and your server's starts with server: and the name you give it, such as server:castle-tiles. A sheet's cells add a number: server:castle-tiles#12 is its twelfth tile.

A key never changes once it is used, so a name is worth choosing well. Names are lower-case letters, digits and dashes.

If the world names art that is not there, such as a file you took out, players see a marker in its place, never some other picture. The Asset catalog lists any art the world names that is missing.

Adding art#

  1. Under Files on this server, choose the Kind of file: a tile sheet, a character sprite, an item sheet, an effect, music or a sound.
  2. Press Upload a file and choose it. Pictures are PNG files; music and sounds are Ogg or WAV.
  3. The file is checked the way a player's game will check it. If it passes, it is added as a new row under This server's art, named after the file.
  4. Change its Name if you want a different key, and its Label, which is what the editors show.
  5. Press Save. The next player to connect gets the new art.

Players see a tile sheet, item sheet or effect cut into cells. The Cell size is 32 by 32 for tiles, as the game's own are; change it for a sheet drawn at another size.

Limits#

KindLargest file
Tile, item and effect sheets16 MB
Character and large sprites4 MB
Music24 MB
Sounds4 MB

No picture may be wider or taller than 4096 pixels. Everything a server sends may add up to 256 MB, and What a new player downloads shows how much yours does. A player is asked before downloading more than 32 MB, and each file is downloaded once: returning players fetch only what changed.

Changing and taking out art#

Upload a file of the same name with Replace a file of the same name ticked to change a picture or a sound. Every map and record that uses it shows the new one.

Each row says how many places in the world use it. Art the world still uses cannot be removed; change those places first.

Using it#

Once it is saved, your art is in every editor beside the game's own:

  • The map editor's tile palette lists your tile sheets beside the game's, in the game and in the admin app.
  • The item, monster and NPC editors offer your sprites and item pictures.
  • A map's music, and any sound a script plays, can be yours.

See building your world for the editors.

Animations#

An animation is a tile that changes as it is shown, such as water or a torch: a list of tiles, each with how long it shows. Every animation in the world runs on one clock, so every square showing it is on the same frame, for every player.

The game has animations of its own, and anyone who may save maps can make more, in the map editor or under Animations on the Asset catalog. A saved animation reaches every player at once, without them joining again. Making animations explains how.

Sending the art from somewhere else#

Players' games fetch your art from the server itself. If your server is on a slow connection, you can copy the art somewhere faster, such as a web host, and send players there instead:

  1. Copy the whole assets folder from the server's data folder to the web host, so that its manifest.json and every file beside it can be fetched.
  2. Under Where players fetch the art, type the address of the copy, starting with https://, and save it.
  3. Press Check the copy. It says whether the copy matches the server's art.

Players' games check every file they fetch against the server, and fetch from the server whatever the copy does not have right. A copy that is out of date costs speed, never the wrong art. Copy the folder again whenever the art changes, then check it. Leave the address empty to send the art from the server.

A converted world that had its own art#

A server from the original Odyssey that had its own tiles, sprites, music or sounds is converted without them. Until you bring them back, its maps draw the game's art, or the marker, where its own belongs. Bringing it back takes two steps, both under A world that had its own art.

1. Convert the old pictures#

The old server kept its pictures in files such as tiles.rsc, objects.rsc, Effects.rsc and sprites.rsc.

  1. Under Files on this server, choose Legacy picture as the kind and upload the file.
  2. Under Convert legacy pictures, choose What it is: tiles, item pictures, effects or sprites.
  3. Give it a name, or leave the one taken from the file, and press Convert.

The picture becomes your server's art with its cells in the same order, so every tile, item picture, effect and sprite keeps its old number.

Music and sounds are uploaded as ordinary files. Keep the old number at the end of each name, as the old files have it, so the move can find them: mus27 for the old track 27. Sounds are WAV files already and go up as they are. Music needs converting first.

Converting the old music#

The original game's music is MIDI, and the game now plays Ogg, so each track has to be turned into one. It takes two free programs: FluidSynth, which plays a MIDI file into a WAV file, and FFmpeg, which turns the WAV into an Ogg.

  • On Windows, download them from FluidSynth's releases and FFmpeg's site.
  • On a Mac, brew install fluid-synth ffmpeg.
  • On Linux, install the fluidsynth and ffmpeg packages.

FluidSynth also needs a set of instruments to play the music with. Use gm.dls, Windows' own, which is what players' computers played the original game's music through and what the game's own tracks were made with. It is in C:\Windows\System32\drivers\ on every Windows computer; on a Mac or Linux, copy it from one, or source it yourself.

Then, for each track, in the folder that holds it:

  1. Play it into a WAV file:

    fluidsynth -ni -O float -r 44100 gm.dls mus27.mid -F mus27.wav
    

    -ni plays the file without opening a window or waiting for a keyboard, -r 44100 is CD quality, and -O float keeps the loudest parts from being cut off.

  2. Find how loud its loudest moment is:

    ffmpeg -i mus27.wav -af astats=measure_overall=Peak_level:measure_perchannel=none -f null -
    

    Near the end it prints a line such as Peak level dB: -4.2.

  3. Make the Ogg, turning the volume up or down so that peak lands at -1.5. The change is -1.5 minus the number you read: for -4.2, that is 2.7.

    ffmpeg -i mus27.wav -af volume=2.7dB -c:a libvorbis -q:a 5 mus27.ogg
    

    -q:a 5 is a good quality. Bringing every track to the same peak keeps one map's music from being much louder than another's, and -1.5 rather than 0 leaves room so the Ogg never crackles.

The WAV can be deleted afterwards.

Then upload each .ogg with Music as its kind.

2. Move the world onto it#

Move the world onto its own art lists the art the world uses that is not your server's, with how many places use it and how many of them show the marker now.

  1. For each line, choose under Stood in for by which of your art it should be: a tile sheet for the old tiles, your sprites for the old sprites, and so on. Leave any line you want to keep as it is.
  2. Press Move at the next start.
  3. Restart the server.

The server backs the world up, then moves every map, item, monster and NPC onto your art as it starts. A sheet's cells move to the same cells, and numbered art to the art of the same number. Until the restart, the move is listed on the Database page, where it can be cancelled. Old scripts that set art by number reach the new art straight away.

What backups keep#

A backup is the world's database. Your art and its catalog are files in the assets folder, so a backup does not hold them, and restoring one leaves them as they are. Keep a copy of the assets folder yourself: see what to keep safe.