Shipped this project!
I added Define shape support(Versions 1-3) and completely revamped my rendering pipeline. I am now able to play shape only flash animations, and the best part, we now have sound!
I added Define shape support(Versions 1-3) and completely revamped my rendering pipeline. I am now able to play shape only flash animations, and the best part, we now have sound!
I am about to ship, and this is likely my parting message. I would really like to thank Flavortown and Hackclub for actually getting me to dedicate myself to this project, I probably wouldn’t be here without them. In this final Devlog I updated my website, to make it easier to use, and got audio to work in the browser, while uploading the new binary into the site. This devlog is short, because I didn’t do much, but I really appreciate everything this community has done for me! Thank you all, and I hope to see you all elsewhere after FT hopefully.
Log in to leave a comment
Log 2 - Finnished Rendering shapes -
⠀
It goes without saying that 30h is insane, and that one Devlog probably won’t cover it, but I am going to try my best to describe my journey.
⠀
As of now, we currently support DefineShape, DefineShape2, and DefineShape3, not DefineShape4* yet, but I will get to that. I will work on re-porting to WASM for shapes, and cleaning up the website for easy access to voters.
⠀
The Journey:
⠀
I started off very overwhelmed, this part took 30h for a reason, and thats because I have a massive pipeline, of storing, more storing, conditional storing, then once everything is stored, I need to create lines for both linestyles, and fillstyles(Line Styling, and Shape Styling), and for fillstyles I need to create each fill with edges, one in forward order(Fillstyle 1) and one in reversed order(Fillstyle 0). I then need to apply an evenodd rule based on winding(Which is why one is reversed, and one is forward), and cut holes in shapes when there is overlap. As of now, we are handling gradients and normal fills, after this upcoming ship, I will add bitmap support for fills, and add DefineShape4. So this is a huge undertaking, and while I don’t have to calculate geometries myself(Skia does it for me), I do have to calculate the coordinates, and scale and everything else required to create an edge, and not just an edge I know, a random one, coming from the parser.
⠀
My attempts:
⠀
Log in to leave a comment
Now to address the *s:
⠀
We did not implement DefineShape4 or Bitstream Fillstyles yet, as I am trying to ship this, before it is too late. Also these animations are not perfect yet, because of the sprite tags, that contain all of the sprites, and their animations, so most characters are kinda buggy outlines of their sprites, but all shapes are correct. The next steps are to impliment shape4, bitstreams, then polish up the project(After shipping ofc). We will then parse sprites, images, and fonts, and hopefully after everything, start the hard work on an Action Script engine.
⠀
Before you grade storytelling, don’t just look at the length, read these please!
⠀
I am leaving some examples in the screenshot section, and will be working on the website. I should be reshipping pretty soon here.
⠀
For now, see you soon!
Dev Log #1(Not actually but the first in the new numbering system):
⠀
In this session I did a few things:
00000000 Green Alpha
Red | Blue |
| | | |
00 00 00 00
⠀
This is really difficult because sometimes you get something that just keeps reading bits until you reach a code that says its the end:
⠀
Stop reading when you reach code 010010:
⠀
011001010001000000010000001100100000100101110001010011
⠀
Was that hard? Well heres the solution:
⠀
01100101000100000001000000110010000 |010010| 111001010011
⠀
That’s right all of that stuff at the end actually is the start of the next little piece of data, so we just ignore it, because we reached our ending code. Now if you thing that was hard for you, you can look for 6 numbers, but the computer also needs to be looking for 4 bit numbers and 2 bit numbers, and like this end tag, 6 bit numbers. All of that happens in this program, and it’s not just on the define shape tag, this happens everywhere, and has happened multiple times in my current implementation. So if you find yourself asking where the 12 hours of work comes from, it’s mostly because of bit packing…
⠀
Anyways, that was a lot, so if your still here, thank you! I put a lot of time and energy into this project, and I would really appreciate it if you followed this project, so I know that someone is looking at this :D. I will be working on actually displaying this shape data next, so watch out for that.
Log in to leave a comment
If you want the tree open it in a new tag, and try your best to read it, FT wouldn’t let me paste the tree here.
Alrighty, you guys wanted longer devlogs, so here we go…
First off, I shipped my project!!! And I got a pretty good sum of cookies! Second, I got to work on sound, and I did it, sound is now fully functional on linux(Meaning its hopefully fine for emscripten). And my next goal is to get some animation stuff done, and basically get through the entirety of an old flash animation. After that, I guess I have to deal with action script, which definitely sucks, but will be the basis of all of this… Heres a rundown of my work in the last 6 hours
Trying to figure out how to get FFmpeg to activate again (I know I know I have an entire video renderer using it), because FFmpeg is way too complicated for no reason.
Started parsing SoundStreamHead tag, which took a minute but is pretty easy by now
I had to work on a brand new processing script for audio, which was quick because there are only 2 formats for this tag.
I had to start using miniaudio, and added a tiny little wget bit to my dependency script, so now we have audio playback.
I had to actually get the minaudio framework working, and implimented into a new pipeline, that I lined up with the Show Frame tags.
I finally got SoundStreamHead working, and playing something.
I started working on SoundStreamHead2, which is literally a copy with more options.
Added the other codec options for SoundStreamHead2.
I basically plugged it into the other function, and when I say my ears almost exploded, I mean holy crap.
I worked for 2 hours to get mp3 running, but it killed everything else, so I had to patch everything else.
Mono was playing stereo, which really hurt my ears.
There were a lot of issues with the chunk sizing, so I started using swre, to resize everything to chunks that don’t change every time.
And after a whole crap tone more bug fixes, it’s working.
Log in to leave a comment
This is a reship because of a bug that only showed one of my devlogs.
Finnished Working on EMScripten Implimentation. Our little video player now works on both Debian and WASM. I am getting everything ready to ship!
Log in to leave a comment
Also I did a crap ton of optimization in this update, fixed tag lag, stopped some memory leak stuff, cleaned up some redundancies, and tho its not logged, I spent days getting all of the WASM together.
THIS IS A BIG DAY! Countless hours of work later, and we have ourselves a (Mostly/Works with medium quality SWF movies, and can only show the video) functional SWF Movie player without playback options. This is so close to shippable, I have poured so many hours into this, and I really hope to have something out soon.
Log in to leave a comment
Ok, so I took some time away from the action script, and I’ve been working on video tags, so hopefully I will have a ship soon of a proof of concept, I will add more updates when I am done with the video rendering…
Log in to leave a comment
Worked heavily on making my own AS3 stuff, but my file was a bit broken, and I cannot find any AS3 files ig, so idk, I’ll keep working on tags. So far we’re doing ok, Its just taxing right now.
Log in to leave a comment
AHHHHHH!!! Ok ok ok… So, I took some time to get this together, and holy crap I did it, we are now using Lightspark’s AVM2! So the plan is to use Ruffle’s AVM1, because they have the best featured AVM1, and Lightspark has the best AVM2. Lightspark was the hard part, now we have another hard part, which is assembling the ActionScript3, and passing to processing and rendering. So this is yet another huge milestone, and sets us well on our way to making our fully functional, flash player! If anyone’s here, thank you for joining me on my journey, and I hope to see you soon!
Log in to leave a comment
I HAVE BIG NEWS! I was able to get the entire processing, and rendering pipeline created, and I am now rendering the background color! I also decided to use Google’s Skia, for rendering, as comparatively it is better than anything any other renderer in c++, and was the original renderer for flash anyways. This makes swf rendering instructions, near 1:1 to the renderer instructions.
Anyways this is an absolutely massive milestone, and I am hoping to start rendering actual shapes soon!
Log in to leave a comment
Hi guys, holy moly that took forever! But 4 hours later and we have our first tag parsed, the entire base pipeline of the processor(Stores info and assembles the content, basically the brain behind getting info ready for the rendering stage)! We are that much closer to getting to our first item we can see on the screen! If anyone, anyone at all can see this, thank you for even looking because this project means so much to me! I have never been more motivated to keep putting out something as awesome as this! Anyways, thank you all, and I’ll be back soon!
#Change Log:#
Added the very first fully parsed tag! And added the entire pipeline for each tag! And And added asynchronous processing of tags! And And And added three ands and an added to the end of this commit message :D
Log in to leave a comment
WAIT ON THAT SECOND IMAGE!! Ok ok ok, I just realized that Tag Code 9 is Background color tag! That means we are super close to having an image!!
Hello everyone(Sorry I was napping), I decided to jump right in on working with tags, and moved my goal post a little bit. I first want to work on a few very simple tags, so I got a sample that only has a few words displayed without any movement, and only one frame, so no action script or anything crazy. This will act as a proof of concept, and perhaps with a few more tags and a slightly better example(Maybe a colorful image) I could ship this(Because completely finishing is never going to happen before ft ends D: ). We’ll will see in time what happens, I have been working pretty quickly so far, so anything can happen! If you have been watching, thank you so much, it means the world! Anyways, see you all again soon!
Log in to leave a comment
And no, Tag length, and Actual Tag length are not faked, one is from the tag header, and the other is the size of the data, and seeing as there are no fatal memory overflow errors, I would call that a success :D
This was a smaller session, but a major milestone! I completed the header! Now I just have to write an entire tag parser/interpreter/parser/renderer/engine/omg please help/I’m kidding but please ask questions because I want to spread my project :D. Anyways, I’m gonna keep working on some stuff and check in a little later!
Log in to leave a comment
Hello Guys… If there is anyone out here 👀… I finally finished do LZMA Decompression, which is like huge because that’s like the hardest part of the header, and guess what… It worked… FIRST TRY! I know I’m crazy, but in all seriousness, this is a major milestone and means that we are very close to being done with header parsing. What this also means is that the hardest parts of this project are yet to come, tag parsing is going to be A TASK! I have to start from SWF version 1 and crawl my way up to SWF 19… Which is a bit daunting, but it will be good. I encourage you to join me on my journey, even if you don’t really understand whats going on, because we’re all developers here and who knows you might learn something cool! Anyways that’s all for this one, I can’t wait to see what happens next!
Log in to leave a comment
I have made great progress on writing my very own SWF Flash Player! I have almost completely parsed the header, and I’ve gotten passed all of the super difficult bit math involved in doing so. I learned a lot about binary to hex conversions, and how they translate to decimal numbers, as well as how files can have different Endianess, basically meaning that when you have more than one byte, they are ordered backwards. I think it’s super cool that you can take a file and read out it’s bytes, and actually build something from them, when it’s just numbers.
Added ZLIB support, and updated error messages. As well as some compiling fixes and a work in progress dependency script for Linux.
Log in to leave a comment
Currently displays the values of the frame, these are derived from a RECT structure located in the header!
Please note that there are around 10 devlogs and not just this one :(
Also I shipped this very recently not a month ago
Please use my official page to look at devlogs when voting:
https://flavortown.hackclub.com/projects/15918