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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:48:15+00:00 2026-06-10T02:48:15+00:00

I am developing a game in SurfaceView . It involves around 15 – 20

  • 0

I am developing a game in SurfaceView. It involves around 15 – 20 images of some are large having average resolution of 320X400. I have two questions-

  1. I am using images as Drawable and using draw(canvas) method of drawable to draw images on screen. I see in some games people use Bitmap instead of Drawable to draw images on screen, what is the difference between using images as Drawable or Bitmap in android game. Which is more memory efficient and which has good performance while drawing on canvas?

  2. Right now I am creating arrays of Drawable and creating Drawable object of all images used in game and putting them into there respective array, as all images are required while gameplay. I want to know which is better – loading all images in Drawable on start or creating Drawable Object when we need it and making null others that are not shown and repeating this process each time images are shown or removed from screen. Will repeating the process of creating and nulling objects have any bad effect or is it better than loading all images at once?

Thanks

  • 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-10T02:48:16+00:00Added an answer on June 10, 2026 at 2:48 am
    1. According to my experience Bitmap is faster than drawable. I’m testing an app that works at 40-45 fps with drawable and with bitmap I get 57-59 fps. That’s because people use them for games.

    2. If you have enough memory I recommend you to load all the images first. If you start creating and destroying objects it will call the garbage collector often and it’s really slow. If you don’t need a hight performance, create and destroy objects will reduce the use of memory. If you are trying to make a game maybe this link could help.

    Google I/O 2009 – Writing Real-Time Games for Android especially min 22:30 Fast java code

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

Sidebar

Related Questions

good day we are developing game for android and have some trouble with resource
I am developing an Android game and I have my SurfaceView rendering the game
I'm developing a 2d Game using Canvas/Surfaceview and have a problem with thread. So
I am developing a game.I have drawn images on a surface view which is
I am developing a game for iOS. The memory I am using is around
I am developing a Game in which sprite have to jump forward . I
I am developing game editor in c++.I have implemented reflection mechanism using DiaSDK.Now I
I am developing a game, well have an idea for a game and have
So I am developing a game and I want it to have background sound
I am developing a game and it's coming along quite nicely. I do have

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.