Flash Only Effects?

Jon

  • *
  • Posts: 17524
Have you tried using clone() or is that a shallow copy?


Jon

  • *
  • Posts: 17524
What about copyPixels?

rob1221

  • *
  • Posts: 9472
I'll try it, but I assumed it wouldn't work because setPixels doesn't.

EDIT: Nope, it doesn't work.  One solution I can think of is making a separate variable, but that would require tracking down all references to nmeBitmap of Tilesheet and replacing them with a function.

EDIT: Nice, the new tint implementation with drawTiles is actor-specific and does not have this problem.  It would still be good to fix the others though.

« Last Edit: September 10, 2013, 10:26:26 pm by rob1221 »

FortySe7en

  • Posts: 304
Indeed, I tried new effects today and was confused to see that 'saturation' would affect all actors of given type yet tint would only work on one actor (preffered).
EDIT: IT seems to me that tinting with WHITE does not work (but red or light green for example work).

« Last Edit: September 11, 2013, 12:05:20 pm by FortySe7en »

rob1221

  • *
  • Posts: 9472
Use the brightness filter if you want to tint white.

mguido730

  • Posts: 600
Yeah I tried tinting white at first as well and saw that it didn't do much so I went to brightness (only to find this bug soon after).
Matt Guido (@guidolatry)

Co-Founder/Programmer at The Automatic Gentlemen.

FortySe7en

  • Posts: 304
Problem is brightness affects every actor of said type, but I guess that's to be fixed.

rob1221

  • *
  • Posts: 9472
After looking into it some more I think I was wrong about the BitmapData problem.  I think setting a BitmapData to another one using clone() does work, but the reason I wasn't seeing any images change after that is because I disconnected the variable from the source stored in Tilesheet.cpp.

The reason I'm hesistant to commit the change I mentioned earlier is because it might increase memory usage, but I don't know for sure.  Unless someone can help me figure this out then that duplicate problem is going to remain unfixed.

EDIT: I looked at the code again but I really have no idea what is going on.  I suspect that the image data has to be changed in a C++ file, but I don't know which one, and even if I did I don't know C++ enough to figure it out.

For anyone who has tried the workaround I mentioned on page 2, have you noticed any decrease in performance?

« Last Edit: September 16, 2013, 04:05:50 pm by rob1221 »

rob1221

  • *
  • Posts: 9472
While I still don't know how to change the tilesheet's image data, I solved the duplication problem by replacing the tilesheet itself.  Download the newest beta version (about 15 min after this post) and check that there are no problems.

EDIT: I forgot to make sure it worked on higher scales.  Fixed.

« Last Edit: September 16, 2013, 07:56:11 pm by rob1221 »

sandsoftimer

  • Posts: 316
i just download new built & found that for iOS it is not fixed for same type actors.

i am using this effect.

« Last Edit: September 17, 2013, 02:50:35 am by sandsoftimer »
iOS ->          

Android ->
iOS -> Bubble Tapping
 Android -> Bubble Tapping

rob1221

  • *
  • Posts: 9472
I cannot reproduce this problem.  Post a sample game.

Just to be clear, the effect is NOT supposed to apply to all actors of the same type.  If that is what you are looking for, use the "for each actor of type" loop.

sandsoftimer

  • Posts: 316
Hey rob, no problem is there with latest build. may be i downloaded broken build of stencyl.
Really you fixed this problems.
iOS ->          

Android ->
iOS -> Bubble Tapping
 Android -> Bubble Tapping