porting a video-only flash game to another engine - which one?

noostradamus

Newbie
Apr 3, 2019
57
41
hey,
let me just preface this by saying i'm not really a dev. i never played with any game engine (though i've heard some names), i never "properly" learned a programming language, but i've been dabbling in some random languages (mostly python). by "dabbling" i mean mostly taking code snippets online and adapting it into my projects to fit my needs. these projects were nothing special, but they were enough for me to mostly get a grip in understanding the code i'm using.
so there's this game that runs on adobe flash player. it's essentially a glorified video player - there are pre-rendered looping scenes which you transition between by choosing particular dialog lines. with some swf decompiling/extracting tools, i was able to pull .flv files from that game, among other things like audio and code to help me understand how that game ticks under the hood.
i'd like to try and port it to some other engine for my personal use (and maybe share it here if sharing ported games is fine here). why?
  • to lazily, but effectively make use of AI tools to upscale the videos from 720p 30fps to 1080p 60fps
  • to try and avoid as many limitations imposed by using flash as possible, by that i mean improved video scaling when the game window is in a non-standard size, more modern and efficient video codecs, maybe even windows + android support (like unity/godot?)
  • to maybe try and implement support for devices such as "The Handy"
i'm going to take a wild guess and assume that such a game could be recreated on just about every popular engine out there. my question to you is, which one would be the easiest to attempt this on? this is of course because of what i said at the beginning, i'm a noob and i would not be ashamed in choosing the path of least resistance. it's hard to tell what exactly that would mean since my game engine dev experience is zero, but probably things like a good supply of code snippets would be welcome. and anything else you guys think makes a game engine "easy". :)
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,046
7,393
Well... Honestly, it is probably impossible for you if you expect a quick conversion solution. It's not as easy as you might imagine. More over, there's no universal best engine to port a flash game, it would depend on the game. If it was a visual novel in flash, ren'py would be the best and most obvious choice, for instance.
 

noostradamus

Newbie
Apr 3, 2019
57
41
Well... Honestly, it is probably impossible for you if you expect a quick conversion solution. It's not as easy as you might imagine. More over, there's no universal best engine to port a flash game, it would depend on the game. If it was a visual novel in flash, ren'py would be the best and most obvious choice, for instance.
i'm looking for the easiest way, but that doesn't mean i expect it to be easily done overnight. i'm ready for this to take me several weeks, if not months due to my lack of skill. i still want to give it a shot.
the description of the game i provided is pretty much exhaustive. i don't think that game can even be classified as a visual novel, hell, it might be a stretch calling it a "game" lol. it's completely linear except for like 2-3 cases where multiple choices are given, but there are no conditions associated to any of those, it's just a "pick a scene" thing. every choice just plays a video file that has "transition" and "loop" fragments. do you think ren'py would be enough for this?
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,046
7,393
Hm... Sounds something you could handle with Ren'Py, yes. It is also easy enough for you to get it done within that timeframe without any issue.
 
  • Like
Reactions: noostradamus

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,296
3,953
I don't have a general answer for you but regards these points:

> improved video scaling when the game window is in a non-standard size,

Can't speak for other solutions but Renpy scales any playing videos proportional to their size within the window as the window is resized

> more modern and efficient video codecs,

Anything old enough to have shipped with FLV video is unlikely to have very high quality or image size in the first place. Encoding with a newer codec might give smaller file size but there is certainly not going to be any visual improvement.


What game are you talking about? Some of us are old enough to remember the prime flash era you know :love:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,369
15,284
Anything old enough to have shipped with FLV video is unlikely to have very high quality or image size in the first place.
Especially since it's originally embedded in a flash player.
The video Bytes size need to be small in order to not unreasonably inflate the swf size, and either its pixels size, or its frame rate, also need to be small/low in order for the said player to be able to play it smoothly.
There's probably exceptions, but generally those videos don't goes further than 320x200.


What game are you talking about? Some of us are old enough to remember the prime flash era you know :love:
And some to remember the era before, no thanks for making me depressed ;)
 
  • Haha
Reactions: osanaiko

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
Let me just preface this by saying I'm not really a dev.

Don't worry. The majority of devs here on the forums aren't devs either.
You just need a bit of an analytical mind. Since you've already ripped .flv videos out of the original flash code - You can take it that you've met the minimum requirement.

