2
\$\begingroup\$

I'm creating a 2D game for mobile touchscreen devices, specifically Android and iOS. I would like to know what is the best way (regarding performance and best practices) to manage sprite sheets.

Should I create different sprite sheets (for ldpi, mdpi and hdpi) and then scale according depending on the screen resolution or there is a better solution?.

I know that maybe the solution that someone could provide me would be platform independant but I'm using the NME framework (http://www.nme.io/), perhaps you know a good solution using this framework.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

There are solutions to this question all over the web. Android documentation gives an excellent series of tutorials on this subject. Specifically:

http://developer.android.com/training/displaying-bitmaps/index.html

These same principles can be applied to the 2d textures you are a using for your openGL objects. Although, I have never worked with openFL bitmap manipulation is handled in android using

 ByteBuffer class and BitmapFactory 

which imports from

android.graphics 

and not

javax.microedition.khronos.opengles.*;
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .