← All posts

Flashback: It's easy to port your old Flash games to the native web with LLMs

The squid boss firing at the player's ship in the ported game

As someone who learnt to program making Flash games in the mid-2000s, it's great to make my Flash games playable again with modern technology. It's probably not too surprising in this age of reverse-engineering of much more complex games, but it's been fun to see them come to life again.

The inputs

While I started developing in (Macromedia) Flash 6, I continued development until Flash 9. I was not using any proper version control, so several games were left in a somewhat broken state.

For inputs, we have (for Flash 9):

  • .fla files (Flash project file)
  • .as files (ActionScript 2 or 3 files)
  • .swf files (Output Flash file, this is what you would deploy)
  • .xml files (A few files that stored the level layout for some games)

The process

We already have a small Go web framework backed with CockroachDB to run our current game and other services. So to port these games that are all single-player games (apart from one high-score table), we mainly just need to generate TypeScript and HTML bundles to serve.

This was done by pointing Claude (Opus 5.5 - Medium) at the source files, and asking it to do the migration. It ended up creating Go readers to parse the .fla and .swf files. I would have thought the .swf would not be needed, but apparently it is much better documented publicly than .fla.

This produced the code plus a bunch of PNGs and MP3s, and hooked it all up together automatically. It also resulted in a small Flash runtime on Canvas for the games: one for AS2 (with classics like attachMovie) and one for AS3.

Changes

  • Tweaked the levels to be earlier working versions (remember, no proper revision history!)
  • Fixed the squid boss to have a reasonable amount of health
  • Added (basic) touch controls for mobile
  • Reinstated proper high scores for AI Invady 2, using CockroachDB

Try it now

Well, these are not great works of art, but if you want to try them go to https://flashback.morsel.ca/.

Consulting

Need extra hands on your next build?

We take on select consulting engagements - architecture reviews, hands-on implementation, or unblocking a stuck project. Book a free intro call.

Book a free call