Ren'Py 4.8 Released

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
User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Ren'Py 4.8 Released

#1 Post by PyTom »

I've just released Ren'Py 4.8, the fifteenth public release of the Ren'Py 4 codebase (unless I counted wrong). Internally, this release features a number of cleanups, rewrites, and bug fixes of the Ren'Py code. Externally, it introduces a number of new functions including image manipulators and low-level audio functions. For users it now comes with a new focus system allowing it to be used from the keyboard. Finally, a new CG gallery extra provides an image gallery that requires the player to unlock its contents.

Where can you get all this? From the Ren'Py website:

http://www.bishoujo.us/renpy/

As ususal, upgrade from an old release by copying over your game directory. In this release, however, some styles changed names. Most notably, all of the disabled styles were removed and replaced with an insensitive_ property prefix. So you will need to rewrite:

Code: Select all

$ style.disabled_button_text.color = (0, 0, 0, 255)
into

Code: Select all

$ style.button_text.insensitive_color = (0, 0, 0, 255)
Another issue to watch for is that tab behavior has changed. So if you used tabs in your script (tsk, tsk) you may have to fix that.

The new CG gallery support is found in extras/gallery.rpy. You can use it by copying that file into the game directory. Since the CG gallery has coded into it the names of the files to show, it will only work with the demo until you edit gallery.rpy.

As there were alot of changes made to this release, I encourage game authors to try it out with their games in progress, to see if anything is broken. While I try my best to test these releases, my time is limited and it's everyone's responsibility to avoid broken games.

A list of changes follows.

New in 4.8

A new system was implemented to manage widget focus. This new system
allows the focus to be moved from widget to widget using the keyboard,
without requiring the keymouse behavior be used. Because of this new
system, the keymouse behavior is now a no-op.

To simplify the code and make every widget compatible with the new
focus code, a number of widgets were reimplemented in terms of
buttons. This includes the ui.menu widget, which is the widget that is
used when presenting the user with choices. Menu buttons are of the
new style style.menu_choice_button, while their labels remain of style
style.menu_choice. Background images and padding can now be styled
onto these menu buttons.

A number of new image manipulators have been made available in the
new im package. These are objects that can load an image (im.Image),
crop an image (im.Crop), scale images (im.Scale), rotozoom images
(im.Rotozoom) and composite images (im.Composite). The latter is much
more flexible than the previous image composition system, as it now
supports placing images at arbitrary locations on an arbitrarily big
canvas. Image (by itself) is now a function that creates the
appropriate image manipulators, retaining compatibility with its
behavior in previous releases.

The image cache is now based on image size, rather than number of
images. This prevents a large number of small images from filling up
the cache.

We now load images before starting the timer for a transition. This
prevents us from popping into the middle of a transition because we
spent some time loading images. This behavior can be controlled by
config.load_before_transition.

The ui.imagemap widget has been rewritten in terms of ui.imagebuttons
and im.Crops. Some styles have changed names as a result.

Ren'Py now keeps track of the images that have been shown to the
user. This is the basis of this release's new extra, gallery.rpy,
which manages a gallery of unlockable CG.

The audio system has been rewritten, and a number of low-level audio
functions have been exposed in the new audio file. These functions
control audio directly, but do not save the state of audio in a save
file. The high-level music functions have been rewritten and placed in
the music.rpy file, allowing a sufficently adventurous game author to
change the way music is played.

Two changes have been made to the renpy.music_start() function in the
high-level sound api. The startpos argument was removed (as it was a
pain to support), and a new fadeout argument was added, which lets the
fadeout time be controlled for each new song that is played.

The low-level sound api now lets us do the following things:
  • Play up to eight sound effects at once.
  • Cancel a playing sound effect.
  • Pause and unpause the playing music.
There is now a new, state that a widget can be in. Along with hover,
idle, and activate, a widget can now be insensitive. This is the state
that all non-focused widgets are in. Having the new insensitive state
means that we can eliminate the various disabled_button styles, so we
did.

In general, in this release, many styles have changed names.

In prior versions of Ren'Py, the bar widget could respond to
clicks. This was never used, and won't work well with the
keyboard focus control system. So, it's been eliminated.

Now, if the label "enter_game_menu" exists, it is called when entering
the game menu. It's expected that the main purpose of this label will
be to play music when in the game menu. Using the default music
system, the code to do this would look like:

Code: Select all

label enter_game_menu:
    $ renpy.music_start("game_menu_music.mid")
    return


A number of bugs were fixed, including bugs with the style system, and
with animation refresh.

Tab characters are now expanded to tab stop at eight spaces, rather
than to a fixed spacing of eight spaces. Old code using tabs may need
to be reformatted.

The 'h' key now hides the windows on the screen. This means that all
Ren'Py functionality is now available through the keyboard, at least
for people with a 1-button mouse. (cough ... Mac ... cough)

Finally, setting the environment variable RENPY_DISABLE_FULLSCREEN to
a non-empty value will disable fullscreen support, for those people
(that person?) who had it crash their systems.
Last edited by PyTom on Thu May 26, 2005 7:04 pm, edited 1 time in total.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

PixelWrangler
Regular
Posts: 103
Joined: Wed Mar 16, 2005 11:00 pm
Location: Swimming in the sea of electronic dots
Contact:

#2 Post by PixelWrangler »

:shock: Wow... sounds very, very cool, especially the new image compositing/effects, enhanced music control and unlockable galleries. I shall have to download and play with it.

Way to go, PyTom! :D

P.W.

P.S. - Is there a release file containing a list of all of the styles whose names have changed in 4.8?
Life is hard.
Except in ren'ai games.
Then it's a whole lot softer.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#3 Post by PyTom »

No... but here's a quick accounting.

New Styles
menu_choice_button
imagemap_button

Removed Styles
disabled_button
disabled_button_text
gm_nav_disabled_button
gm_nav_disabled_button_text
file_picker_nav_disabled_button
file_picker_nav_disabled_button_text

Styles with changed meanings
menu
menu_choice
imagemap

Please note that, in general, the changed meanings are in ways that are insiginificant to most users. (For example, hover_sound was moved from menu to menu_choice_button.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
clubanimon
Regular
Posts: 121
Joined: Sun Apr 10, 2005 12:56 pm
Contact:

#4 Post by clubanimon »

wow!
thats alot of new stuff, i'm particuarly interested witht he new CG gallery and the new music control options!
Thank you, you spoil us!

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#5 Post by mikey »

I just had to rewrite the insensitive button line and all went fine. No troubles importing anything. :P

Post Reply

Who is online

Users browsing this forum: Google [Bot]