Author Topic: anti aliasing  (Read 1937 times)

Dinofly

  • Member
  • **
  • Posts: 5
  • Karma: +0/-0
    • View Profile
anti aliasing
« on: Tue, Oct 19, 2010 »
Hello everyone,

I am making a pixel game that goes at high speeds. From time to time, the whole screen "jumps" or gives the impression of jumping. I have two paralax backgrounds at the current time and I am NOT using Flixel.

The reason why I am posting here, is to ask if you have encountered this problem before, and how does flixel solve it, if it is solved ? :)

krix

  • Member
  • **
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: anti aliasing
« Reply #1 on: Tue, Oct 19, 2010 »
Hm,
the topic is a bit misleading since it has nothing in common with your question.
Your problem could have something to do with the memory handling in your game.
Maybe the garbage collector starts every x seconds, causing that lag!?
I don't know. Since you're not using flixel, I can not tell for sure.

I'm working on something similar at the moment (in flixel) and everything looks smooth for me.

Cheers,
Dirk

Dinofly

  • Member
  • **
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: anti aliasing
« Reply #2 on: Wed, Oct 20, 2010 »
Yup, topic might be mislead a bit :) just had a friend that told me that's the problem.

I doubt it's a memory problem, since when I switched from 30 fps to 60 fps, I had the problem a lot less often, everything was much smoother, and I am calling the gc around 2 times/second.

I'll play with it a bit though :) , thanks for the suggestion.

Dinofly

  • Member
  • **
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: anti aliasing
« Reply #3 on: Wed, Oct 20, 2010 »
Any other suggestions are welcome as well, so far from playing with the gc there are no changes.

NoobsArePeople2

  • Member
  • **
  • Posts: 55
  • Karma: +0/-0
    • View Profile
Re: anti aliasing
« Reply #4 on: Thu, Oct 21, 2010 »
How are you calling the garbage collector in Flash?

Dinofly

  • Member
  • **
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: anti aliasing
« Reply #5 on: Thu, Oct 21, 2010 »
System.gc();

Is there any other better way to call it ? :)
Or is there anything specific you had in mind regarding the calling of it ?

NoobsArePeople2

  • Member
  • **
  • Posts: 55
  • Karma: +0/-0
    • View Profile
Re: anti aliasing
« Reply #6 on: Thu, Oct 21, 2010 »
System.gc();

Is there any other better way to call it ? :)
Or is there anything specific you had in mind regarding the calling of it ?

From the docs:

Quote
For the Flash Player debugger version and AIR applications only.  In an AIR application, the System.gc() method is only enabled in content running in the AIR Debug Launcher (ADL) or, in an installed applcation, in content in the application security sandbox.

In other words this won't work for 99.99999% of people playing your game.

Additionally, gc is super slow and should be avoided at all costs by employing things like object pooling.

TheZorg

  • Member
  • **
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: anti aliasing
« Reply #7 on: Thu, Oct 21, 2010 »
Are you using BitmapData.draw()? If so, you might want to read this: http://pixelpracht.wordpress.com/2010/07/06/drawing-api-memory-leak-in-flash-10-1/.

I had a similar problem when using Flixel's FlxEmitter, and wrapping the BitmapData object into a Bitmap did the trick  ;)

Dinofly

  • Member
  • **
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: anti aliasing
« Reply #8 on: Thu, Oct 21, 2010 »
Hey guys.
Thanks for all the support so far...

Unfortunately, I'm not using the bitmap data, and the application/game is not running on AIR.

I am using a class that extends another class, that extends another class, that extends a sprite, and inside that, I have another sprite which represents the movieclip.