Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7824443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:35:58+00:00 2026-06-02T08:35:58+00:00

The situation is as follows. Currently i’m developing an AIR game that will contain

  • 0

The situation is as follows. Currently i’m developing an AIR game that will contain plenty of bitmap assets. I’d like to target several tablets (iPad, Xoom, others) and, thus, am considering having the assets done in different ppi, so as to have more visual consistency across the devices. I’m not concerned much about the resolution, because i’ll be using scrolling for assets that don’t fit on the screen; but units, buildings, enemies should look pretty much the same regardless of the device.

The question is:

  • can this be done and how (packager-based?)
  • what would be the best way of doing this
  • should i even bother?

The only thought that comes to my mind so far is to have an application file for each device being targeted (or ppi, actually), that pulls a big bitmap-registry that corresponds to the ppi of the device. The static registry class is essentially the same for all of these applications differing only in the filename that [Embed] points to (and the classname obviously).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:35:59+00:00Added an answer on June 2, 2026 at 8:35 am

    I think you are on the right track, if you wanted to have specific sets of assets for each device type. The way that I’ve done this in the past is to use a rake script, but any make-like/ant-like utility that you are conformable with will do. Essentially, one of the tasks that runs before the project compilation is to dig through the file structure and programmatically build up these helper classes; it helps avoid the monotony of constructing these mappings by hand. Which can be mind-numbing once you get a non-trivial set of assets.

    In my project I would have a structure like this:

    /ProjectRoot
        /src
    
        /imgs
            /132dpi
                /unit1.jpg
                /unit2.jpg
                .
            /160dpi
                /unit1.jpg
                /unit2.jpg
                .
            /264dpi
                /unit1.jpg
                /unit2.jpg
                .
            /326dpi
                /unit1.jpg
                /unit2.jpg
                .
    

    I would usually have some interface which all my assets would abide by, something like

    public interface IAssetSet {
         function get DPI():uint;
         function get Unit1():BitmapData;
         function get Unit2():BitmapData;
    }
    

    The script would run scrape the folders/files and generate actionscript classes in folder like /src/assets. Stuff like

    public class AssetSet132dpi implements IAssetSet {
    
        public function get DPI():uint { return 132; }
    
        [Embed("img/132dpi/unit1.jpg")]
        private var _unit1Class:Class;
        private var _unit1:BitmapData;
        public function get Unit1():BitmapData { return _unit1; }
    
        [Embed("img/132dpi/unit2.jpg")]
        private var _unit2Class:Class;
        private var _unit2:BitmapData;
        public function get Unit2():BitmapData { return _unit2; }
    
        ...
    
        public function AssetSet132dpi() {
            _unit1 = BitmapData(new _unit1Class()).bitmapData;
            _unit2 = BitmapData(new _unit2Class()).bitmapData;
            ....
        } 
    }
    

    In your initialization code, you determine what device you are running on or you precompile only for specific devices, and instantiate the dpi you want. Everywhere else in your code you just pass around references to IAssetSet, and figure out what to do based on IAssetSet.DPI.

    That is one approach, but there are others.

    Another approach, would be store embed your source images at the highest DPI and then on application load, downscale them in memory to the desired DPI and dispose() the originals.

    Another approach, which is more viable these days with Stage3D and frameworks like Starling and nd2d, you can get away with letting the GPU — which is really good at doing this scaling — do most of the heavy lifting that really feasible with traditional compositing.

    I think, if you are using traditional compositing, then you will probably seem some performance boosts using assets specifically sized to what you need, rather than trying to dynamically size them all the time. Flash can be a little weird sometimes about regenerating internal representations of those assets at strange times and tanking performance. Probably the best approach would be to leverage Stage3D/Starling/nd3d, but if you have a non-trivial codebase built up, it will probably be a non-trivial task to switch rendering engines at this point in the game…

    At least, those are my two cents. Maybe somebody else has had a different experience.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation as follows <body> Test<br /> test<br /> test1<br /> </body>
Our situation is as follows, but I'm curious about this problem in any situation.
The situation is as follows: A series of remote workstations collect field data and
The situation is as follows: I've got 2 models: 'Action' and 'User'. These models
My situation is as follows: I'm working on an implementation of BlackJack. I've got
Picture the following situation. I have an XML document as follows, <Form> <Control Type=Text
Situation: I have a database that contains sales records, each record has a ID
Situation: I have a simple XML document that contains image information. I need to
I am developing a web application in asp.net vb. My current situation is, I
I've heard that pressing the back button will essentially cause the current Activity to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.