Status
Not open for further replies.

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,350
Reaction score
1,842
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,548
Reaction score
16,083
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,198
Reaction score
5,997
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 Posts

Latest Profile Posts

I have been enjoying a game on my iPhone, called Wonderbox. It is just a little game where you create adventures, share them, whilst also being able to play others. It's a bit zelda-esque. I have started some youtube for those, gonna start with RPG maker things soon as well. So if you wish to see, do check it out :)
SF_People3_3 added!
index.php

ScreenShot_1_3_2022_1_32_12.png
I feel QSprite for MV is underrated. I basically am able to use my chibi sideview battlers I drew on the maps and have all the motions available. this'll help a lot with cutscenes.
I've figured out how to reasonably tall-ify chibi sprites on my editor. I like that making tall sprites gives me control on expressing how tall characters seem on the field relative to each other as well as better differentiate adult sprites from child sprites.
doing some wacky experimental stuff in MV right now :kaoluv: I cannot wait to drop what I've been working on

Forum statistics

Threads
118,561
Messages
1,116,951
Members
155,602
Latest member
TimeTurner
Top