DEV Community

Cover image for Adding images in Ren'Py - part 1
Coding Fatale
Coding Fatale

Posted on • Updated on

Adding images in Ren'Py - part 1

This article covers the basics on how to add images in Ren'Py for a visual novel. Stock or custom images can be used.

Things to have

  • Images to use (backgrounds, cursor, sprites, etc.)
  • Photo editing software.

Adding a image

Take the image selected and locate the image folder in the project. Store the selected image in the folder. The bg tag is the naming convention for background images in the Ren'Py documentation. Suppose we have a image of that we want as a background with some narration.

    scene bg location

     "Where am I? "

    "I look around my surroundings."
Enter fullscreen mode Exit fullscreen mode

For more customization, lets add a custom image as the cursor. I have placed a image for the cursor in the gui folder. Use the config.mouse

define config.mouse = { }
define config.mouse['default'] = [ ( "gui/cursor.png", 0, 0)]
Enter fullscreen mode Exit fullscreen mode

Here is code snippet that uses a background and custom cursor.

define m = Character("myCharacter")
define config.mouse = { }
define config.mouse['default'] = [ ( "gui/cursor.png", 0, 0) ]

label start:

    scene bg location

    "Where am I? "

    "I look around my surroundings."


    return
Enter fullscreen mode Exit fullscreen mode

Things to consider

When adding images make sure the size is appropriate. Use editing tools to scale images if they are not the correct size you want for the game. There are free assets that are already scaled by default that you can use for a visual novel.

Top comments (0)