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

  • Home
  • SEARCH
  • 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 4576146
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:09:51+00:00 2026-05-21T20:09:51+00:00

Hy, I made a game and I have some problems: when my resources are

  • 0

Hy, I made a game and I have some problems: when my resources are loading (images *.png) it’s taking too long then usual because in my console appeared new lines and I don’t know what’s mean:
RX=32K,RF=107.2K,FF=139.7M,OF=560.8K,OS=54.5M,ON=128.1K,OR=0,FR=10K,TR=6.1M,RR=0,IS=13.8K
RA=48.5M,RS=44.7M,RN=61K
TA=11.8M,TS=9M,TN=31.5K
PA=832K,PS=832K,PN=6.2K
R0=207M,1=800.2K,2=24K,3=82.3K,4=2.1M,7=210.7K,8=3K,9=46.5M,10=19.8K,11=42.3K,12=303.2K,13=85.4K,15=338.7K,20=3.9K,21=524,22=61.2K,23=87.3K,24=16.5K
VM:-RR

and the code above it’s repeating several times.
Does anybody know what it’s mean. I mention that I loading, resizing, and drawing a lot of pictures (like 100) to anime some animals and shot them. And sometimes my screen is freezing because of this:
JPGENC 78 ms
JPGENC 7 ms
JPGENC 0 ms
JPGENC 70 ms
JPGENC 0 ms
JPGENC 0 ms
JPGENC 70 ms
JPGENC 0 ms
JPGENC 7 ms
JPGENC 54 ms
JPGENC 7 ms
JPGENC 0 ms

I used this method to resize:

public static Bitmap resize(Bitmap png, float  scaleX, float scaleY){

    Bitmap testBitmap = new Bitmap((int)(png.getWidth()*scaleX), (int)(png.getHeight()*scaleY));
    int[] argb = new int[testBitmap.getWidth() * testBitmap.getHeight()];
    testBitmap.getARGB(argb, 0, testBitmap.getWidth(), 0, 0, testBitmap.getWidth(), testBitmap.getHeight());
    for (int index = 0; index < argb.length; index++) {
        argb[index] = 0x00000000;
    }
    testBitmap.setARGB(argb, 0, (int)(png.getWidth()*scaleX), 0, 0,(int)(png.getWidth()*scaleX), (int)(png.getHeight()*scaleY));
    png.scaleInto(testBitmap, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FIT);
    return testBitmap; 
}

and this to drawing:

Graphics graphics;
graphics.drawBitmap(int x,int y,int width,int height,Bitmap bitmap,int left,int top);

So, if anyone understood what I said, please help me. Thanks a lot

  • 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-21T20:09:52+00:00Added an answer on May 21, 2026 at 8:09 pm

    I suspect your screen is freezing, because you are doing too many heavy lifting on the UI thread.

    If you need to start a game, then it would be better to create (read, resize) all images before the game starts. You should try to avoid loading/resizing during the gameplay. For this you could create some game-initializing task that runs on a background thread under a popup saying smth like “Please wait, initializing…”. So the user is blocked with the popup and just sits and waits when you load/resize all your images. Then you hide the popup and actually start the gameplay.

    Another point is how you resize. There is a more efficient way to resize an image – it is possible to resize an image without the need to create a Bitmap object (which is large and slow in processing). Use EncodedImage instead. The BB API allows to load an image resource as EncodedImage. Then EncodedImage provides the API to resize itself. And finally Graphics has the API to draw an EncodedImage on itself.

    I hope my answer is helpful. Thanks.

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

Sidebar

Related Questions

I have a game that I have made in C# and it installs and
I have a Flash game I made way back in 2008. It runs super
I have a game server which is made in Java. I want to make
I have a silly little game that I made just for myself, but I
I have made this game for Mac OS, but I realised that i need
I have made a game, it is written in C++ and directX. When the
I made a Java Applet with some Standard GUI Components on it. I used
I made a discovery some time back. Just follow these steps: Create a .doc/.xls/.ppt
I made an html file called test.html then I navigated to it as http://site.com/test.html?test1=a
Almost every game use keyboard as input. I have been searching for 2 days

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.