EasyRPG Player 0.8.1 “Stun”

Almost two years have passed since the last release of EasyRPG Player. We wanted to release the new version for Christmas, but unfortunately we didn’t make it in time. But better late than never.

We’re glad to report that this time around, we got a lot of contributions from third-party developers. They are credited below next to the change they submitted. No credit usually means it was contributed by carsten1ns or Ghabry. We would also like to thank Carbonara aka Mimigris for doing the community support, opening issues and triaging bug reports. This saves us a lot of precious developer time.

Some noteworthy games that are now (almost) playable are Beloved Rapture (commercial game) and Ipomoea. Playable doesn’t mean there aren’t still a few bugs to be ironed out. While the demo of Beloved Rapture works, the full game still has a missing event command and issues with the combat system. We are working on it.

We’re excited to announce that the EasyRPG exclusive game Collective Unconscious was released. You can only play it online as it was game created for the Yume Nikki Online project which uses a modified version of the web player that adds multiplayer functionality by synchronizing the location of other Players. If you are not familiar with the Yume Nikki fandom: These are walking simulators in which you explore bizarre dream worlds.

They even found a bug a week ago: The frame counter is stored in the save file and it will overflow after about 1 year and 2 months of playtime. When the overflow happens some calculations become negative and the Player crashes. Some online users are very dedicated and caused this overflow. An urgent bugfix allows them to continue playing. (#3385)

To make the blog post a bit shorter we already announced the WiiU Homebrew and Flatpak support earlier.

We hope you enjoy reading the detailed release notes. The blog post is very long, but we are not the only ones who write extremely long release notes, Dolphin Emulator does the same. When you want to try the new release you can get it in the download section.

More assets for the OpenRTP project

The Runtime Package (RTP) is a collection of shared assets for RPG Maker games. They can only be used for games created with RPG Maker. We cannot distribute them. Therefore we are working on our own replacement assets. They are layout compatible with the existing RTP (this means they show the same concepts at the same location, making them a drop-in replacement).

All the assets of our OpenRTP replacement are under an open source license (CC-BY or CC0, depends on the asset). This means you can use them for any purpose you want but you must mention the original author.

Here the new facesets and characters (Authors and license is mentioned in the video).

Here a showcase of the new battle animations created by Victor Sena (link goes to X). These animations are not yet included in the OpenRTP but this will happen this April. As for the other assets the license is CC-BY.

As explained in the 0.8 blog post Jetrotal used generative AI during the concept phase years ago to create mock-ups for the faces of the characters. This AI art was not used for the final product and we are strictly against AI art assets inside of the OpenRTP project.

For the battle background graphics Sidewinder91 uses a different approach: Instead of a drawing tool the 3D graphic application Blender is used. (final result at the bottom right corner is licensed under CC0)

Regressions fixed

In version 0.8, we broke the Wait for Key Input command for RPG Maker 2003 games that used an older engine than the English release. We incorrectly identified this as a 2003 English release feature instead of a 2003 feature. This likely affected a significant number of games. We received a report for Answered Prayers: the character instantly got up when sitting down. (#3019)

Unfortunately, the Wii build of version 0.8 was completely broken. The problem was that we migrated to a new build system and the byte-order was incorrectly set. The Wii uses a PowerPC CPU that’s big endian (BE), which is different from most other systems that are little endian (LE). The RPG Maker data is also LE, so when reading on a BE system, you have to swap the order of the bytes. Otherwise, the data you read is garbage. (#3060, #3185)

Map & Interpreter

Loading a save now cancels active battle animations. Otherwise, they access old data and crash the engine. (#3255)

Every RPG Maker game has a map tree. This is where all the metadata about each map and how they are related to each other is stored. This is used for features like Inherit Music from parent map. There are a few ways the map tree can get corrupted:

  • The map isn’t in the map tree at all
  • The parent map doesn’t exist
  • The map references itself (loop)

These cases are now handled by our code. This fixes crashes in Runic Cipher and in Japanese RPG Maker 2000 sample games such as Abyss. (#2756, #3013)

The Add Equipment event command didn’t check whether the item can be equipped by the actor. (#2902)

The game Ipomoea uses a resolution of 320×176, which is smaller than the default resolution of 320×240. This resolution doesn’t work with most built-in scenes, but we made some changes to the code of the message box and our settings scene to make them compatible with such a small resolution. (#3032) The video illustrates how it looked before (top) and after (bottom).

Versions before RPG Maker 2003 English release have a bug that prevents a changed tilemap from being loaded from a saved game. The Player is now bug compatible. (#3042)

Invoking Shake Screen with a duration of 0.0 seconds (this is equal to stopping a shake) restores now the camera correctly. (#3081)

The event command Control Variables returns now how many slots are empty when requesting how often item 0 is equipped. Setting the item to 0 isn’t possible through the normal editor and requires direct editing of the event command. We think this works in the official engine because empty slots have the value 0 and this value is counted. (#3085)

RPG Maker 2000/2003 has an annoying behaviour: When you set a variable to a new value it checks all the events on the map to see if they should run (or stop) now because their starting condition is met (or not). This can really impact performance, especially in event code that’s heavy on calculations. In newer versions of RPG Maker, they fixed this issue and only refresh the events when the current interpreter yields (so when doing 100 calculations you only pay for one refresh instead of 100 refreshes) but this behaviour is incompatible and breaks games. We implemented an optimization to get rid of most refreshes: We determine which events depend on which variables as a run condition and only refresh these events. This mostly helps our homebrew platforms because they are usually CPU bound. (#3194, contributed by florianessl aka Käsekumpel)

Spritesheets work now in RPG Maker 2000 games when the RPG2k3Commands=1 feature is enabled (RPG Maker 2003 commands in 2000, set this in the [Patch]-section of EasyRPG.ini). (#3197, contributed by florianessl aka Käsekumpel)

There was a glitch in the Tomb of Velleities in Yume2kki (ゆめ2っき) that made it render some events incorrectly. It was caused by a key collision in our graphics cache (fetching the wrong assets). We’ve updated the caching algorithm to get rid of these collisions. (#3256)

The 2D platforming section of the 3D Underworld in Yume2kki (ゆめ2っき) was unplayable because the screen was shaking too much. This map uses jump commands combined with a Vehicle teleport (this is referencing the hero through a modified Set Vehicle Position event command, which isn’t meant to be used this way). We couldn’t fix it properly and added a workaround instead, which resets the jumping flag when a Vehicle teleport targeting the hero is used. The game abuses this Vehicle teleport bug a lot – just read our older blog posts. (#3254)

In Alter A.I.L.A. Genesis, trying to access the Tournament Grounds from the Sphere crashed the Player. What happened is that the game opened a message box from a background interpreter (RPG_RT calls it a parallel process) and then triggered a teleport. When you teleport from a background interpreter, it’s not executed instantly. Instead, it’s delayed until the interpreter yields (suspends, e.g. because it waits for user input). In the case of A.I.L.A. this was another message box with choices. This message was shown after the teleport and referenced stale event data from the previous map. In RPG_RT, messages opened after a teleport are automatically closed, so this bug in the game wasn’t noticeable. (#3301)

The interpreter code was refactored to make it more maintainable. Duplicated functionality was merged and put in a dedicated class. This has no noticeable effect on the user, but it’ll allow performance improvements and new features later on. One planned new feature is local variables (newer RPG Maker calls them self switches/variables). This was a long-requested feature because always operating on global variables is error-prone. (#3233, contributed by florianessl aka Käsekumpel)

When we first implemented our interpreter code, we were a bit lazy: the interpreter does not check whether the list of arguments provided for a command is large enough. The editor will only generate argument lists that are of valid size. We had a few cases over the years where we assumed wrong sizes, mostly when RPG Maker 2003 extended certain commands, but it usually worked fine. The problems started with the Maniac Patch Editor: Some of the commands it issues have too short command lists. RPG_RT does not care, because it interprets an out of bounds access as 0. But we read garbage data. To mitigate this once and for all, we have added sanity checks to all commands, and if the parameter list is too short, it is resized. This is a single runtime check per executed command, so the performance impact should be negligible if the command is the correct size. (#3314, #3343)

Battle system

The rendering order (Z order) of enemy sprites wasn’t correctly calculated. (Reported for game 7th Stand User, #3026)

The difference is hard to see. Look at the horse in the middle.

Closing a message box in the RPG Maker 2000 battle system using the decision key won’t incorrectly trigger actions like Fight or Auto Battle in the window that appears afterwards. (#2964)

Keys are now reset when switching between menu items. This prevents that key presses carry over and have unexpected effects. (#2996)

You can now move the cursor to select allies or enemies using the left and right keys. This is always enabled as it cannot break games. (#3052, contributed by Primekick aka TheDarkAxer)

When a state is added which prevents the usage of skills the usage of items that invoke skills was also prohibited. This is incorrect. Restrictions don’t apply to items. This fixes the battle against Alessi in The 7th Stand User where a state was applied in every turn of the battle. (#3057)

Due to a typo the initial escape change for RPG Maker 2000 was 64 – 100, not 0 – 100. (#3122)

The enemy AI figures out which battle action to use by first picking the one with the highest priority and then choosing a random action that has up to 10 points less. In our code, we set invalid actions to 0, so when the highest priority is 10 or less, invalid actions can be randomly chosen. We fixed this by deleting all invalid actions instead of lowering the priority. (#3146)

When scheduling actions we forgot to skip hidden enemies (but the action itself wasn’t executed). This meant that an enemy could appear mid-turn and attack right after, but only when the enemy speed was lower than the action that made the enemy appear. (#3158)

We added sanity checks to all battle interpreter events that access party members to prevent crashes when accessing the party out-of-bounds. (#3160)

The flash effect of pictures is now reset when a new picture is loaded in the same slot with inactive flash. Before this fix the old flash effect was stuck and corrupted the rendering. (#3376, contributed by lumiscosity)

Maniac Patch

Support for Maniac Patch continues. We’re a bit short on time and motivation, but the community wants it, so we’re happy to say that we’ve had lots of external contributions that have added new Maniac Patch features.

We almost support everything of the legacy version v210414 now. Only missing are: A and B autotiles for Rewrite Map, event command Change Picture ID, most of the command Set Game Option, background events running during battle and, for Battle Processing, the option that disables the flash effect before the battle starts. A and B are the internal names for the water tiles.

A new, valuable tool for implementing event commands is the Cold Spaghetti Analyser (CSA) by jetrotal. This website contains a dump of all event commands and how the TPC commands map to the event parameters. TPC is a templating language for Maniac Patch to generate event commands. The name CSA is a homage to the Hot Soup Processor (HSP), a programming language from Japan.

Let’s start with the biggest one. We support now Maniac String Variables! This was a huge external contribution by JorgeMaker and enewey aka Narcodis. We didn’t plan to implement string variables because it would’ve taken months to figure out the event command and implement everything. So big thanks again for this implementation. (#3051, #3140, #3141).

Thanks to the String Variables (and some other improvements) the demo of Beloved Rapture became playable as you can see in this before (top)/after (bottom) video.

Initially we wanted to write here that it’s not possible for us to be fully compatible because we use a different string encoding. The encoding determines how bytes are mapped to characters. We use UTF-8, which is a variant of Unicode and a modern encoding that can encode all characters used around the world. RPG_RT, including Maniac Patch, uses the legacy encoding for old Windows applications. E.g. in Western European countries this uses Windows-1252, which can encode 255 characters. It’s clear that 255 isn’t enough to encode Japanese, so in Japan they use Shift-JIS. A completely different encoding. We use heuristics to detect the encoding and then convert everything to UTF-8. This is fine because the game won’t notice it. But now with direct access to strings, it will, and we can’t rewrite our entire application and remove all the advantages of Unicode.

Assuming the game contains the string Ä. When asking for the bytes in Windows-1252 this character requires one byte. However, with UTF-8, it requires two bytes. We would already report an incorrect value here. The Japanese character requires two bytes in Shift-JIS and three bytes in UTF-8. While testing with , we made an interesting observation: RPG_RT reports a string length of 1. This means RPG_RT actually knows that Japanese uses multibyte characters and reports only one character here. Thanks to this implementation detail, we can actually (almost) perfectly emulate it just with UTF-8. Unicode has a concept of codepoints, which are single encoded characters. By counting the codepoints, we get the same result as RPG_RT, even though the encoding is completely different. This even works for features like insert or substring which require an index. There might be edge cases where our close enough approach doesn’t work, but we’re really happy we don’t have to rewrite half of our application. (#3298, #3305)

We relaxed two behaviours of the Control String Variable command: When opening a text file, Maniac Patch always adds .txt and .csv when looking for the file. This is inconvenient, so we also check if a file with the specified name exists and open it. Something similar happens when writing: It always appends .txt to the end. You can now add * to the end of the filename, and it will be taken as-is. When the filename contains a path, intermediate directories will be created automatically. (#3212)

Here a video demo where chat messages are used to store the game. The chat messages are read from a text file into string variables and then processed.

In addition to the string variables, we also fixed bugs in existing commands:

  • Spritesheets with a horizontal or vertical flip effect now render correctly. (#2980)
  • The origin setting works correctly when spritesheets are used. (#3053)
  • When automatically calculating the size of string pictures, colour codes (\C[]) were included in the length of the string. They’re now filtered out before the size is calculated. (#2987)
  • When using a custom resolution, the camera is now correctly centred when the number of visible tiles is odd. (#3006)
  • When loading a game via event command Load the background music from the save game wasn’t played. (#3029)
  • Due to a typo mouse scroll down was reported as mouse scroll up. (#3072)
  • Event command Get Save Info applies now transparent colour to face graphics and initializes the picture with the correct default values. (this affected Beloved Rapture, #3272)
  • Event command Show String Picture respects now the transparency setting for the system graphic. (#2961)
  • When the map width or height for a custom resolution isn’t divisible by 16 (size of a tile) the map scrolled incorrectly (this affected Beloved Rapture, #3128)
  • Maniac patch reuses the upper bits of the Wait setting from the Move Picture command for additional flags. We interpreted any value that is not 0 as Wait which broke games using newer versions of Maniac Patch. The other flags are now masked away (until we implement them) but at least the games are fixed. (#3372)
  • Expressions (formulas) in variables (like (1 + V[2]) * 3) support assigning to variables in-place (e.g. with V1 += 2). Though when using the variable event command, the output variable is a dedicated option. Assuming the given expression and output variable V2. This would result in variable V1 being incremented by 2 and then giving V2 the same value. We are not fans of this feature, and it even causes side effects when used as a condition in a Conditional Branch. Beloved Rapture relied on this, so we had to implement it. But we still think it’s a bad idea and disable all the in-place assignments when EasyRPG Engine mode (EasyRPG=1 in the [Patch]-section of EasyRPG.ini) is enabled.

And we implemented new features:

  • Event command Control Variables now support variable arguments when the operand is set to Random. (#2994)
  • Conditional Branch now supports the Loaded this frame condition. (#3006)
  • For event command Move Picture the delay can now be specified through a variable. (#3078)
  • Conditional Branch supports now specifying of the condition as an expression (formula). (#3140)
  • Conditional Branch supports now indirection (access via variable) for Item ID, Actor ID and Event ID (this affected Beloved Rapture, #3293
  • The option to specify the picture limit in the new event command Set Game Option was stubbed to get rid of misleading warnings. We support an arbitrary amount of pictures, unlike RPG_RT, which uses a constant array that is resized by this command. So, this setting wasn’t relevant for us. (this affected Beloved Rapture, #3140)
  • Event command Call Command is now supported. (#3140)
  • Pictures can now have different width and height values for scaling. (#3180, contributed by ToolMan2k)
  • Pan Screen supports now scrolling by individual pixels (#3245, #3249, both contributed by ToolMan2k)
  • Call System Functions (an improved version of the original Open Save Menu that can call more scenes) is now implemented. (#3250, contributed by Jetrotal)
  • Control Variables supports now the option Get Current Event ID (#3032)
  • An almost complete implementation of Rewrite Map was added. The diagonals between A and B autotiles (water and deep water) are not calculated correctly but otherwise it works. (#3306, #3323, contributed by Primekick aka TheDarkAxer and enhanced by Jetrotal)
  • GetGameInfo, which can be used to query certain game information, is almost fully implemented. Missing is the functionality to read framebuffer pixels and querying of the interpreter state. (#3309, #3330, contributed by ToolMan2k and Jetrotal)
  • Erase Event, Set Move Route and Flash Event can now reference the arguments through variables (#3312, #3313, #3329, contributed by Jetrotal)
  • Erase Event can now restore the erased event.  (#3313, contributed by Jetrotal)
  • Providing the argument list inline for CallCommand is now supported (#3319, contributed by Jetrotal)

Developer MakoInfused contributed several new battle commands:

  • Change Battle Command Ex to configure the visibility of certain party commands and whether the useless Row command is visible (#3290)
  • Control ATB Gauge to control the current progress of the ATB (active time battle) gauge in RPG Maker 2003 battle systems (#3291)
  • Get Battle Info to query battle related features like buffs. (#3294)
  • Control Battle to hook (call events) when certain stuff like taking damage happens. (#3295)

As an EasyRPG extension you can now set the option Maniac=2 in the [Patch]-section of EasyRPG.ini to enable Maniac Patch without affecting the range assignable to variables. Some games use features like adding to a number and then checking if it’s exactly 9,999,999 (the largest number possible) but with the increased range of Maniac Patch variables these checks no longer work. This should help to avoid problems if you want to use Maniac Patch features in your game without having to re-check all the events for regressions. (#3209)

EasyRPG Extensions & New Commands

We started implementing our own commands. The easiest way to use them is a quickly hacked together plugin for the Maniac Patch Editor. Using them will become much better when our editor is ready wink wink. Most of these new commands were contributed by Jetrotal.

Enabling these commands requires EasyRPG=1 in the [Patch] section of EasyRPG.ini.

  • A new path-finding command (2003) was added by ell1e that lets you calculate a path across the map even when there are obstacles on the way. (#3144, #3120, contributed by ell1e)
  • With Trigger Event At you can simulate talking to a specific event (2002). This is sometimes a better version of Call Event because it checks the event run conditions. (#3183, contributed by MackValentine)
  • Clone/Destroy Map Event (2056/2057) can copy and destroy events. With this you can define a template event and then duplicate it as many times as you need. This is already used by Collective Unconscious. (#3218)
  • RPG Maker only provides Wait for Movement which should be renamed to Randomly soft lock the game. If there’s an event with a move route on the map that’s stuck, the whole game will hang. We added a better version Wait for Single Movement (2051) which does the same but only for a single event. It even has a timeout to prevent soft locks. (#3221)
  • Set Interpreter Flag (2053) can toggle various patch behaviours. E.g. you can enable features of Maniac Patch and afterwards turn them off again. This is intended to be used for collaborative games. (#3123)
  • Process JSON Code (2055) can interpret string variables as JSON and then do operations through JSON pointers on them. (#3215, #3341)

Here two videos: The first demonstrates Clone Map Event and the second the Path Finding command.

We made some improvements to our widescreen hack. Now, when the map is smaller than the resolution, it’s centred and anything out of bounds is overdrawn with black. This stops background graphics like panoramas from showing up in unexpected places. (#3030)

top: How it looked in 0.8
middle: Map centred but out-of-bounds is not cropped
bottom: How it looks in 0.8.1

Normally, battlers turn around to face the unit they’re currently attacking, which isn’t ideal for certain games. We’ve added a game option to disable the automatic facing direction. (#3052, contributed by Primekick aka TheDarkAxer)

One feature inspired by RPG Maker VX are large charsets: When the filename is prefixed with a dollar sign ($) the size of the charset is specified by the picture dimensions. On looping maps they were unusable because they were culled (hidden) too early as shown in the video (left: before, right: after).

This was noticed while developing Collective Unconscious because they use this feature often and looping maps are typical in Yume Nikki-like games. Note that this is now an extension and requires EasyRPG Engine mode (EasyRPG=1 in the [Patch]-section of EasyRPG.ini). (#3149) The next video shows some species using this feature in the Surreal Zoo.

Loading of images with a colour depth larger than 8 bit is now disabled, except when a translation is loaded, EasyRPG Engine mode is enabled or Maniac Patch is enabled. We added this feature because it happened multiple times now that Yume2kki (ゆめ2っき) shipped broken updates because some contributors only tested on EasyRPG. (#3209)

It’s not uncommon for games to modify the RPG_RT.exe. Some assets are particularly straightforward to replace since they’re embedded as PE resources. We’ve been supporting loading a custom ExFont (an icon font before emojis were cool) from the EXE for many years now. We’ve now added the option to load custom splash screens. The number of splash screens shown by RPG_RT varies depending on the version – you’ll see either one or three on startup. Some games use their own splash screens for instructions. By default, we’re now showing all custom splash screens at startup. We’re skipping the official (unaltered) splash screens and known splash screens from inofficial (bootleg) translations to reduce startup time. If you want to see them, you can read our previous blog post or configure it in the settings. You can also provide custom splash screens without editing the EXE. Just drop images inside the Logo directory. The filenames must be LogoN, where N goes from 1 to 99. (#623, #3096, #3152, #3344)

The video shows a small logo roulette that shows what is possible now.

Other Patches

RPG Maker 2000 and 2003 are full of patches. We support them by reimplementing the functionality (kinda like high level emulation in emulators works).

Since version 0.5, we’ve been able to support Ineluki’s MP3 patch, which added mp3 playback support to older versions of RPG Maker 2000/2003. It works by having text files with the extension .link.wav, but instead of being an mp3 file, it’s plain text that has the path to the mp3 file on the first line. For our new release we’ve improved the compatibility:

  • Link files are now supported for sound effects. This was reported for Sternenkindsaga. We don’t know of any other game using this feature which is probably why we missed it when we first implemented the patch. (#2598)
  • Les aventures d’un avatar 6 uses .link.wav files, but they are normal audio files. It seems the game originally used Ineluki’s MP3 patch and then removed it. There is no easy way for us to determine which patches a game uses. To solve this, a threshold was added: when the filename ends in .link.wav, it’s only considered a link file if the file size is less than 500 bytes. We analysed thousands of games to find a safe threshold. (#2609)
  • The patch is now conditionally enabled: The file harmony.dll must exist. The file itself isn’t loaded, as this isn’t possible on other platforms than Windows.
  • The functions SetMouseAsReturn and SetMouseWheelAsKeys which are only used by the games Vortex and Rutipa’s Quest 9 are now implemented. (#3362, contributed by florianessl aka Käsekumpel)

With the Direct Menu Patch you can set, by default, variable 3326 to the number of the target scene and variable 3327 to the subpage (usually the party member) and opening the menu will then be redirected. There is currently no autodetection for games using this, but you can manually configure it by adding DirectMenu=3326 to the [Patch] section of EasyRPG.ini. (#3192, contributed by florianessl aka Käsekumpel)

We’ve reimplemented the functionality of the DynRPG plugin DynText Plugin. The parser was already added in version 0.7. Note that we will never support the direct loading of DynRPG plugins. They’re Windows DLLs, which makes them not portable, and they require the memory layout of the original RPG_RT engine. Any support requires reimplementing the plugin. (#2369) The video shows a working DynRPG Text Plugin demo. The assets were replaced with OpenRTP assets to showcase them for you again :).

A stub for Destiny Patch, another popular but complex patch for RPG_RT, was implemented. As it’s a stub it has currently no useful functionality, but this will improve over time. (#3131, contributed by drxgb)

Audio

The Player no longer crashing when you close it while a MIDI file is playing through the Fluidsynth backend. Fluidsynth is a library that lets you play MIDI through SoundFonts (files that contain samples of musical instruments). The issue was that some audio components, including the MIDI background thread, were global variables and not instance variables of the Audio interface. This meant that the MIDI thread kept running after the Audio interface was deleted, accessing freed memory (use-after-free). This also fixes that the playback of MIDI music continued in RetroArch after closing a game and then crashing when starting a new game. (#3015, #3035, #3079)

When a game uses a custom soundfont it’s now unloaded when the game ends. Before the first custom soundfont was used for all games started afterwards. (#2916)

Desktop operating systems like Windows, Linux and macOS have a software MIDI mapper that emulate a MIDI device. We support the MIDI mapper because it makes MIDI files on Windows sound exactly like in RPG_RT with zero additional configuration (on other system it requires more work because the soundfont Windows uses is copyrighted). The problem of the MIDI mapper is that it’s a shared instance. When a song ends, the software sending the MIDI events (this is us) is responsible for resetting the MIDI mapper to a sane default. Otherwise, the next song sounds incorrect (e.g., because the previous song altered the instrument mapping). We already did this in the same fashion as Harmony, the audio library used by RPG_RT, but we missed a single MIDI event: the pitch bend of the MIDI channels wasn’t reset. After fixing this the MIDI tracks in Toilet in Wonderland play correctly. (#2910)

You can listen to the issue here: It contains excerpts of four tracks: Two from Toilet in Wonderland as they are supposed to sound and twice Opening1 from the RTP. The second version of Opening1 is the broken one. The other tracks were silent in the old version of the player.

The MIDI tempo wasn’t reset when a new song started. As a result, it was played too fast (MIDI events sent too fast) until the first tempo command. We only found this out by chance, as most songs send a tempo event manually at the beginning. (#3090)

The software MIDI implementation in macOS isn’t quite as fault-tolerant as it’s in Windows. While playing Unterwegs in Duesterburg on macOS we noticed that our application crashes while sending MIDI events. It turns out that some MIDI files contain invalid MIDI events with numbers outside the specification. Windows ignores them, but on macOS this crashes. We even managed to reproduce this in VLC on macOS. To fix the crashes, MIDI events are now sanitized before sending them to the MIDI device. (#3148)

Sometimes, when the Player paused due to focus lost (clicking outside the game window), music played through the MIDI mapper didn’t continue. There was a race condition where the MIDI volume events were sometimes sent in the wrong order. (#3186)

Here’s finally one that affects Fluidsynth and not the operating system’s MIDI mapper. For performance reasons, we’re reusing a single Fluidsynth instance. We’ve noticed that in some cases Fluidsynth has cached a few milliseconds of old samples. This is usually intentional, as it allows cross-fading between two songs, but in one case it caused problems: When a music ended and the next music isn’t played immediately after. Then the old music was played for a very brief moment which is obviously incorrect. We couldn’t find an API to clear the internal sample buffer. Instead, we manually exhaust the buffer by reading from it and then ignoring the read samples. (#3135)

If there wasn’t any background music (BGM) playing, the sound effects had a kind of echo. We made a mistake when we were calculating the array size, which meant that only a quarter of the audio buffer was zeroed. The mistake had been there for years, but it almost never occurred because almost every game plays background music, and that always fills the entire buffer and hides the bug. (#2919)

When playing WAV files via the dr_wav library the values returned by Get Midi Ticks were incorrect. The name of the function is a bit misleading: When a MIDI is played it returns the current MIDI tick and in all other cases the playback location in seconds. In the case of dr_wav, we didn’t reset the amount of decoded samples, so the second counter always increments and never resets to 0. (#3059)

The heuristic to determine whether a file is a MP3 audio file was improved to reduce the false positive rate. Before even corrupted files were read as MP3 and this either crashed or played noise. (#3364)

Settings

The settings scene received a plethora of new features:

We support various MIDI backends: Fluidsynth (already mentioned earlier), WildMidi (an alternative to Fluidsynth), Native (via the Midi mapper provided by the operating system, if available) and FmMidi (emulates a Yamaha YM2608 FM synthesizer – we bundle this one). Normally, the Player will try to use the MIDI backends in the mentioned order and FmMidi as a backup when nothing else works. For example, Fluidsynth won’t work when no soundfont was provided. On Windows, it was impossible to listen to FmMidi because the Native Midi device usually works. Now, with the new config settings you can disable certain MIDI backends. (#3117, #3168)

For Fluidsynth we implemented browsing for soundfonts. No need to configure environment variables anymore. Just select the soundfont from the settings and the Player will use your soundfont by default. The soundfonts must be in the soundfont directory of the config folder. On our desktop systems, we added an option that opens that folder in your file browser. For emscripten (web player) you can upload a soundfont to use it. This isn’t a real upload, it just makes the file available in the browser’s sandbox.

You can even change the sound font mid-game. The next time a new MIDI file is played, the new soundfont is used. We originally planned to allow changing the sound font while a MIDI is playing, but this resets the channel and instrument configuration. Our idea to fix this is to remember all control commands sent by the MIDI file and then replay all of them when a new sound font is loaded. This might come in a later version of the Player.

Load your favourite soundfont through the new audio settings.

A similar option was added for fonts: Games can have two different fonts, depending on what is configured for the system graphic, and you can choose now which two fonts you want and which font size to use. Using custom fonts can break games when the font metrics are different. Some games bundle fonts, in this case this setting will be ignored.

The new font selection options

Help windows, these are the windows that show a single line of text with a description, scroll now the text when it does not fit on the screen. (#3168)

The settings scene crashed when command line argument --no-audio was used. A similar issue broke the build when compiled with -DPLAYER_AUDIO_BACKEND=OFF. (#3116)

Whether the Player pauses the game when the window looses the focus can now be configured in the settings. (#2925)

The background music (BGM) volume in the settings now also changes the volume of MIDI devices. With MIDI, unlike in other formats, samples are not written to a playback buffer, but MIDI events (e.g. note on) are sent to the MIDI device. If the global BGM volume is changed, the player now sends volume events to the MIDI device. (#3083)

The help texts in the advanced input settings are now correct UwU. (#3104, contributed by MikuChan03🎶)

The fast-forward multiplier is now configurable. The default stays at x3 and x10 speedup. You can now make them supew dupew fast (up to x100). (#3105, contributed by MikuChan03🎶)

When the working directory contains a config.ini the Player will load the settings from this file instead of using the global settings directory. (#3248)

A setting was added to set the scaling factor for screenshots. 320×240 is a bit small these days. (#3125)

Fonts

We removed the Thai and Hebrew glyphs from the bundled ttyp0 bitmap font. Our bitmap font code is pretty simple and can only handle basic scripts. We consider a script basic when you can just lay out all the glyphs next to each other in left-to-right (LTR) order without any further logic. These two require FreeType (a font parsing library) and Harfbuzz (text shaping library). Thai is already supported when you use a custom font.

Thai rendering is completely broken with ttyp0 due to lack of shaping (top rows). With Harfbuzz it renders correctly (bottom rows).

Hebrew is not supported, because it’s a right-to-left (RTL) language. We don’t support RTL currently, but support is under development. (#2999)

Here a small sneak-peak for the right-to-left rendering feature showing Hebrew and Arabic (under development, not part of 0.8.1):

Yume Nikki in Arabic. As said: This is just a demonstration. Not implemented in 0.8.1.

For large text the background gradient of the system colour is now correctly blitted. (#3168)

Due to an incorrect size calculation the damage popup in RPG Maker 2003 battles wasn’t shown when a custom font was used. (#3031)

The rendering of external fonts was improved: (#2953, #3179)

  • When the font has embedded Bitmap glyphs at the correct size they are preferred
  • The spacing between the glyphs is now correct (before they were too close to each other)
  • The algorithm to determine the baseline (an imaginary line for positioning glyphs on the y-axis) was improved
  • The algorithm for calculating the font size (mapping points [pt] to pixels [px]) was improved and has now font metrics that are very close to the metrics Wine (reimplementation of the Windows API for Linux) uses. We noticed that the metrics in RPG_RT different depending on whether Maniac Patch runs on Windows or through Wine. This concludes that not even Wine is able to perfectly render fonts like Windows does. When you use EasyRPG Player the metrics are pretty much the same as Wine, even when you’re running it on Windows. We’ve no clue what Windows is doing differently here, and it was easier to analyse the algorithm that Wine uses.
Now the embedded bitmap glyphs are used and the text is readable.

In general the documentation of FreeType and Harfbuzz is lacking, and the coding involved a lot of trial and error to get the font rendering work correctly.

Engine detection

In version 0.8 we made some improvements to the engine detection by parsing RPG_RT.exe. The information collected is from the resource section: The number of startup splash screens and the version information. Unfortunately, we didn’t notice that very old versions of RPG Maker 2003 (1.2 and older) were missing the version information. We assumed that a missing version information must be RPG Maker 2000. This caused a regression by incorrectly detecting the engine used by Yume Nikki (ゆめにっき) version 0.04 (the oldest public version) and Ahriman’s Prophecy. To correctly detect this version of the engine, we added a new metric to our heuristic: the size of the CODE segment. By obtaining this size we can make a really accurate detection as shown in this article on Makerpendium. Since we already have to search the resource segment to extract the ExFont (an icon font before emojis were cool), adding this was quite easy. (#2990, #3095)

This fixed the detection problem for the original and slightly modified versions of RPG_RT.exe. But what about Maniac Patch? To detect the presence of this patch we relied on the existence of accord.dll. Unfortunately, newer versions don’t need this file, and games have started to omit it. While fixing the previous problem, we looked for a way to detect the different versions of Maniac Patch. What they have in common is that the version is 1.1.2.1. Very early versions of Maniac Patch are assembler patches for RPG Maker 2003. The first available version we found adds a GEEP segment to the EXE and later versions have no GEEP segment but a larger than normal CHERRY segment. This is our current detection heuristic for older versions of Maniac Patch. (#2992, #3000)

Recent versions of Maniac Patch are based on reverse-compiled source code of RPG_RT and lack most of the typical segments (e.g. no splash screen resource), making the detection easy to do. The only hurdle was that they use a 64-bit executable now and we had to add parsing support for the 64-bit EXE format. Fortunately the differences between 32-bit and 64-bit EXE are only minor. (#3317)

A common bug report we receive is “Why does game XYZ not work/show?”. The most common reason is that the game was not made in RPG Maker 2000 or 2003. Many users do not know the difference between the different versions of RPG Maker. We now detect common RPG Maker engines and show a warning if the game is not supported. In addition, as a side effect of this feature, the player now highlights game directories that contain supported games. This feature is enabled for Windows, Linux, macOS and Android. For homebrew ports, detection will only occur when the specific game folder is opened. File IO performance is poor on most homebrew ports, and scanning all games would significantly delay the startup. (#3198, contributed by Primekick aka TheDarkAxer)

Various unsupported engines reported by our new detection feature.

Improved archive support

The zipped version of Steamed Hams is now loadable. The archive contained multiple entries of the same files. We assume that files were appended to the archive and in this case old references are not removed. We now discard all file entries except the last one. (#3094)

As already mentioned in the WiiU blog post, games inside LZH archives are now supported. LZH is a popular format for RPG Maker 2000/2003 games because the editor can create game bundles using this format. That means you’ll find lots of games distributed in this format. (#3033) While implementing this, we noticed that loading LZH archives took minutes on our homebrew platforms. The problem was the ZIP detection: We first check if it is a ZIP archive and then check for LZH. ZIP archives can be located at the end of the file. This is how self-extracting archives work: They are executable files with a ZIP appended the end. To detect ZIP archives, we read the last 64k bytes backwards. Reading backwards is unbuffered and slow. Instead, we now read the last 64k bytes in one read and scan backwards in memory. This is much faster and reduces loading times to a few seconds.

The encoding detection for ZIP archives was improved. Now, only the filenames are sent to the encoding detection process, rather than the full path. The full path was usually ASCII, confusing the detection algorithm (was biased and usually detected Windows-1252). (#3281)

If a directory has a file that ends in .easyrpg and that file is a game (doesn’t matter if it’s a directory or an archive), the Player will automatically run it. This was requested to make it easier to distribute games when bundling the Player (standalone mode). (#3133)

Language / Internationalization

The language selector was moved to a dedicated scene (before it was part of the title scene) and can be invoked from a game by using event command Open Save menu with a scene ID of 207. Maniac Patch already added calling of various scenes through this event so this was a suitable location. (#2945,  contributed by florianessl aka Käsekumpel)

When a game is configured to skip the normal title screen common events were not translated. When the translation changes these events are now reloaded ensuring that the translated texts are shown. (#3048)

When parsing of .po translation files fails the error message contains now the name of the problematic file. (#3059)

In version 0.8 we added a deprecation warning that the Languages directory must be renamed to Language. We’ve since removed the warning and support for the Languages directory. (#3023)

Setting the encoding manually to Traditional Chinese (950) in the RPG_RT.ini didn’t use the Traditional Chinese keyboard in the name input scene. (#3084)

A new key GameTitle was added to Meta.ini to allow translating of the game title shown in the title bar. (#3097, contributed by florianessl aka Käsekumpel)

The Player will not abort on startup anymore when --language is used when no Language directory exists. (#3213, contributed by florianessl aka Käsekumpel)

If the game has no savegames and no language directory, the player will now ask for the game language before starting. This is mainly for games that skip the title screen, such as Braingirl, where it was not possible to change the language without using the command line. If you do not like this behaviour, you can disable it in the settings. A language selector has also been added to the settings, allowing you to change the language during the game, although this is a little unreliable and will be improved later. (#3348, contributed by florianessl aka Käsekumpel).

Android

More fun with the Storage Access Framework (SAF) (#2985)

We’ve received a lot of negative reviews on the Play Store complaining about the poor performance of the new version of the app is and that we shall revert to the old version. We expected this to happen, and we have known for years how unconstructive many reviews on the Play Store reviews can be. So we don’t take it personally, and we’ve been able to improve the ratings by offering a video tutorial explaining the initial setup. Readers of our blog know that it’s Google’s fault for enforcing their unusable, slow SAF API but of course the users on Google Play blame the developers because they don’t know any better.

Anyway, we found ways to make the SAF experience slightly less bad by completely getting rid of this useless DocumentFile wrapper class provided by Android, which we already ranted about in the 0.8 blog post. The problem is that DocumentFile caches a lot of file metadata that we don’t need. By using the underlying API (which is DocumentsContract.buildChildDocumentsUriUsingTree) we can reduce the query to just the metadata we need.

Though even this DocumentsContract query takes at least 100 ms to complete (still 10 times faster than DocumentFile). So, we tried to reduce the number of calls to SAF. One of the speedup tricks we found: SAF has an interesting behaviour when a non-existent file is opened for reading: Instead of failing it returns a valid file descriptor but the descriptor points to the root of the tree (the EasyRPG directory). Checking to see if the file exists first is slow, so instead we try to read from the descriptor, and if the read fails (because you cannot read from a directory this way), we assume the file is missing.

This trick makes the situation better, but the performance is still bad. Thanks, Google :(.

Working around Samsung touch issues

Every time Android is discussed it’s required to talk about Samsung: They have the largest share of the Android market, but their system has so many modifications that some Android features simply do not work as expected.

In the 0.8 blog post, we discussed a strange multitouch issue that only affected some Samsung devices. We were able to gain access to a Samsung device and finally investigate the bug. It took a couple of hours to reproduce, and we believe the cause of the bug is a power saving feature that makes it only noticeable when the battery is low enough. For performance/battery saving reasons, Samsung dynamically reduces the resolution of the rendering context (via Game Booster). In order to make this invisible to the application, all metrics, such as touch coordinates, are faked. However, this feature has one oversight: If the app contains multiple views, in our case a view is a single touch button, then the reported coordinates are wrong when more than one finger touches the screen (multi-touch).

Here is a video demonstrating the issue: The thin lines are the real finger touches reported by an Android debug feature. The locations of our touch buttons are what the app receives. As you can see, the coordinates are wrong when two fingers touch the screen.

The wrong offset is always the same, so we can fix this. We cannot hardcode this workaround for all Samsung devices because it does not happen on all of them. Instead, we have found a way to detect it: When the multitouch bug occurs, the touch begin event reports a coordinate that is outside the object being touched (which is impossible). If this happens once, we add a displacement to all touches. It seems to work. We implemented this bugfix a year ago and have not had a single bug report since. (#2830, #2915, #3016)

Further Android improvements

The frontend now uses the native FileFinder implementation of the Player instead of custom Java code. This increases compatibility when scanning ZIP archives, and we were able to easily add support for LZH archives. As a further improvement, subdirectories and archives can now contain multiple games. For performance reasons we currently limit this to a maximum of 3 games before stopping the search.

In addition, the correct title graphic for the game is now displayed. If there is only one file in the title folder, it is selected, otherwise the game database (RPG_RT.ldb) is parsed to get the filename.

We now display the real game title (obtained from the RPG_RT.ini file) instead of the directory name. If you don’t like this, you can revert to the old behaviour, and you can even give each game a custom name in the preferences. For the game title we must guess the encoding. We noticed that the encoding detection is unreliable for the title because it is too short but we found a sketchy workaround: Concatenating the title string multiple times to itself gives better detection results ¯\_(ツ)_/¯. All these features make the first startup a bit slower, but only the first one, because all the data obtained during the scan is cached. In case you dislike this feature you can switch back to the old (use directory name) behaviour. (#3316)

The settings were extended: You can check now whether RTP 2000 and 2003 were detected. (#1845) and the font configuration is integrated. To help you choose the right settings, the app displays a preview that’s rendered using Player’s native text renderer, so it’s pixel-perfect to what you’ll see in-game.

The font settings in the Android interface.

The fast-forward button was removed from the default layout. You can still add it manually using the Input Layout Editor.

While a game is running, the options Toggle FPS and Reset game are now shown in the drawer. (#3230)

All assets in the game browser were replaced with vector graphics. This improves the quality of these icons on high resolution devices. (#3258)

An option was added to display the A and B buttons as Z and X instead.  A and B are the buttons used by gamepads and Z and X are used by keyboards. (#3311)

Orientation changes of the device are not always sent depending on the Android version due to various bugs in the operating system. This broke the positioning of the SDL window when we updated the layout. We use now a hack provided by SDL (they read the orientation through a sensor) to properly support this across all devices. (#3356)

Other weird Android issues we cannot fix

According to the crash logs, some devices crash with a timeout when creating our folders. We think that the Storage Access Framework (SAF) implementation is broken on these devices just hangs 🙄. The stack trace:

This Binder call may be taking too long, causing the main thread to wait, and triggering the ANR. Learn more

  at android.os.BinderProxy.transact (BinderProxy.java:584)
  at android.content.ContentProviderProxy.call (ContentProviderNative.java:730)
  at android.content.ContentResolver.call (ContentResolver.java:2450)
  at android.provider.DocumentsContract.createDocument (DocumentsContract.java:1380)
  at androidx.documentfile.provider.TreeDocumentFile.createFile (TreeDocumentFile.java:53)
  at androidx.documentfile.provider.TreeDocumentFile.createFile (TreeDocumentFile.java:45)
  at org.easyrpg.player.Helper.createEasyRPGFolders (Helper.java:118)

On Samsung devices (it’s Samsung, after all) it’s possible to disable the built-in Files app. When this app is disabled, the SAF file selector is broken because it requires the Files app. Yes, you really can accidentally disable an essential system feature. 🤦

The same thing happens with Android TV: Here Google simply forgot to include a SAF-compliant file browser, making our app unusable on all devices running Android TV. 💩

Two weeks ago we were informed that the metrics of the app are broken on the Xiaomi Redmi Note 13PRO. When you look at the screenshot you can see that settings (Pantalla) are not drawing inside the window (below the green “Configuration”) but start at the very top of the screen. Last week we were able to reproduce this in an emulator. Turns out this is a new feature since Android 15 (SDK35): Edge-to-Edge. With SDK35, the app itself is responsible for calculating the margins. According to Google, this makes the app more immersive, but we only get a headache from this feature. We have reverted to SDK34 until we find time to fix this mess. Our Android code is so old that Google’s suggested solutions do not work for us. (#3373)

The edge-to-edge mode of Android 15 (SDK35) messes up all the margins and causes rendering issues.

Emscripten (Web Player)

When embedding the EasyRPG Player canvas into a website, e.g. via <iframe>, grabbing the focus (and keyboard) now works correctly without any hacks. When embedded by other means, the keyboard focus of the whole website won’t be stolen anymore. (#3195)

Accessing your saved games is tricky in our web player. All guides use the JavaScript console. As a new feature, you can now press Shift in the save/load scene to upload and download saved games. (#1025) In addition, to make it easier to add your saved games, you can now press Shift on the title screen to open the load scene even if you have no save game. (#3195)

Press Shift to access the dowload and upload savegame functionality in our Web Player.

If an asset download fails, the Player will now retry the download multiple times. (#3004)

The Maniac Patch commands Load and Get Save Info now work in the Web Player. The Load function opened a deleted map which didn’t crash because there is no memory protection when reading inside the memory buffer and Get Save Info didn’t fetch the Face graphics. Control Global Save has received some bugfixes and now saves the global save file to the browser storage. (#3270, #3271)

Sometimes it can happen that the WebGL rendering context is lost. Then the canvas is no longer updated and everything since the last save is lost. The Player will now try to restore the context by recreating the SDL2 window. Did you try turning it off and on again?. (#3282)

The game OFF crashed when entering the Big Elsen room but only in the web player. This was a strange interaction between async suspend (for fetching the panorama on this map) combined with the way the interpreter works during the map transition. What happened was that the panorama was changed by a map event during the transition and this indirectly continued the interpreter, resulting in an endless recursion. The endless recursion is now prevented by checking if the panorama is already being downloaded. (#3058)

Now you can enter the room of Big Elsen in our Web Player.

When a translation is changed, the list of requests, which keeps track of which files have already been downloaded, is cleared to ensure that you can receive the translated assets. Unfortunately, this includes deleting requests that were in flight, resulting in a use-after-free. (#3165)

The touch buttons now send event.code to the Player instead of the deprecated event.keyCode. This allows the input to be keyboard layout independent as on other platforms. This is most noticeable on French (AZERTY) keyboards. Walking with ZQSD (WSAD on US keyboards) now works. (#3023)

The further emscripten changes were related to the infrastructure and are not noticeable by normal users: (#2722, #2862)

Code running in a web browser is required to yield back to the browser, otherwise the tab will be reported as stuck and the browser will terminate it. This is incompatible with the usual approach of most desktop games which use an endless update loop that terminates when the game is closed. The simplest way to make this still work is to use Asynchify, which converts all calls up to this endless loop into an intermediate language that can be suspended. This was our approach for years, but when we implemented savegame uploads, we found that this broke asynchronous calls into the Player because the Player never fully suspended. So we had to rewrite our code in such a way that it suspends without using Asynchify. Fortunately we already used this approach in the early days our web player, so we knew what to do.

We have moved the Player into a module (via MODULARIZE). The advantage is that this gives more control over the configuration. Previously, the Player launched when the website was opened, making it difficult to pass options. Now it launches when the module is instantiated. The file system module FS has also become part of this module. (#3243). For users this makes no difference.

This module allows us to expose an API to the web browser. The main motivation was to make it easier to call into the Player from JavaScript. This change helped the Yume Nikki Online project a lot in simplifying their callback code.

Windows

This release requires Windows 7 or newer. After the 0.8 release, we updated our build infrastructure from Visual Studio 2019 to Visual Studio 2022. The new version no longer supports Windows Vista.

Finger touch input is now working on other devices besides the Microsoft Surface. When we first implemented this feature, the finger IDs we saw were always in the range of 0 to 4. But we noticed something different on an ASUS laptop: the IDs kept getting higher with each touch. We improved our finger tracking algorithm to fix it. (#3207)

Windows 11 has an annoying window rounding behaviour by default that results in a few pixels at the bottom being lost. Ironically right after we implemented this, we read in a blog post of Dolphin Emulator that they had the same idea. In conclusion, we’re not the only one hating it. (#3207)

Consoles (Homebrew) and libretro

EasyRPG Player for WiiU is out. Read the linked blog post for details. (#1348, #3167, WiiU Fixes #3234)

There have been lots of changes for the Wii version: We’ve migrated it to SDL2. SDL is an abstraction layer for video, audio, input and more. Since the beginning the Wii version ran on SDL1, which is an ancient, deprecated version of SDL. Switching to SDL2 gives us some advantages: The rendering resolution is higher (not just blurry 320×240), which makes a big difference in image quality and lets you use features like custom resolutions. We measured the performance and the SDL2 version is up to 5 FPS slower when V-Sync is disabled. With V-Sync enabled it’s significantly slower. We decided to keep it off because we couldn’t find any flickering or tearing issues. We think the slightly worse performance is acceptable, given all the other enhancements. (#3236). The Wii uses now a custom audio backend based on AESND which should give a slightly better performance when playing audio. (#3181). The app no longer crashes when running from USB while no SD card is inserted. (#3054)

Shown here is the difference in sharpness between SDL1 (left) and SDL2 (right). The difference is incredible. Note that this screenshot was taken via Dolphin Emulator but even on a real console you can see it.

We have received reports that the log file corrupts the filesystem, especially on the Wii. The filesystem drivers on the homebrew platforms are not very reliable, and if our player crashes, the filesystem can get corrupted. We have decided to disable logging by default on all our homebrew ports. Logging can be enabled/disabled in the settings. (#2838)

Screenshots taken on Wii and WiiU do not have incorrect colous anymore. (#3125)

Fixes and improvements for the 3DS: Loading saves no longer crashes. We are not sure how this was fixed. (#2988). Transitions are no longer rendered in blue. (#2981). The 3DS version now uses the native error dialogue to report fatal errors, and ports using SDL2 (e.g. our desktop platforms) show a message box. (#2875) Furthermore a battery indicator is now displayed and stretching of the top-screen is supported. (#3202)

The battery indicators shown in the 3DS version of the Player.

On the Switch, the app no longer hangs when resuming from sleep mode. (#2957)

The startup path passed to libretro is now made canonical as our file system code expects this. A canonical path is a path without .. and . components. E.g. the canonical version of dir/./dir2/../dir3 is dir/dir3. (#3059)

libretro cores for iOS and tvOS are now provided. A native EasyRPG Player app will come someday, porting the core just took less time because libretro already has a working frontend on Apple devices thanks to RetroArch. (#3365)

Everything else

The game The Sacred Tears: TRUE uses an encrypted map tree to prevent altering of the game in the RPG Maker editor. Obviously this also breaks running it in our Player. The encryption consists of incrementing all byte values by one (also known as a Caesar cipher). As this encryption is trivial, we’ve implemented a decryption to make the game work. (#3269)

Changes to the debug scene:

  • The scene can now be opened while a message is active. Note that messages are not stored in the save file. Loading the save will resume execution immediately after the message box command. This is usually safe, except if the message box contains choices or a number input. This is a debugging feature, so use it with care.
    (#3014)
  • Opening of the menu scene can be blocked by the game. We had an undocumented override (hold shift, then press cancel five times) to still get into the menu. This override was removed and instead an Open Menu option added to our debug scene. (#3020)
  • While in battle, map events can now be triggered from the debug scene. The option is still disabled during a battle test because no map is loaded. (#3028)
  • A new setting was added to override the hero’s movement speed. (#3074)
  • You can now analyse the call stacks of the interpreters (#3219, contributed by florianessl aka Käsekumpel)
  • A new view for looking at the content of string variables was added (Maniac Patch only, #3219, contributed by florianessl aka Käsekumpel)
left: string variables preview, right: event callstack

Bitmaps that had an effect applied were never deleted because we always kept an active reference to them, wasting a lot of memory. Effects are modifications to a picture such as x/y flip or a colour change. (#3163)

The warning message shown when learning invalid skills was changed to a debug message. Skills can become invalid when they are removed from the database after assigning them to an actor. RPG_RT ignores such invalid skills (and the editor does not show them!), making it impossible for the game creator to notice. This was reported for multiple games, including Uneven Dream (凹凸夢) and LanVodis. (#2977)

More invalid database data: The warning messages shown when the game database references invalid items or party members were changed to a debug message. One way to get invalid party references is removing actors from the database after they were added as initial party members. RPG_RT again ignores such invalid data. This was reported for the game Adventures of Meatball Dog. (#3008)

Since the first release of EasyRPG Player we create a log file easyrpg_log.txt in the working directory. When the Player is started in a game directory, the logfile is created in that directory. This means that if you use our player in many games, you will have accumulated hundreds of log files. We noticed that this was slowly becoming a problem: game archives were starting to contain our logfile because the author forgot to delete it. To mitigate this problem, we now create a single logfile. On Windows it is located in AppData/Local/EasyRPG_Player.log and on Unix systems in $XDG_STATE_HOME/EasyRPG_Player.log (~/.local/state by default). On other platforms we put it in the config directory. (#2838)

The size limits for some assets were increased to reduce spamming the log file with false positives. (#3260)

A graphical user interface was added to lmu2png to make exporting maps more user-friendly. (Tools #89) Currently the builds we provide only support the GUI on Windows.

For Developers / Maintainers / Building

Always upgrade liblcf before upgrading the Player. Both need to be on the same version.

As a reminder: liblcf is our library for parsing RPG Maker files.

tl;dr for busy maintainers :)
  • C++17 required
  • autotools will be removed soon, migrate to CMake
  • CMake: zlib uses now the find package because the config file is broken
  • CMake (liblcf): in-source builds are now prohibited
  • SDL3 is now supported but SDL2 is still the default. To enable it use -DPLAYER_TARGET_PLATFORM=SDL3.
  • fmt >= 10 is supported
  • lhasa is a new, recommended dependency (for playing games inside LZH archives, a popular archive format among RPG Maker games)
  • dr_wav prefers now the system library instead of the vendored copy (via #if __has_include)
  • rang was removed
  • Vendored picojson was removed and replaced with nlohmann_json and is a new, recommended dependency on all systems, not just emscripten (used by the new JSON event command).
  • liblcf: Vendored inih was removed (we still use some example code based on it) and requires now the system library
  • liblcf: Vendored string-view-lite removed and migrated to C++17 std::string_view.
  • liblcf: Support for iconv was removed, use ICU instead (ICU is the default since 7 years, nothing changes here)
  • liblcf: Expat (XML) uses now the legacy EXPAT find package when the config file is missing.
Detailed

Building liblcf and Player now requires a C++17 compatible compiler. For liblcf this is actually enforced by a dependency: ICU (the Unicode library we use) requires C++17 as of version 75. (#2190, liblcf #458)

Building with autotools is deprecated and will be removed right after this release. The archaic m4 language used by autotools became more and more of a maintenance burden, and our autotools build system lacks many features compared to our CMake build system. If you are a package maintainer, please migrate to CMake.

We support now SDL3.  SDL3 is the latest version and brings enhancements such as a better graphics API proper scaling on high-DPI displays. Our support for SDL3 is very basic (same as SDL2) and is fairly recent so we decided to stay on SDL2 by default for now. To enable it use -DPLAYER_TARGET_PLATFORM=SDL3. (#2865)

CMake: zlib now uses find package because the config file is broken if not both shared and static version of zlib are installed. (#3318)

The Player compiles now when using fmtlib 10 or newer. (#3002)

Loading games inside LZH archives, a popular format for RPG Maker 2000/2003 games because the editor can create it, is now supported and requires lhasa, a new, recommended dependency. (#3033)

Dr_wav (header-only library to play WAV audio files) uses now the system library, when available, instead of our vendored version. (#2986)

The vendored version of rang (library for coloured output in the terminal) was removed. We now use the functionality of fmtlib. This breaks the terminal output on Windows versions prior to Windows 10 but considering this is only a debugging feature this is acceptable. (#3181)

The vendored copy of picojson (JSON library) was replaced with nlohmann_json. The JSON library is now used everywhere, not just for emscripten, making it a new, recommended dependency for the Player. For emscripten it’s used to parse index.json to figure out which files exist and for the other platforms a new event command was added to access and manipulate JSON files. (#3228)

When compiling a libretro core for Android some components depending on SDL2 were not disabled which broke the build. (#2983)

The CMake build system has a new setting -DPLAYER_BUILD_LIBLCF_BRANCH to build a custom branch when using -DPLAYER_BUILD_LIBLCF=ON. (#3017)

The Player now builds when resampling is disabled (neither speexdsp nor libsamplerate available). (#3251)

CMake now correctly detects the endianess (big or little endian) when crosscompiling. (liblcf #464, #3060)

A callback API was added to make it easier for external code to hook into our code without causing merge conflicts every time our code is updated. (#3224)

The header string-view-lite was removed and replaced with std::string_view which is a new feature in C++17. (#3360, liblcf #495)

liblcf

As a reminder, liblcf is our library for parsing RPG Maker files.

Messages from the liblcf library can now be redirected instead of just appearing on the terminal. This allows us to log parsing problems and skipped (unknown) chunks to our normal log file when running a game through EasyRPG Player. (liblcf #416)

Starting with Windows 10, Microsoft bundles the Unicode library ICU. We now support building liblcf against this system library. The disadvantage is that you need Windows 10, otherwise you will not be able to run applications that depend on it. We asked around in chat and decided to build a custom version of ICU anyway. This way you get support down to Windows 7. (liblcf #427)

New chunks have been added to support new EasyRPG and Maniac features:

  • EasyRPG extension: For battler facing direction (liblcf #463)
  • Maniac Patch: For separate Width/Height parameters when scaling pictures (liblcf #473)
  • EasyRPG extension: To store state when an event command yields and is called again after (used by Wait for Single Movement on repeated calls, liblcf #478)
  • Maniac Patch: For separate (X/Y) camera pan speeds (liblcf #482), for various message settings (not implemented yet), for new terms related to battles and for giving names to string variables (liblcf #499)
  • The default trigger type for common events was changed to call (liblcf #484)

In addition to ICU, we supported iconv. This code was unmaintained, and we decided to remove it. As a bonus you can now build liblcf without ICU, but then only Windows-1252 encoding is supported. (liblcf #465, #471)

The tool lcf2xml now uses the system encoding by default, and you can override it with --encoding. (liblcf #468)

The vendored copy of inih (a library for accessing INI files) was removed, and building now requires the system library. We still distribute parts of the C++ interface of this library, as we have modified it to suit our needs. (liblcf #479)

liblcf now builds with RTTI (runtime type information) disabled. This is used on our homebrew platforms to reduce library size. (liblcf #483)

One of the things liblcf is designed to do is read and write RPG Maker files in a bit-perfect way. This basically means that if you read a file with liblcf and don’t make any changes, the output file should be exactly the same. Apart from files that have corruption issues, this was the case before version 0.8. However, in version 0.8, we accidentally broke this feature because we always wrote certain EasyRPG chunks in the files. These are now omitted by default, which restores the bit-perfect read/write behaviour. (liblcf #485)

The library inih can be disabled to make building liblcf easier. However, when you do this EasyRPG Player will not compile. (liblcf #490)

On some sytems the libexpat package (used to parse XML files) does not provide a CMake config file. The config file generated by liblcf correctly handles now the case that a legacy find package is used by Expat. (liblcf #496)

One thought on “EasyRPG Player 0.8.1 “Stun””

  1. Thank you for the continued work on this software. I also love the detailed update posts as well. It must be very time consuming to assemble, sum it up and write and organize a well structured article. I am very happy about the explicit decision to not use Ai art in the RPT replacement project.

Leave a Reply

Your email address will not be published. Required fields are marked *