SetColor Lag
Monkey Targets Forums/HTML5/SetColor Lag
| ||
Not sure if anyone else if have this problem, but when I'm moving sprites around onscreen and I have SetColor at about 100 or less on all three channels, I get lag. If I SetColor 255,255,255 then the lag disappears. Any ideas? |
| ||
I think SetColor is expected to be slow in html5. When you set to 255,255,255 you do not use SetColor on images. You can do the set color in a loading phase and use copies of those textures later. Not sure why this is, but I think it was something inert to html5. |
| ||
The current version of SetColor is pretty slow on HTML5. There are multiple ways of doing it. Awhile ago Joe @ PlayMyCode posted this: http://www.playmycode.com/blog/2011/06/realtime-image-tinting-on-html5-canvas/ |
| ||
@therevills: IIRC, that technique is similar to the one Mark is already using in Mojo. |
| ||
I've been using SetColor in HTML 5 and the speed was just fine. Now, with the latest Monkey version, my game slows down bigtime. so yes, it seems there is something going on. |