PERSONAL
3,147
MARDEK Re-Release Hurdles (UPDATE)
5 years ago - Edited 5 years ago1,483 words
I'm devoting this week to setting up the old MARDEK games for Steam, though there are some frustrating hurdles. Here's me rambling about what I've got after doing several hours of research today, for catharsis as much as anything!
Update - Wed 8 April:
I wrote an email to Matt Roszak - the Epic Battle Fantasy guy - asking him how he'd figured out the issues when porting AS2 games to Steam, but while putting my specific concerns into words, I had some ideas about how I can hopefully do it myself. So I'm going to attempt that before pestering anyone directly about it.
It requires buying Adobe Animate though, which I'm not exactly thrilled about since I'll have no use for it other than this. I'll have to just get a £30 one-month subscription, and set a reminder for myself to cancel it before it renews.
Essentially I'll be building a wrapper in AS3/AIR, which will embed the original AS2 swf of the game, and it'll communicate with it using something called LocalConnection. I'll need to change how saved date is structured entirely, which will mean delving deeply into MARDEK's ancient, amateurish code. Hopefully I can figure something out!
I actually set up MARDEK successfully as a standalone executable back at the start of December, which I talked about in this post:
[LINK]
Since then, I've been putting off actually releasing it because I wanted to do that alongside a Kickstarter, but I've got several people expressing interest, plus there's the whole quarantine thing, so now seems like a good time to do it.
Technically I could just upload that version to Steam today and be done with it, it'd work fine,
I think, but there's a snag: MARDEK was coded with Flash's ActionScript 2, and exists as a swf file, so to turn it into an exe file that Steam can run, I had to write a wrapper for it in C#. However, I'm not able to implement the Steam API - which controls achievements and cloud saves - into this, and I can't get the swf to communicate with the exe anyway so there'd be no way of knowing when achievements or save data should be recorded.
I remember someone mentioning that the Epic Battle Fantasy guy (whose name I can never remember how to spell!) was able to export his old AS2 games to Steam with achievements, and it seems that was done with an "Adobe AIR" wrapper rather than a C sharp one. Adobe AIR is what Flash moved towards exporting as when swf was becoming obsolete, and apps in that format can run as standalone executables. I have experience with it already; Taming Dreams was an AIR app.
(I'd ask him directly how he did it, but I feel weird about it since I've never played his games.)
The easiest way I know of to make an AIR app would be to use Adobe Animate, the program that Flash has now become. Back in December, I downloaded a month-long free trial of that... but it's now run out, and I'd have to buy it. It's got a subscription model for £20 a month if I commit to a year (but why would I?), or £30 a month if I choose just one month (and it'd surely be one of those quietly-automatically-renewing-unless-you-unsubscribe things...). Either way, not exactly peanuts.
Alternatively, I could pay for a subscription to Adobe's "Creative Cloud", which would also allow me to use programs like Photoshop, Premiere, and Illustrator. I used to use Photoshop in the past, but - like the majority of young, poor artists - I pirated it, and stopped using it when I grew up and grew more uncomfortable about that. Or rather, I'd been feeling bad about it for ages, but finally gave it up when Adobe updated its piracy detection methods and I couldn't even access the program anymore. That was relieving, in a way, as I never felt comfortable pirating, but rationalised it as 'everyone else does it!' and 'Adobe expects people to pirate!'. I've been using a free alternative called Krita since then, which leaves my conscience clearer, though Photoshop's definitely superior, and I do miss it.
A subscription to Creative Cloud would be £50 a month. That's not really something I can casually afford, what with my almost total lack of income. I could rationalise it to myself as spending money to earn money, since I'll be using the programs in my creative work and
hopefully profiting from that, but I've no idea how likely it is that I'll earn much at all.
One of the things I want to sort out this week - once I get the more important MARDEK stuff out of the way - is dusting off my old Patreon account, though I still don't know what I could offer people in return for supporting me. Whatever people did offer would help me continue doing this whole creative thing, but I wouldn't want it to not feel worthwhile. Even if Patreon wouldn't generate enough to pay the bills, it might at least cover the costs of things like software?
In my research, I came across
∞ this post ∞ by a creator who spent a decade making something called Submachine, which I can't say I've ever heard of, though I get the impression that he is - or was - in a similar(ish?) position to me, and to other creators who had their taste of success back in the day but end up forced to face the fickleness of the Zeitgeist and the obsolescence of the skills they'd built their world around. It's a four-year-old post, and it doesn't seem like there's much going on with his site since then. I wonder how he's doing.
He has a Patreon though, and I see that he's getting almost $1000 a month, despite his posts seemingly getting little attention, and the work he makes seems very... niche, maybe?
I don't know; I feel like I should have been keeping up with more of my contemporaries like this over the years, watching how they chart these changing tides, but I've always had these stupid demons holding me back, so I don't have much to directly compare to. I've said all this before.
It does motivate me to finally get around to resurrecting my Patreon though, which I've been meaning to do this week anyway. I'll be surprised if it gets much interest at all, but it's worth a try.
From asking about it on Twitter and doing some more reading and thinking myself, it seems the biggest thing people would want from the Steam integration is the persistence of saved files.
The only way to handle saved games in AS2-era Flash was to save what were essentially cookies, which were fragile, easily lost whenever the user cleared their cache after every secret session of their most exquisitely deviant pleasures. It'd make sense to store something more solidly than that.
I'm not sure how, though. AS2 Flash had all these security measures to make sure random Flash files in your browser couldn't save to or read from your file system (imagine the abuse!), so I can't simply tell the game to output an XML file in its local directory or anything. Nor is it possible to listen to and intercept the Flash file's inner workings, for the same security reasons.
I
think there might be ways to embed the AS2 file in an AS3/AIR file and have them communicate...
I hope. In which case I could have the AS2 file generate and interpret data it'd pass to or from the AS3 wrapper, which
can save to the directory... Maybe. I'll need to look into it.
Like I wrote in the other post a few months ago (linked to earlier in this one), digging into all this stuff feels like archaeology. Everything's from a decade ago, or more. Nobody talks about Flash development anymore. It's sad, in many ways, and difficult, too, finding anything that's remotely relevant here in the future.
I'd love to get this re-release out ASAP, but the biggest issue is that I really don't know what I'm doing here, so I'm having to figure a lot out. And some potential paths just aren't possible. It feels like trying to figure out how to run your old Pokemon Red cartridge on your iPhone, or something. It'd be great if you could! But how??
It's mentally taxing, though writing it out like this helps. I might call it a day for now, see what I can figure out with a refreshed mind tomorrow...
(Also, I've been wanting to write a personal post about other stuff for the past few days, but I've not had the time! I've not had time for long comment replies yet either; sorry!)
22