Why does it look pixelated with Flash?

Monkey Targets Forums/Flash/Why does it look pixelated with Flash?

nori(Posted 2013) [#1]
While ok in other targets, compiled to flash my game looks really broken. Like scaled down and up with cheap interpolation. Am I doing something wrong?

I've added
#FLASH_QUALITY="HIGH"
and tested some <embed> wmode settings, but it always looks like broken by purpose.

Afaik Flash can do GPU accelerated nice graphics since version 11, can monkey produce such code? Or anything decent..


programmer(Posted 2013) [#2]
Screenshot? #MOJO_IMAGE_FILTERING_ENABLED=True?


nori(Posted 2013) [#3]
Thanks, I've added this line too. Compiled it and did screenshots. Using flash results in different size for some reason, but it's looking jagged no matter what size I set for the flash element, and no matter if I do scaling in monkey code or not.




programmer(Posted 2013) [#4]
Hm... It should look the same. Did you change the width/height of <embed> in yourgame.build/flash/MonkeyGame.html and forget to change SWF dimensions in yourgame.build/flash/MonkeyGame.as ([SWF] tag)?


outsider(Posted 2013) [#5]
Hi, you can try my solution, last post:
http://www.monkeycoder.co.nz/Community/posts.php?topic=3912


nori(Posted 2013) [#6]
@ outsider
Hi, thanks for this, tried it and it improves the resulting image to some point. Though, now it's blurred instead of jagged. It looks not as good as any reasonable downscaling, though I tried virtually all these embed attributes that adobe provides. If I omit any scaling, the problem is gone, but that actually means that I had to design everything for let's say 640x480. I think, as long as there's no GPU-like scaling, I'll forget about flash.

And I had to multiply the <embed> size by 1.2 to get the original scene size, it seems there's always this inner margin added, I don't really understand this.

@ programmer
Oh, I did not change anythig there, will try this.


outsider(Posted 2013) [#7]
@nori: I forgot to say that I'm using virtual resolution (from diddy).


Sensei(Posted 2013) [#8]
Have you tried using Autofit?
I'm not at home right now, but I can do a Flash compile of my current game tonight and see if I get the same issues and let you know.

Also which version of Monkey are you using?


nori(Posted 2013) [#9]
I'm using 75d. I've used autofit but went on with "multiplying the values myself" without autofit. I assumed if GLFW and HTML5 targets display it the right size, the Flash target should do so too? But it didn't, and there's still that 640x480 (default?) value in the [SWF] tag, I will try changing this now. Maybe this scales everything down to 640x480 first, this might explain my problem. (I've designed my game with 1920x1200, thought it might even be worth considering the Iphone Retina resolutions.)

@ your game: It would be helpful too see if someone can manage to make Flash scale (down) nicely at all. Wow @ your website, I *love those colors and dithers :)


nori(Posted 2013) [#10]
Hm... It should look the same. Did you change the width/height of <embed> in yourgame.build/flash/MonkeyGame.html and forget to change SWF dimensions in yourgame.build/flash/MonkeyGame.as ([SWF] tag)?


This was the problem, now it looks good! Thanks! For anyone else with the problem and reading this thread: The dimensions in these .as and .html files must match and then you have to recompile. #:)


thoast(Posted 2014) [#11]
Setup your config to use the Flash Debug Player (Windows: X:\flex_sdk_X.Y\runtimes\player\11.1\win\FlashPlayerDebugger.exe), to see the real resolution when running your app. Dont know if there is something comparable on macos.