![]() ![]() In that case, I'd probably need to find a way single out specific animation frames to draw. Projects in making: Area to place items I am currently working on. Tutorial Games/Kits: (Items like Crash Coarse and other online Stencyl tutorials) Recreated Games: (Recreated games like super Mario and legend of zelda and other NES games and their recreated kits). Another option is to do what I did during testing: create an empty actor on the location of the first actor and draw the altered bitmap to that, and hide the original actor. This way we can sort out what is in them into whatever categories we want to have. In the second scene, pressing 1, 2, or 3 will toggle the values of the Red, Green, and Blue channels of the actor between 0 and their original values. In the first scene, pressing space will invert the colors of the second actor. It might be better to store the original bitmap information somewhere, but in that case, I wouldn't know how to restore it when leaving a scene. Testing the palette swapping abilities of Flash using BitmapData.paletteMap(). I could try to rig a fix by remembering the colors of the last palette, and drawing over the top of those each scene, but I doubt that's the simplest solution. ![]() ![]() This is a big problem if I want to use different palettes in different scenes. Once you've drawn to a bitmap, it stays that way. The most significant issue, however, is that changes made to bitmaps persist until the game is closed. I think this could theoretically be fixed by cycling through all of an actor's animations when it is created. There is also occasionally a bit of a latency problem Sometimes, the first time or two that an animation is displayed, some of the original image's frames will flicker visibly. There are, however, still some problems! Issues come up when my original image has colors in common with any of the palettes, but that's just my own carelessness. Notice that the first loop is no longer based on "width of self," but "width of self times frame count for self." I've attached my current Palette Swap behavior, which is somewhat functional. Right now, if I want to make use of a palette swap, Ive been using a different set of graphics for each palette. That's why I could only draw to the first frame of any animation: I was only drawing to an area that was the same height and width as my actor. But what I've inferred from this is that all of an animations frames are stored, side by side, in the same bitmap object. Now, I don't have many actors in my game that have more than two frames in any single animation, and the new blank actor was only twice as wide as my typical actor. What this revealed was truly enlightening: Both of the first actor's animation frames, still, side by side. I have, however, made a massive breakthrough.ĭuring my attempts to work around the inability to draw to _framePixels, I wrote a behavior that created a new actor (at 0, 0) that only had a single frame of animation, and to copy this actor's Pixels onto the new actor's. Yeah, I chose palette swap for the reason that its simpler than a color matrix (I have no idea) and works with non-contiguous pixels of the exact same color. quadruple-post, but I have a confession to make. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |