This is still a stupid idea.
SWFModernRuntime is even more of a rip-off than SWFRecomp, adding no creativity to the process of writing functions that a recompilation will use.
This repo got its idea from Wiseguy's N64ModernRuntime, which is actually further composed of two libraries: ultramodern and librecomp.
Wiseguy originally made ultramodern for another project much earlier, and later reused the repo for N64Recomp to use. It implements many core features of libultra, the original N64 library that developers of games like Super Mario 64, Ocarina of Time, etc. would link against. Implementation of these features is obviously crucial to a native pc port of any N64 game.
On the other hand, librecomp was designed specifically with recomps in mind, acting as a glue layer between the recompiled C code generated by N64Recomp, and the OS functions in ultramodern.
Fortunately, Adobe released most of their control over Flash as part of the Open Screen Project, Adobe removed many restrictions from their SWF format, including restrictions on creating software that plays and renders SWF files:
To support this mission, and as part of Adobe’s ongoing commitment to enable Web innovation, Adobe will continue to open access to Adobe Flash technology, accelerating the deployment of content and rich Internet applications (RIAs). This work will include:
- Removing restrictions on use of the SWF and FLV/F4V specifications
- Publishing the device porting layer APIs for Adobe Flash Player
- Publishing the Adobe Flash® Cast™ protocol and the AMF protocol for robust data services
- Removing licensing fees - making next major releases of Adobe Flash Player and Adobe AIR for devices free
They even went as far as to donate the Flex 3 SDK to Apache back in 2011, in favor of the wild uprising of HTML5. Apache Flex is now licensed under the Apache License (a permissive open-source license).
Currently the runtime handles basic SWF version 4 actions, and some primitive
tags, including much of the DefineShape tag functionality.
It handles rendering of solid fills through the GPU, with no CPU calculations or manual framebuffer writes.
Once on initialization, the runtime uploads all vertex data outputted by the recompiler to the vertex buffer and transform data outputted by the recompiler to a read-only storage buffer to be accessed easily later. The renderer accepts the current shapes on the screen as arguments from the runtime and passes them to a very small and efficient vertex shader:
This shader also handles the use of transforms through the single static
storage buffer, and a per-shape uniform with a uint to specify a transform
index:
Handling all of the uploads once on initialization results in almost zero per-frame overhead once the SWF is running.
All the people that wildly inspire me. 😋
My very dear friend Stave.
From RecompRando:
- ThatHypedPerson
- PixelShake92
- Muervo_
From N64Recomp:
- Wiseguy
- Darío
- dcvz
- Reonu
- thecozies
- danielryb
- kentonm
From Archipelago:
- seto10987
- Rogue
- ArsonAssassin
- CelestialKitsune
- Vincent'sSin
- LegendaryLinux
- zakwiz
- jjjj12212
From RotMG:
- HuskyJew
- Nequ
- snowden
- MoonMan
- Auru