-Clears off desk.-
Hey kids! CatDad here. Let's talk about @streamlabs Tip Jar mods. Specifically the one featured here in @Takahata101 's #Vtuber debut stream last night. I will do my best to explain some of the features of this mod in this thread.
Hey kids! CatDad here. Let's talk about @streamlabs Tip Jar mods. Specifically the one featured here in @Takahata101 's #Vtuber debut stream last night. I will do my best to explain some of the features of this mod in this thread.
So let's start high level. Cheer comes in. Containment shield raises up. The bits settle. Containment shield lowers as the bits start to glow and shrink. The bits get destroyed and a drink is dispensed. The drink exits and the next cheer comes in.
The key to all this is control of the events. We dont let a cheer come in if there is one still processing. To do this we implemented our own queue that holds onto cheers until it sees we are ready for the next one and sends it in.
At each step of the process we are keeping track of the cheer info, what state the machines parts are in, and what animations need to be triggered. A lot of settings had to be created to all the different timings on top of the waiting conditions.
Now for large drops containing more than 40 or so sprites, we also increase the gravity to make the drop process faster. Gravity is increase on those bits only. We also have a maximum wait time before it will start crushing the bits just in case.
Now for the fun part. Shrinking the bits and making them glow. To accomplish the later, we imported the PIXI Filters plugin. Now the tip jar uses PIXI 4.2.3. The Filters plugin version I really wanted...doesn't play well with that version.
Long story short, tweaks were made. I got my glow filter and some others to play with later. And with that, glowing bits with randomly assigned colors was realized. And then the bugs started. I'll talk about that another day.
You may have also noticed the bits stay behind the sheild and in the glass. We imported the PIXI layers plugin for that. It also was not happy with our version of PIXI. Oh, btw, that's at about 5.5k lines of code now. Heh, software engineers amirite?!
There are so many details to how this mod works that I know I'm forgetting things. In the end it is 7k lines of code. Lots of commented out stuff for potential fun later. Now I must go rest for 1000 years.
And here is the development build before I got my hands on @7MDigital 's assets. Im no longer allowed to make assets. We hire people for that. Because this is what you get if you have me behind the wheel. Seriously his work is amazing.
Also, if anyone needs a tool for irregular cup wall generation. This one uses a second transparent image to determine how to build the walls. use a 30px brush tip. It can be buggy with slopes. I will rework it one day. https://script-daddy.github.io/CanvasBitCup/