Skip to main content
Inspiring
November 30, 2012
Question

Solution to sharp GPU mode graphics?

  • November 30, 2012
  • 9 replies
  • 2588 views

Hi,

I am making an old school pixel game with lots of sprites and large backgrounds. Everything is in double size to get the right pixel style feel.

To be able to run it at 30fps on iPad 1 I am using GPU mode, but the problem is that everything gets blurry.

I can get around it by making the bitmapData double in size, but that limits the amount of characters I can have drastically since the memory run out fast.

I have tried setting the stage to low and only position sprites on exact x and y coordinates but it's still blurry.

Does anyone have a solution to this, or know that it can't be done?

Thanks in advance!

/Karl

This topic has been closed for replies.

9 replies

Known Participant
January 15, 2013

Thanks for responding TechyMyo - yes - it's a bit of a catch 22 this one.

If I leave as is - it runs blurry at solid 40 fps ( which is what it's set at)

If I dynamically redraw all the bitmaps myself on init then I get sharp bitmaps in GPU - running at about 33 fps

If I use CPU I get the sharp bitmaps without any effort - but it runs 35-38 fps.

If I re-write the game totally to use stage3d it'll run at 10000000 fps of course, but that stage3d is pretty hard for an intermediate like myself - even following an excellent tutorial like Christer's (linked below). Then I'd also have the annoying knock-on that the online version  would only run on about 20% of browsers as it's FP11 only.

http://active.tutsplus.com/tutorials/games/build-a-stage3d-shoot-em-up-sprite-test/

All this technical fluffing is in danger of distracting me from finishing the actual game itself now, as it is so easy to get sucked into these benchmarking tests forever ! I should be pleased there are so many potential ways to get 2d games onto mobile & brower as of 2013 (flash,starling,gamemaker,gamesalad,monkey,unity,html5,.. even *gulp* objective c) - but the oaf within me wishes it were 2003 again when I only had to choose between Lingo & Actionscript2.

I chose Lingo then - I feel like I'm on the verge on making the Same Wise Descision again !

Any direction on this would be welcomed - am interested to see what Karl ended up doing.

Inspiring
March 1, 2013

jerryJerryJerryJerry wrote:

Thanks for responding TechyMyo - yes - it's a bit of a catch 22 this one.

If I re-write the game totally to use stage3d it'll run at 10000000 fps of course, but that stage3d is pretty hard for an intermediate like myself - even following an excellent tutorial like Christer's (linked below).

Well, I read that even if you use the stage3d method, you would still get blurry bitmaps as it renders it like gpu mode does, so anything scaled up becomes blurry in stage3d, like with gpu.

And I would like to use stage3d as well and use big bitmaps instead of small which I resize so I don't get blur, but it's too complicated for me, so I'll just keep going with gpu/cpu and basic as3 coding like I've always done, thus I have very limited speed to work with. Too bad direct3d isn't more simple to use, then I wouldn't need to worry about speed and tons of optimizations.

Known Participant
January 11, 2013

Hi Karl,

Did you come up with a solution for this ? - I've got exactly the same problem & I'm having to go with CPU mode to retain the crisp look, and just take the drop in FPS on the chin.

I'm still holding out for a better solution though !

cheers..

-Jerry

Inspiring
January 15, 2013

I had/have the same problem and did a thread about it once. I ended up using highres gfx instead as I HAD to use GPU

http://forums.adobe.com/thread/1073432

Mark.fromOP
Inspiring
November 30, 2012

Are you using object smoothing? If so try turning that off.

Look for "Allow Smoothing" checkbox in the library object properties, or do it dynamically.

KarlCfsAuthor
Inspiring
November 30, 2012

Hi Mark, I have turned off smoothing on all bitmaps, but unfortunately that does not effect the blurry images when using scaleX=2;scaleY=2 in GPU mode.

Inspiring
November 30, 2012

If you are scaling the images, they are going to have loss.  You might have to play with it a bit, like increase the bitmap size slightly and scale less than 2 to find a good ratio.