Resolutions and character crashes

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.
Post Reply
Message
Author
billynoeyes
Newbie
Posts: 18
Joined: Thu May 03, 2018 7:13 am
Contact:

Resolutions and character crashes

#1 Post by billynoeyes »

Hello,

Complete scrub here.

I made a char, which is a image with the backgroudn removed. When It comes time to load it in my story (its my only char), game crashes.

Second question is: how does resolution work? I have my hame set to 1080p, but if I accidentely use a larger resolution background it zooms in a lot. This makes me worry that any hd chars I use are gunna be massive.

Help?

Thanks!

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Resolutions and character crashes

#2 Post by kivik »

Hi there, welcome to the forum!

To help us figure out the thousands of possible reasons your game crashes - sharing the error messages when the game crashes will really help us :) With more information, in this case: what is the file format of your image? You said your HD chars are going to be massive - what resolution was it?

Now to talk about resolution - your game basically runs as a specific resolution - in your case 1080p, which is 1920x1080 pixels. This means any images you put in that's larger than that - they get cropped to 1920x1080 - hence the zoomed effect - because the outer part of the images are cropped out.

So instead of just dumping your images into the game folder, you'll want to resize them first - make sure your background images are exactly 1920x1080. Crop them if their aspect ratios aren't right.

Your character images on the other hand, should be png files with transparency - so they'll show on top of your backgrounds. They also need to be smaller than 1920x1080. Typically character portraits should be... well portraits - taller than they're wide. So you shouldn't have to worry about the width, but you need to resize them down so the height is within the 1080 pixels limit of your game's resolution.

The best thing to do, is to make a screenshot of your game at full resolution, then resize your character images to fit inside and to "look about right". Now measure the maximum height your characters should be, and create a character image template (in GIMP or Photoshop). Since you're using existing pictures with erased backgrounds - you'll want to dump all your characters in this template and resize them to make sure they all look in proportion (so one character isn't much bigger than another), but within the confines of your resolution.

Some characters may need more width, that's fine, so long as they're not too tall.

Hope this was helpful!

billynoeyes
Newbie
Posts: 18
Joined: Thu May 03, 2018 7:13 am
Contact:

Re: Resolutions and character crashes

#3 Post by billynoeyes »

That is indeed very helpfull. I would happily resize my image ofc but that seemed really complicated from my preliminary google. Il post my error msg here, thanks for your help :)


Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 23, in script
    s "Wow... its huge!... How did you get a house like this?!"
Exception: Sayer 's' is not defined.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 23, in script
    s "Wow... its huge!... How did you get a house like this?!"
  File "E:\Fraps\Temp\Project\renpy-6.99.14.3-sdk\renpy\ast.py", line 624, in execute
    who = eval_who(self.who, self.who_fast)
  File "E:\Fraps\Temp\Project\renpy-6.99.14.3-sdk\renpy\ast.py", line 537, in eval_who
    raise Exception("Sayer '%s' is not defined." % who.encode("utf-8"))
Exception: Sayer 's' is not defined.

Windows-7-6.1.7601-SP1
Ren'Py 6.99.14.3.3347
Prac 1 1.0
Thu May 03 15:45:37 2018

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Resolutions and character crashes

#4 Post by kivik »

The message is saying that s is not defined as a "Sayer", in other words, you haven't created a character called s so you can't use it.

Have you gone through the tutorial game and read first section of the online documentation? It'll teach you the fundamentals of what you need to setup before using them, including characters, images, backgrounds, etc.

I strongly recommend you do that first :)

billynoeyes
Newbie
Posts: 18
Joined: Thu May 03, 2018 7:13 am
Contact:

Re: Resolutions and character crashes

#5 Post by billynoeyes »

ahhh, I did do the tut. My char is called adele, so I replaced s with a in the define, but then i used the already in there text when I gave her her first speech and forgot to replce s with a, if that makes sense. thank you!

Any advice for resizing images?
there are some games whre you can literally do it on the fly so why isnt it easy to do in software?

cheers <3

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Resolutions and character crashes

#6 Post by kivik »

Any advice you're looking for specifically? I've mentioned a fair few things above so it depends on what you're having issues with.

billynoeyes
Newbie
Posts: 18
Joined: Thu May 03, 2018 7:13 am
Contact:

Re: Resolutions and character crashes

#7 Post by billynoeyes »

At the time wanted to know how do easily resize images. Now I would like to know how to fix this error. I have set up menu succesfully before but the new one isnt working:

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 43: end of line expected.
    m "Come on Annie. Everything will be fine, I promise.":
                                                          ^

File "game/script.rpy", line 51: expected 'label_name_declare' not found.
    label: calm
         ^

File "game/script.rpy", line 56: expected 'label_name_declare' not found.
    label: scared
         ^

File "game/script.rpy", line 58: expected statement.
    showw annie norm at right
                     ^

File "game/script.rpy", line 63: expected 'label_name_declare' not found.
    label: progresscalm
         ^

File "game/script.rpy", line 68: Line is indented, but the preceding show statement statement does not expect a block. Please check this line's indentation.
    a "Wow it's... georgous! How did you get a house like this?!":
    ^

File "game/script.rpy", line 71: expected 'label_name_declare' not found.
    label: progress
         ^

File "game/script.rpy", line 114: expected 'label_name' not found.
    jump: anniecall
        ^

File "game/script.rpy", line 116: Line is followed by a block, despite not being a menu choice. Did you forget a colon at the end of the line?
    "Go to bed. Whats the point?"
                                 ^

Ren'Py Version: Ren'Py 6.99.14.3.3347
Thu May 03 22:11:38 2018

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Resolutions and character crashes

#8 Post by kivik »

You're making lots of syntax mistakes in your code judging by the error message. I'd strongly recommend you revisit the Online Documentation and compare your code to the examples to identify why they aren't work:

https://www.renpy.org/doc/html/quickstart.html

Regarding image resizing - are you asking what software to use? You mentioned you made a char which is an image with background removed - what software did you use for that? Find out from that software how to resize images.

If you didn't create the image, I'd suggest you try any free ones you can find, e.g. GIMP, Paint.net, even Window's own Paint software.

billynoeyes
Newbie
Posts: 18
Joined: Thu May 03, 2018 7:13 am
Contact:

Re: Resolutions and character crashes

#9 Post by billynoeyes »

I've got reisizing covered thank you. And ive poured over the tutorial code and cant tell what on earth im doing differently

billynoeyes
Newbie
Posts: 18
Joined: Thu May 03, 2018 7:13 am
Contact:

Re: Resolutions and character crashes

#10 Post by billynoeyes »

I solved it. Colons were in the wrong spot

Post Reply

Who is online

Users browsing this forum: Google [Bot]