Status
Not open for further replies.

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,344
Reaction score
1,838
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi people!
I'm trying to achieve a way that will remove the smooth when stretching the image.

I'm making a game for mobile.
And in my tests, if I put the resolution to "any number 1104 x 720" The graphics look fine in several phones.
But the Rm Mv character looks really small using 720. I cannot change the character size because that would imply a lot of modifications in tilesets etc.
So, I tried to put it to a resolution smaller, like (1104 or 960) x 576.
And with both, the mobile phone stretches the screen making the fonts smooth and the tilesets and character too. But the size looks good!
Take a look:
AtFLssy.png

ONtOvyL.png

5Wjqfeo.png

9dVWoei.png

So, what can I do?
Any way to get around this?
 

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,547
Reaction score
16,077
First Language
Filipino
Primarily Uses
RMMZ
I could've sworn I added this to tips and tricks or js snippets but here you go.
Code:
//-----------------------------------------------------------------------------
// * Remove smoothing from graphics
//-----------------------------------------------------------------------------
Graphics._centerElement = function(element) {
    var width = element.width * this._realScale;
    var height = element.height * this._realScale;
    element.style.position = 'absolute';
    element.style.margin = 'auto';
    element.style.top = 0;
    element.style.left = 0;
    element.style.right = 0;
    element.style.bottom = 0;
    element.style.width = width + 'px';
    element.style.height = height + 'px';
    element.style["image-rendering"] = "pixelated";
    element.style["font-smooth"] = "none";
};
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,186
Reaction score
5,996
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

It's definitely discouraging when streamers give a try-to-say-it-nicely (i.e. bad) review of your game demo. It's like jumping into a cold pool. Bad initally, but it gets better with time. And you are now more alert and see better.
Some screenshots of the pub and lodging with the beginnings of clutter taking shape
TTp8uCw.png

jtC202e.png

bSXgyVl.png

eRx9PUF.png
Backgrounds are not my strong suit... :kaodes:
DazI8jt.jpg

Just realized I forgot doing the clouds... woops
Went to get some stuff for February 10, the birthday of my favorite ink monster...
I have a little one-person party for Bendy every year, complete with the life-size plushie I made. And yes, I bake a birthday cake!

Forum statistics

Threads
118,498
Messages
1,116,409
Members
155,493
Latest member
maxboop
Top