views:

22

answers:

2

Hey,

I'm a developer on nice space MMO using Flash. On new PCs performance is quite good, but some features shouldn't be enabled on older PCs because the framerate drops to shit if we do. Flash wasn't made for this, but hey, pushing boundaries is fun.

An example is fullscreen mode. Of course every user can manually enable it, but "advertising" it to a user with and oldie PC would be a bad idea - but for the Alienware crowd it would be dumb not to.

So I want to find out how "capable" a user's PC is to decide if I should enable or disable some features for him. Any ideas?

Thanks, Sujan

A: 

In my experience most of the time Memory is the bottle neck. May be you can check available free memory if it is more than what you need you can allow operation. Similarly you can check CPU, CORE-Size, etc to make it more sophisticated.

there are no APIs for that in flash. at all.
back2dos
+1  A: 

well, you can simply benchmark the machine. usually, the things that hit performance the most are rendering, which is basically vector and bitmap rendering.

  • bitmap performace: create sufficiently large BitmapDatas and fill them with perlinNoise. copyPixels between them and draw them into each other, using ColorTransform and Matrix. try especially rotation and semi-transparency. applyFilters to them.
  • vector performace: create a Shape and draw tons of graphics into it. try big plains, lots of lines, semi-transparent & gradient fills and strokes. To force rendering (Flash Player uses delayed rendering), draw the Shape into a BitmapData

if your game does a lot of calculation and logic, then you'll also need to benchmark the speed of function calls and arithmetic operation.

you should benchmark only the things that are actually used by your game. Look how long which operations take on a good machine. And try to get a good idea about how they relate with the features that you can turn off to save performance.

greetz
back2dos

back2dos