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 6964545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:56:18+00:00 2026-05-27T15:56:18+00:00

im new to android gaming and started andengine and facing problem while using createTiledFromAsset

  • 0

im new to android gaming and started andengine and facing problem while using createTiledFromAsset
the code where im getting problem is

@Override
public void onLoadResources() {
    mBitmapTextureAtlas = new BitmapTextureAtlas(128, 128,
            TextureOptions.BILINEAR);

    BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");

    mPlayerTextureRegion = BitmapTextureAtlasTextureRegionFactory
            .createTiledFromAsset(this.mBitmapTextureAtlas, this,
                    "move.png", 0, 0, 10, 1);
    mEngine.getTextureManager().loadTexture(mBitmapTextureAtlas);

}

@Override
public Scene onLoadScene() {
    mEngine.registerUpdateHandler(new FPSLogger());

    mMainScene = new Scene();
    mMainScene
            .setBackground(new ColorBackground(0.09804f, 0.6274f, 0.8784f));

    player = new AnimatedSprite(0, 0, mPlayerTextureRegion);

    mMainScene.attachChild(player);
    return mMainScene;
}

im not getting the error as my BitmapTextureAtlas is of 128*128 and each tiled part coming from createTiledFromAsset should be of 78*85 as the passed arguments to it are 1 row and 10 columns and my source image is of 779*85 which means when the width is tiled to 10 parts then 779/10=78 approx which will be width of each tiled part and as row is 1 so 85/1=85 hence the width*height of each tiled part which is to be placed on the BitmapTextureAtlas is 78*85 and the BitmapTextureAtlas itself has size 128*128 then why the error saying Supplied pTextureAtlasSource must not exceed bounds of Texture
what is happening here …? or im not understanding the actual functions …? if im wrong then how the process of createTiledFromAsset is working……..?

  • 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-05-27T15:56:19+00:00Added an answer on May 27, 2026 at 3:56 pm

    If I understand BitmapTextureAtlas correctly, you are trying to put 779*85 image into the small space of 128*128. TextureAtlas is a large canvas on which you are supposed to place many images. These images are later accessed using object called TextureRegion, which basically specifies the size and coordinates of the smaller picture on the canvas. The method createTiledFromAsset probably copies the original image 1:1 onto the TextureAtlas and saves the coordinates of the tiles.

    Please note that TextureRegion has nothing to do with the image itself, it is merely a “pointer” to the place on TextureAtlas where the image is stored.

    To get the idea of what a TextureAtlas actually is, look at the awesome pictures at the bottom of this page:
    http://www.blackpawn.com/texts/lightmaps/default.html

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

Sidebar

Related Questions

Using my new Android phone established a small problem: I'm living in country A
I am new on gaming in android. I have to start my new project
i'm a new android developper and i'm getting a null pointer exception when i
I am a new android developer trying to code a widget.. The updatePeriodMillis parameter
I just started a new Android project, WeekendStudy to continue learning Android development and
So I started a new android project in my default workspace. Then I decided
I'd like to hack on my new Android phone using a Linux development environment.
I have been writing apps for my Droid x2 using the new Android update
I am new android and I would appreciate some help. I have this code:
While creating a new android project in eclipse 3.5, i have selected Android 2.1

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.