How to fix blurry sprites / BGs in Ren'Py?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
chibiansem02
Newbie
Posts: 21
Joined: Sun Sep 01, 2013 1:51 am
Contact:

How to fix blurry sprites / BGs in Ren'Py?

#1 Post by chibiansem02 »

I'm so sorry if this is in the wrong spot ._.

I'm fairly new to Ren'Py and have been coding a game for roughly one week, however I seem to be having some sort of scaling problem.

My sprites look crisp and clean in all other programs, but when I add them to Ren'Py and launch my project, both the sprites and backgrounds appear a tiny bit blurred. It's not SUPER noticeable, but I'd like it cleared up, if possible :(
The images are blurry in fullscreen mode as well as normal.
My BG images is a .jpeg that is 1000 x 692
Sprite is a .png that is 400 x 580 (this seems a bit small to me, but if it is any larger it doesn't seem to fit properly in the window i.e. head gets cut off)
I used Gimp to scale the images, if this matters.

None of the text is blurry, only the images I have added.
Do most games run in fullscreen, or no?
Does anyone know what I'm doing wrong? (Most likely something really obvious ;A;)


Thank you!!!!

User avatar
chocojax
Miko-Class Veteran
Posts: 705
Joined: Sun Oct 25, 2009 11:27 am
Projects: Umbra, Familiarity, Maleficent Justice
Tumblr: chocojax
Location: California
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#2 Post by chocojax »

Uhh, I think it would be better to have the sprite's height be the same height as your window (you can check the width/height of the VN window through options.rpy), but I'm not sure if it automatically resizes it to the window's height or just keeps it scaled, or something.

A screenshot would be helpful for other people to help you, I think.

chibiansem02
Newbie
Posts: 21
Joined: Sun Sep 01, 2013 1:51 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#3 Post by chibiansem02 »

By window, do you mean the sizing information below?

## These control the width and height of the screen.

config.screen_width = 800
config.screen_height = 600

Is what is says under options.rpy.
I read somewhere that an ideal BG image is roughly 800x600 and an ideal sprite is roughly 300x600.

It actually seems to have fixed itself after I restarted Ren'Py, which is really odd.... however now the background on my transparent .png's are no longer transparent O_o

What a n00b... I'm so very sorry... The background of the sprite is the classic two-toned grey boxes that shows the BG is transparent, but these boxes cover the BG image now?

User avatar
chocojax
Miko-Class Veteran
Posts: 705
Joined: Sun Oct 25, 2009 11:27 am
Projects: Umbra, Familiarity, Maleficent Justice
Tumblr: chocojax
Location: California
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#4 Post by chocojax »

chibiansem02 wrote:I read somewhere that an ideal BG image is roughly 800x600 and an ideal sprite is roughly 300x600.
I suppose so, although the sprite width could just be fitted to the actual image. Just told you to check so that you could appropriately resize/crop your background. :O
chibiansem02 wrote:What a n00b... I'm so very sorry... The background of the sprite is the classic two-toned grey boxes that shows the BG is transparent, but these boxes cover the BG image now?
No need to apologize when you're having trouble. :O

Umm, that's pretty weird. Are you sure it isn't because of GIMP? (I would assume not, but, it's possible. Either that, or you accidentally left some opaque colors on a different layer, etc.)

Have you tried seeing if it works if you place it on top of a black background in GIMP? (Also, take some sort of screenshot so that we have a visible idea of what's going wrong. Maybe some people will recognize it, etc. Just upload it through your post.)

chibiansem02
Newbie
Posts: 21
Joined: Sun Sep 01, 2013 1:51 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#5 Post by chibiansem02 »

Thank you so much!

The transparency works in Gimp (I copied and pasted the sprite with transparent BG onto a black page and the BG is indeed transparent, but when I place the file into the Ren'Py game folder and launch the project, the sprite has the checker pattern which blocks out the BG image.)
So it seems it is transparent, but for some reason ren'py thinks it's not..?

I'm trying to figure out how to upload a screenshot of what's going on, unfortunately I've never done so and am a bit lost TT_TT

chibiansem02
Newbie
Posts: 21
Joined: Sun Sep 01, 2013 1:51 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#6 Post by chibiansem02 »

Gaaah! The images are blurry again for some reason... perhaps they simply looked better for a moment, when I reopened the project they seem to be a bit distorted once more.

I am trying to upload a picture of the original sprite, and what it looks like within the project...

chibiansem02
Newbie
Posts: 21
Joined: Sun Sep 01, 2013 1:51 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#7 Post by chibiansem02 »

Ren'Py Screen.JPG is what is coming up in the project


Raven Sprite - Normal.png is what the sprite looks like normally (as far as clarity)

Hopefully my images work O.O"
Attachments
Ren'Py Screen.JPG
Raven Sprite - Normal.png

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#8 Post by Elmiwisa »

Image do not automatically scale to fit window when it is at the default size. So having background image that is of the wrong size just means that it will fails to cover part of the window (if the image is smaller) or that part of the image won't be show (if the image is bigger).
If the window is resized, or the game is in full screen, then the image will be re-scaled in a way that preserve aspect ratio with the scaling factor dependent on the new size and the original size. You can disable both fullscreen mode and resizing by setting default mode to window, removing the options to change it to fullscreen in the preference screen, and make sure to set config.gl_resize=False.
Back to your original question...I don't see any blurriness at all. Perhaps I am not the best eyes for this... :oops:

User avatar
chocojax
Miko-Class Veteran
Posts: 705
Joined: Sun Oct 25, 2009 11:27 am
Projects: Umbra, Familiarity, Maleficent Justice
Tumblr: chocojax
Location: California
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#9 Post by chocojax »

(Try to keep your posts to just one, so that you won't spam your own thread. :P)

Oh, don't worry. When you have a transparent BG, it'll show a checkerboard pattern (imitating Photoshop and many other image editors). Your sprite is also pretty transparent, so no problem there.

Not sure why the sprite's blurry, though. Hopefully someone helps you out there.

chibiansem02
Newbie
Posts: 21
Joined: Sun Sep 01, 2013 1:51 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#10 Post by chibiansem02 »

Haha, yes sorry about that as well, I had just figured out how to take a screen shot AFTER posting... (I'm on a very new computer, if that isn't already painfully obvious).

As far as blurriness goes, I've asked a few others in my apartment if the images look blurry, and they're telling me no.
My vision isn't the greatest at the moment due to side effects from a medical procedure, so maybe I'm just being a bit OCD when it comes to image quality as Elmiwisa seems to think the images are fine as well. :)

So seeing a checkered pattern rather than the background art is normal? Will this "fix" itself when the games is actually finished somehow?
It's a bit hard to test things out when all of the BGs are checkered haha.
I'm just a bit confused, how do I know the background images are there? (I know they are, I'm just wondering if it's normal for the checkerboard pattern to be there the entire time the game is being coded or if it's something I need to fix now rather than later)

Sorry for all of the questions ^^"

chibiansem02
Newbie
Posts: 21
Joined: Sun Sep 01, 2013 1:51 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#11 Post by chibiansem02 »

Sorry for double posting, I'm wondering if I should create a separate thread regarding the question of the checkered background still showing up when I hit launch project as this one is for the blurry images?

I don't want to get in trouble for being in the wrong place >_<

Thanks to all of you!

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#12 Post by Elmiwisa »

Checkered background is always there, but it is behind every other image you have, including background image. Its purpose is to show that you failed to cover the window completely with background image. As long as you have any background image that cover the window, it will hide the checkered background.
So if you don't see your own background image there, check to make sure that you put something in your script that cause that background image to be shown.
Something like this for example:

Code: Select all

image bg forest="background_forest.jpg"
label start:
    scene bg forest
It is covered in the tutorial

User avatar
Badriel
Regular
Posts: 66
Joined: Mon Jul 23, 2012 1:10 pm
Completed: Clockwork City
Tumblr: badrielart
Deviantart: badriel
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#13 Post by Badriel »

chibiansem02 wrote:Haha, yes sorry about that as well, I had just figured out how to take a screen shot AFTER posting... (I'm on a very new computer, if that isn't already painfully obvious).

As far as blurriness goes, I've asked a few others in my apartment if the images look blurry, and they're telling me no.
My vision isn't the greatest at the moment due to side effects from a medical procedure, so maybe I'm just being a bit OCD when it comes to image quality as Elmiwisa seems to think the images are fine as well. :)

So seeing a checkered pattern rather than the background art is normal? Will this "fix" itself when the games is actually finished somehow?
It's a bit hard to test things out when all of the BGs are checkered haha.
I'm just a bit confused, how do I know the background images are there? (I know they are, I'm just wondering if it's normal for the checkerboard pattern to be there the entire time the game is being coded or if it's something I need to fix now rather than later)

Sorry for all of the questions ^^"
You've probably resized the game window manually. Enter options and click 'window' in the display properties. I think it should fix that.

chibiansem02
Newbie
Posts: 21
Joined: Sun Sep 01, 2013 1:51 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#14 Post by chibiansem02 »

Elmiwisa thank you for your reply, I do have a background image there and it does cover the full window of the game, however this checkered background still seems to be appearing in front of it.

Here is the code I have in the script for the BG image:

# The game starts here.
label start:
scene Raven Bedroom
play music "Calm BG Music.mp3"

The image is defined as image Raven Bedroom = "Raven Bedroom.jpg"

After that there are 2 lines of dialogue before the sprite I posted shows up, and the background comes up fine as long as there are no sprites in the frame.

This is very confusing @_@

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: How to fix blurry sprites / BGs in Ren'Py?

#15 Post by Elmiwisa »

Do you mind posting the full code here? Or script.rpy at least, assuming you did not change anything significant in the other files.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]