News for hackers. Stuff that matters.
Re:The Death of Flash and Rewriting 1.4M Lines of Code by crescentfresh on Tuesday December 19, 2017 @01:27PM (#15962562)
> rewriting the entire codebase in ActionScript first to take full advantage of GPU acceleration, before porting it into Haxe

So let me get this straight. It was already written in ActionScript. They re-wrote the ActionScript. All of it, then ported it to the Haxe language.

So the purpose of the first "re-write" was... refactoring it to use GPU acceleration in ActionScript? I guess they just hadn't gotten around to that optimization in the first place and used this as an opportunity to do so. But was it strictly speaking, necessary?

Re:The Death of Flash and Rewriting 1.4M Lines of Code by sydd on Tuesday December 19, 2017 @02:44PM (#15963484)
AS3 has 2 rendering modes:

CPU - this is an old API that can render vector based graphics. Every game before 2011 uses this API.

GPU - Adobe introduced a thin OpenGL wrapper around 2011. This is a completely new API and looks very similar to OpenGL.

I guess Haxe code looks much more similar to a game written in OpenGL, this they rewrote the rendering pipeline (and converted all assets from vector animations to sprite sheets.)

Re:The Death of Flash and Rewriting 1.4M Lines of Code by untog on Tuesday December 19, 2017 @05:54PM (#15965219)
The Haxe code might even look similar to the GPU ActionScript - they're (deliberately) very similar languages.
Re:The Death of Flash and Rewriting 1.4M Lines of Code by crescentfresh on Tuesday December 19, 2017 @02:50PM (#15963558)
This is a most useful explanation, it explains the rewrite, thank you.
Re:The Death of Flash and Rewriting 1.4M Lines of Code by AStellersSeaCow on Tuesday December 19, 2017 @01:41PM (#15962735)
I know a guy who worked for that company. Sounds like they had no goal beyond refactoring their ActionScript as better ActionScript as recently as a couple years ago, denying the ample writing on the wall that this was a fool's errand. I assume they pivoted and turned that into a stepping-stone for their Haxe port when it finally sunk in that Flash was getting euthanized. So they might be monkeying with the timeline and cause-and-effect in the article, but the end state is ultimately what matters.
Re:The Death of Flash and Rewriting 1.4M Lines of Code by singmajesty on Tuesday December 19, 2017 @10:33PM (#15966818)
The company chose to move to bitmap-based animation to get better performance on mobile
Re:The Death of Flash and Rewriting 1.4M Lines of Code by amaranth on Tuesday December 19, 2017 @02:18PM (#15963167)
I'd guess that, along with converting all of their artwork to bitmaps, this was needed because Haxe+OpenFL didn't support what they were doing before. If they were going to have to change it anyway better to make that change before the port so you don't mix up two sets of bugs.
Re:The Death of Flash and Rewriting 1.4M Lines of Code by milesvp on Tuesday December 19, 2017 @04:49PM (#15964671)
This makes a lot of sense. Doing a major refactoring while migrating to a new language/platform is much harder than refactoring a codebase so that it more closely mimics a line by line translation to a new language, and then doing the line by line translation. It may look like more work, especially since you are almost guaranteed to touch the same code twice, but the the cognitive load is so much lower each time, that the extra effort will make it all so much easier.
Re:The Death of Flash and Rewriting 1.4M Lines of Code by singmajesty on Wednesday December 20, 2017 @08:43AM (#15969370)
OpenFL does support the earlier workflow, but you are exactly correct that refactoring and porting are better done separately than at once!