So I am doing small game in android studio - java. And I was using 400x400 .png image as a ship. It worked well.
Bitmap.createScaledBitmap(BitmapFactory.decodeResource(context.getResources(),R.drawable.playermove),(int)(length),(int)(height),false);
I am using drawBitmap
to draw image on screen.
Now I want to use different ship. Only thing that I changed is that instead of this image I use another one that is 150x150 also .png and game becomes so laggy and sloopy.
Length and Height are 1/10 size of the screen. I have 8 ship pictures with similair dimensions and every one make game sloppy.
Any idea why those pictures make everything sloppy and first one doesn't?
question from:
https://stackoverflow.com/questions/65916915/one-image-works-fine-and-other-one-slow-code-so-much 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…