This week I was aiming to work on the actual code base of FPL and adding a new feature - a Save manager to backup and restore files. As I mentioned last time, the application is built on Electron, using Typescript and leveraging the use of React to deliver component-based modules.
Setting up FPL was very pleasant - it was primarily built by obelisk, the main mechanic on the Flashpoint team. I will keep mentioning the fact that I am an abused Windows developer until the end of time - FPL was primarily made for Windows so the development environment was much more favourable.
Some issues that arose:
"imageFolderPath": "Images", "jsonFolderPath": "Data", "logoFolderPath": "Logos", "playlistFolderPath": "Playlists"
services.jsoninto the consumer Flashpoint’s
The internal documentation is still a Work in Progress. So, a lot of inferring and questioning needed to be done.
As I was resolving build issues, I would take a break and resume doing some curation. I haven’t mentioned all my curations (since Pebble’s Quarry, I’ve also resurrected Postopia adventure and was working with an FPL colleague to restore more of them). I also tried to resurrect Waffle boy’s mountain adventure, famously lost in our community. I managed to partially recreate the missing XML (that loads the separate Flash SWFs properly) to play the first level, but beyond that I couldn’t resolve it.
So, I decided to curate an old Java applet game from freearcade.com that I used to play back in the day. It was a game called Vertigo, from 1999, made by Andrew Gower of RuneScape fame. I mistakenly assumed that it would be as easy as the few that I did after my first one.
Get Vertigo to work on Flashpoint since it no longer works on the browser.
java.lang.ClassFormatError: Name index 0 in LocalVariableTable has bad constant type in class file vertigo at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:217) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:152) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:626) at sun.applet.AppletPanel.createApplet(AppletPanel.java:799) at sun.applet.AppletPanel.runLoader(AppletPanel.java:728) at sun.applet.AppletPanel.run(AppletPanel.java:378) at java.lang.Thread.run(Thread.java:748)
Here’s where my detour started - everything I read online mentioned that it was incompatibility between an older version of Java versus a newer one. Using this command in Bash, I can get the major version (which tells the user which JDK version was used to compile the file):
$ od --format=d1 vertigo.class -j 7 -N 1 0000007 45 0000010
The middle number (45) indicated the version. Here’s a table of JDK versions and their respective major versions:
|Java Version||Major Version|
Clearly this game was made with one of the earliest possible JDKs - 1.1.
Unsupported 16-Bit Application.
Finally, after all of that hard work, this was the result:
Throwing an array out of bounds and pulling the wrong assets for some reason
Instead, Strawrat started at that very first problem all the way back at the beginning -
java.lang.ClassFormatError: Name index 0 in LocalVariableTable has bad constant type in class file vertigo
Here’s how they did it:
Demonstration on how to delete the malformed table
LocalVariableTable in the class file was broken and needed to be deleted - it’s considered optional, similar to
This answer was so beyond my expertise that I knew I would have never figured it out on my own.
I’m very greatful to the FPL community for their expertise and wizard-like reverse-engineering.
You can see the game in FPL 6.0 or download it here!