I never played with any game engine (though I've heard some names), I never "properly" learned a programming language, but i've been dabbling in some random languages (mostly python).

It will really come down to the style of the game you are trying to convert. Something that is "mostly" video... connected by the occasional decision by the player... RenPy. In fact, given that you've specifically mention python... I'd say RenPy again.

But RenPy is not great at map based progress (use RPGMaker) or 3D graphics (Unity or Unreal Engine). Because you've focused on the video aspect of the game within your post... I'm going to say probably RenPy or RPGM.

Though I'll throw GODOT in here at the end, because it needs a mention - but I don't know enough about it to say what it is and isn't good at.

by "dabbling" I mean mostly taking code snippets online and adapting it into my projects to fit my needs.

Welcome to programming. Copy and pasting code since the early 1960's.


So there's this game that runs on adobe flash player. It's essentially a glorified video player - there are pre-rendered looping scenes which you transition between by choosing particular dialog lines.

... and I'm leaning even more towards RenPy.

I was able to pull .flv files from that game, among other things like audio and code to help me understand how that game ticks under the hood.

Take a look at .

It's pretty good at converting from older video formats (like .flv) to something more modern (like .mpg or .webm). Just set the initial quality to something near lossless (regardless of size) and then perhaps researching an AI tool that will do video upscaling to 720p or 1080p.
Personally, I wouldn't bother trying to upscale from 30fps to 60fps, as unless done well - it'll all be interpolated movements - resulting in a lot of blurring and poor quality video.

Keep in mind that "modern" codecs are trading disk space and bandwidth for encoding/decoding processor time. h.265 is more modern than h.264 and the file sizes are tiny compared with it's predecessor. But you might still want to ship your game with h.264 videos and therefore larger files if you want your game to run more smoothly on older hardware (or less powerful devices).

If you're aiming for Android at some point... make sure all your audio is using the AAC codec.

I mean improved video scaling when the game window is in a non-standard size, more modern and efficient video codecs

RenPy is pretty good at resizing video to the current screen size, regardless of whether that is 3840x2160 full screen or 800x600 in a window. It's an automatic function of the engine, that lets the developer not really need to worry about the hardware (beyond using fonts too small to read on a small device like an android phone).

Maybe even windows + android support

RenPy will handle MacOS, Windows and Linux with ease (although MacOS can be temperamental between major releases). Android is well supported too, though with use of a few external tools and a steeper learning curve.

Maybe try and implement support for devices such as "The Handy"

I've not come across that. So can't say which of the engines I've mentioned would or would not support it/them.


My question to you is, which one would be the easiest to attempt this on? [...] the path of least resistance.

RenPy almost every single time, for developers with almost no programming background.
You'll still need to pick up some programming, but you can write a whole game like you've talked about with less than 10 commands.

You're bigger problem is going to be the video upscaling. Bringing them all together within RenPY will be as easy or hard as you want it to be.
That is, it'll depend on how focused your aims for the gameplay are... the more specific your requirements - the more RenPy you'll need to learn. (for example, if you want clickable buttons overlaid on top of the looping video that is currently playing, you'll need to learn ).
 
Last edited:

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,296
3,953
And some to remember the era before, no thanks for making me depressed ;)
Haha. Technically my first "adult" game was "Artworx Strip Poker" on c64 - so I'd guess we might be talking about the same decade... but no need to be sad! There's so many games to play, with better quality and easier to access than those ancient days!
 

noostradamus

Newbie
Apr 3, 2019
57
41
79flavors - thanks a ton for the detailed response!

converting videos is something i've been already playing with a lot, including tools such as Handbrake. for the reasons you mentioned, i might start with h.264 first due to best compatibility, but maybe i could also prepare h.265/av1 video packs for users to choose from depending on their hardware? although i've already had a look at ren'py documentation and . which is kinda surprising for me considering it's apparently using ffmpeg, so i'd imagine it should handle much more. i guess they have a solid reason for it.

that also includes AI tools for upscaling (like Topaz Video AI) and interpolation (like Flowframes or enhancr - both using RIFE). i've already passed these flv files through both, and the results were very good. due to the simple cartoonish animation style, upscaling made the image sharper and clean from compression artifacts. good gains from interpolation as well, the output wasn't blurry at all, interpolated frames were barely distinguishable from the real ones, very little artifacts caused by that process too. success in this area is the main reason why this idea of porting the game even crossed my mind.

also thanks for the pointer towards a ren'py feature i might need to make use of.

osanaiko anne O'nymous - perhaps the game i have in mind is an exception. the videos are actually in pretty decent shape already, they're 1280x720 30fps and the bitrate was perhaps sufficient enough that the presence of compression artifacts is there, but it's rather low. of course, 720p 30fps in 2023 just won't do... :)

as for the game itself - let's just say it wasn't made during flash's prime time, i'm not sure it would count as a classic. it was released in 2016 and even got a very timely DLC... this year. i don't know how the state of game engines like ren'py was in 2016, but even in that year flash was already heading on its way out, wasn't it?
 
  • Like
Reactions: osanaiko