A Ren'Py main menu fading in over a night sky with drifting lights, then two buttons lighting up gold on hover, recorded in Ren'Py 8.6.1

The main menu is the first screen anyone sees, and the stock one says "I have not opened screens.rpy yet." Gray panel, teal line, title tucked into the corner. It works. It also looks like a few thousand other games.

This post turns it into the menu in the GIF above: music that fades in, a menu that fades in with it, a night sky with lights drifting up, a title that rises into place, and buttons that light up and click. It is one new file of under 80 lines. No image files to draw and nothing to install. Every block below ran in Ren'Py 8.6.1 before it went into this post, and the GIF is a recording of that run.

Side by side: the stock Ren'Py main menu on the left, the customized one on the right

0. Make the file

In your project, create game/title_menu.rpy. Start it with a comment:

# title_menu.rpy: a main menu with music, a fade in, a living background and buttons that answer back. 

This file defines its own main_menu screen, and Ren'Py uses it in place of the stock one from screens.rpy. I checked that with two file names in Ren'Py 8.6.1, title_menu.rpy and a_menu.rpy, and the new screen showed up both times. To keep things tidy, you can also delete the stock screen main_menu(): block from screens.rpy so there is only one. I ran it that way too: lint is clean and the menu looks the same.

1. Music that fades in

# 1. Music that fades in instead of starting at full volume. define config.main_menu_music = "audio/title_theme.ogg" define config.main_menu_music_fadein = 3.0 

Put your track in game/audio/ and point config.main_menu_music at it. Ren'Py loops it for as long as the menu is up. The fade in is in seconds. Three seconds feels like a curtain going up. Zero, the default, feels like someone turned on a radio in the next room at full volume.

Ren'Py keeps the title music playing when the player clicks Start. If your first scene should start quiet, fade it out at the top of the start label:

label start: # Fade the title music out as the story begins. stop music fadeout 2.0 

Or, if the first scene has its own music, play music "audio/chapter1.ogg" fadein 2.0 crossfades from one to the other.

2. Fade the whole menu in

# 2. Fade the menu in on launch, and fade back to it when the player quits to title. define config.end_splash_transition = Dissolve(2.0) define config.game_main_transition = Fade(0.5, 0.3, 1.0) 

Two different moments, two different settings:

  • config.end_splash_transition runs when the game first opens and the main menu appears. A two second dissolve from black, in time with the music.
  • config.game_main_transition runs when the player picks "Main Menu" from inside the game. Fade(0.5, 0.3, 1.0) fades to black for half a second, holds for 0.3, and fades the menu in over a full second. It reads as "chapter closed" instead of a jump cut.

3. A night sky with no image file

# 3. A night sky gradient, built from thin bands of color. No image file needed. init python: def vertical_gradient(top, bottom, bands=60): top, bottom = Color(top), Color(bottom) h = config.screen_height // bands + 1 return VBox(*[Solid(top.interpolate(bottom, i / (bands - 1.0)), xsize=config.screen_width, ysize=h) for i in range(bands)]) image title_sky = vertical_gradient("#0b1026", "#3a2a4d") 

Ren'Py has Solid for flat color but no gradient, so this stacks 60 thin bands of color, each a step between the top color and the bottom one. At 720p each band is 13 pixels tall and the steps are too small to see. Change the two colors and you have dawn, a sunset, or a very concerning green.

Then the lights. This is the same SnowBlossom particle system people use for snow, with one change: a negative yspeed, so the particles rise instead of fall.

# Lights that drift up the screen, like embers or lanterns far away. image title_light = Text("●", size=10, color="#ffd89a99") image title_lights = SnowBlossom("title_light", count=40, border=30, xspeed=(-15, 15), yspeed=(-60, -25), fast=True) image title_bg = Fixed("title_sky", "title_lights") 
  • The light is a text bullet in warm gold at about 60 percent opacity (the 99 on the end of the color).
  • xspeed=(-15, 15) lets each one wander a little left or right.
  • yspeed=(-60, -25) is pixels per second, upward. Slow enough that nobody gets dizzy on the title screen.
  • fast=True fills the screen with lights from the first frame instead of waiting for them to float up from the bottom.

Fixed stacks the sky and the lights into one image called title_bg.

4. A title that rises in, then breathes

# 4. The title fades and rises into place, then breathes slowly. transform title_reveal: alpha 0.0 yoffset 30 pause 0.8 easein 1.8 alpha 1.0 yoffset 0 block: ease 3.0 alpha 0.8 ease 3.0 alpha 1.0 repeat # The buttons slide in a beat after the title. transform buttons_reveal: alpha 0.0 xoffset -40 pause 1.6 easein 0.8 alpha 1.0 xoffset 0 

Reading the first transform top to bottom: start invisible and 30 pixels low, wait 0.8 seconds for the screen fade to get going, then rise and fade in over 1.8 seconds. After that the block dims the title to 80 percent and back every six seconds, forever. It is subtle on purpose. A title that pulses hard looks like a warning light.

The buttons wait 1.6 seconds and slide in from the left, so the eye goes title first, buttons second.

The title text gets its own style: big, warm, with a dark outline so it stays readable over the lights.

style title_text: font gui.text_font size 84 color "#ffe9c4" outlines [(3, "#1a1230", 0, 0)] xalign 0.5 style title_subtitle is title_text: size 26 color "#c9b8e8" outlines [] 

5. Buttons that answer back

# 5. Buttons with a warm hover color and a sound on hover and click. style navigation_button: hover_sound "audio/ui_hover.ogg" activate_sound "audio/ui_click.ogg" style navigation_button_text: idle_color "#c9b8e8" hover_color "#ffd89a" 

navigation_button is the style every button in the stock navigation (Start, Load, Preferences and the rest) already uses. A style block in a later file adds to the existing style instead of replacing it, so these lines only add the sounds and colors and leave the stock sizes alone. Because the navigation is shared, the buttons in the in-game menu get the same hover sound too.

Keep the hover sound short and quiet. Players sweep the mouse across a whole column of buttons, and a loud hover sound turns that into a drum solo.

6. The screen itself

# 6. The screen itself. This replaces the stock main_menu screen from screens.rpy. screen main_menu(): tag menu add "title_bg" vbox: xalign 0.5 ypos 120 at title_reveal text "[config.name!t]" style "title_text" text _("A story told by lantern light") style "title_subtitle" fixed: at buttons_reveal use navigation 
  • tag menu is copied from the stock screen. It makes sure opening the main menu closes any other menu screen.
  • add "title_bg" puts the sky and lights behind everything.
  • The title reads your game's name from config.name in options.rpy, so you never type it twice. Change the subtitle line to your own tagline.
  • use navigation pulls in the stock button column, wrapped in a fixed so the slide in transform can move it as one piece.

That is the whole file. Launch the project and the menu fades in with the music.

Small things worth knowing

  • Timing the title with a longer fade. The title waits 0.8 seconds and then rises for 1.8, which lines up with the 2 second dissolve. If you make config.end_splash_transition longer, raise the pause in title_reveal by the same amount so the title is not done before the screen is.
  • Music on return to the title. Ren'Py starts the title track with if_changed=True, so if the same file is already playing it keeps going instead of starting over.

Want this look without building it?

Sample of the Cozy Winter VN Kit main menu (store preview art)

The Cozy Winter VN Kit restyles every Ren'Py 8 menu for winter, main menu included, with snow, a fireplace glow, UI sounds and ambience loops already wired in. For a warm, non-seasonal look, Cozy VN UI Essentials has the frames, buttons, choice states and nameplates to drop into your own screens.rpy.