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.
# The script of the game goes in this file.
# Declare characters used by this game. The color argument colorizes the
# name of the character.
define e = Character("Eileen")
image sulijanmovie = Movie(play="sulijan_idle.webm", mask="sulialpha.webm")
image serenamovie = Movie(play="serena_idle.webm", mask="serena_idle_alpha.webm")
image mivakmovie = Movie(play="mivak_idle.webm", mask="mivak_idle_alpha.webm")
image mkrellmovie = Movie(play="mkrell_idle.webm", mask="mkrell_idle_alpha.webm")
# The game starts here.
label start:
scene command_center_4
show sulijanmovie at left
show serenamovie at right
show mivakmovie
show mkrellmovie:
xpos 750 yalign 1.0
e "You've created a new Ren'Py game."
e "Once you add a story, pictures, and music, you can release it to the world!"
return
If I load all four of them the game crashes with a "memory error". It looks like the game can't handle the movies...
All files are less than 3MB in size.
Is there a walkaround to make it work with more than 3 chars?
Uh... Are you trying to show animated sprites in the form of movie? I think that's really bad. What you want to do instead is extract all the frames of each movie and animate them with atl.
So using movie sprites shouldn’t be a problem in and of itself. Do they all have the same frame rate? The documentation says that could be a problem.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Mmh no, I'd rather NOT extract all the frames because that would mean having even 600 frames to code for each movie, and that would mean tens of thousands lines. That's why as trooper6 says I'm using the Movie Sprite function.
Every movie has the very same frame rate... They're pretty basic, in 1440x900 resolution, they shouldn't hinder system's memory that much (I own a very powerful PC either, but they shouldn't be a problem even for smaller systems)
pytom must be busy, if you have a discord and joined in the renpy server, you can pm him directly... lsf is a bad place to send dms i think... https://discord.gg/6ckxWYm
well, you need to make it work, honestly I think he's more active in the discord. i chatted with him once and my question got answered immediately, besides, sometimes he's there to have small talk with others, so i really think that discord is your best bet of getting faster response from him, and he's not really responsive in patreon, clearly you can see that in the discrepancies of the post dates of each article...
I've spent a lot of time on this (over six hours), and I'm not particularly closer to figuring out what's causing this. I do know that this isn't a problem in the 7.4 master branch, which has changed the internals of Ren'Py such that this doesn't seem to be a problem.
It seems to have to do with the size of the sprites - having eight 1440x900 videos playing at once (four for the color, four for the alpha) seems to fill memory to the point where Ren'Py can't process it. It's not the size of the images that are the problem - I calculate that it's about 200MB uncompressed. My guess is that on the 32-bit platforms, memory is getting fragmented, and that fragmentation eventually means that there isn't a spot for new frames, and things crash.
I would suggest potentially cropping the videos. Right now, they're using space inefficiently - you have a 1440 wide image, but only about 400 or so pixels of that actually contain image data. Doing so would likely reduce your memory consumption by about 2/3rds. Since memory fragmentation problems often get worse the more memory is being used, it's likely that a crop would improve things.
While the crop might affect the layout of images, I suspect you could place the movies inside a 1444x900 Fixed, which would let you retain the existing layout.
At this point, with 7.4 not having this problem, I'm going to focus on getting it into a prerelease.
Supporting creators since 2004 (When was the last time you backed up your game?)
Thanks A LOT for your help and the time you spent on this.
I just don't understand this part: "I suspect you could place the movies inside a 1444x900 Fixed"
The videos were made in that format so I can move the characters like I would with static images while the background is 1920x1080... Are you suggesting I put the images in a smaller background container? I think I don't get it...