Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Tue May 21, 2013 3:34 pm

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Mon Apr 30, 2012 11:30 pm 
Lemma-Class Veteran

Joined: Tue Aug 01, 2006 12:39 pm
Posts: 4051
In one of my projects, there's are extensive ATL sequences involving a series of sweeping pans of large backdrops, one after another. The problem is the slight second delay when clicking before the next image loads. But once that image loads, I can then call that image up later in the sequence.

I have already tried to reduce the filesize and effective area of these panning images to the best of my ability, but there is still a noticeable slowdown when first loading an image.

I was thinking of placing "Loading..." type interstitials (not loading... per se but can be an ATL'd picture or something to break the monotony like the little jingle in Ristorante Amore) whose purpose isn't to break the monotony but to execute a flushing of the video memory of the previous scene's cached huge images, then a loading of the next scene's huge images. That way when the scene actually plays out there is no noticeable delay.

Like for example, during this 'interstitial', I'd basically do something like:

-empty memory of previous images (perhaps block rollback to this point)
-load memory of next images

Or what would you suggest be the optimum strategy for this? I've actually gotten "Out Of Memory" errors randomly while testing and loading scenes.


Top
 Profile Send private message  
 
PostPosted: Fri May 11, 2012 10:09 pm 
Regular

Joined: Wed Dec 07, 2011 5:52 am
Posts: 44
Hello! I'm using ATL too. And I have "Out Of Memory" errors randomly too. My ATL image contains about 200 pictures 2000x1000.
I get this error during regular game.
If I load save before exception occured game will contunue correctly.

Exception trace is:

error: Out of memory
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\execution.py", line 265, in run
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\ast.py", line 1413, in execute
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\ast.py", line 1426, in call
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\statements.py", line 100, in call
File "common/00statements.rpy", line 540, in execute_call_screen
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\exports.py", line 1460, in call_screen
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\ui.py", line 237, in interact
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\core.py", line 1803, in interact
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\core.py", line 2108, in interact_core
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\core.py", line 1392, in draw_screen
File "render.pyx", line 366, in renpy.display.render.render_screen (gen\renpy.display.render.c:4567)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\layout.py", line 511, in render
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\layout.py", line 511, in render
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\layout.py", line 511, in render
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\screen.py", line 276, in render
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\layout.py", line 511, in render
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
File "accelerator.pyx", line 75, in renpy.display.accelerator.transform_render (gen\renpy.display.accelerator.c:1076)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
File "accelerator.pyx", line 75, in renpy.display.accelerator.transform_render (gen\renpy.display.accelerator.c:1076)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\im.py", line 432, in render
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\im.py", line 195, in get
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\im.py", line 473, in load
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\pgrender.py", line 134, in load_image
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\pgrender.py", line 119, in copy_surface
File "C:\Users\Michelle\Desktop\renpy-6.13.12\renpy\display\pgrender.py", line 109, in surface
error: Out of memory




Windows-7-6.1.7601-SP1

Ren'Py 6.13.12.1728


Top
 Profile Send private message  
 
PostPosted: Sat May 12, 2012 7:03 am 
Crawling Chaos
User avatar

Joined: Mon Feb 13, 2012 5:37 am
Posts: 1112
Location: Kimashi Tower, Japan
Completed: SMAR,AAA
Projects: DMC
Piccontroller wrote:
200 pictures 2000x1000


Then it consumes 200*2000*1000*24 bit... 1.2GB? No way to keep this size of image.
Ren'py seems unable to use more than 1.3 GB, so the game should be designed always under 1GB RAM.

_________________


Top
 Profile Send private message  
 
PostPosted: Sat May 12, 2012 7:06 am 
Lemma-Class Veteran
User avatar

Joined: Mon Jul 21, 2008 5:41 pm
Posts: 3399
Projects: Planet Stronghold: Warzone, Loren The Amazon Princess, Queen Of Thieves, DIM, Undead Lily, and more...
Also memory limitation aside, it would run very slowly even on a modern PC :)

_________________
follow me on Image Image Image Image
computer games


Top
 Profile Send private message  
 
PostPosted: Sat May 12, 2012 8:59 am 
Veteran
User avatar

Joined: Sun Jan 09, 2011 7:10 am
Posts: 378
nyaatrap wrote:
Piccontroller wrote:
200 pictures 2000x1000


Then it consumes 200*2000*1000*24 bit... 1.2GB? No way to keep this size of image.
Ren'py seems unable to use more than 1.3 GB, so the game should be designed always under 1GB RAM.
The images are decoded to ARGB, a premultiplied copy is generated, and the result is sent to OpenGL. Worst case 3 copies => 4.47GiB excluding overhead.


Top
 Profile Send private message  
 
PostPosted: Sat May 12, 2012 1:32 pm 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10774
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
We should be tossing some of the copies - but yeah. Ren'Py is designed for sane cases, not to have thousands of huge images loaded at once.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
PostPosted: Sun May 13, 2012 12:14 pm 
Regular

Joined: Wed Dec 07, 2011 5:52 am
Posts: 44
the code for image looks like:
Code:
image travelPath04:
    "images/travel/Travel_04_PNGs/Travel_04_00024.png"
    pause hightTravelAnimationSpeed
    "images/travel/Travel_04_PNGs/Travel_04_00025.png"
    pause hightTravelAnimationSpeed
    "images/travel/Travel_04_PNGs/Travel_04_00026.png"
......

   "images/travel/Travel_04_PNGs/Travel_04_00216.png"
    pause hightTravelAnimationSpeed


one image size is about 60K
all images size is 14M
exactly image size is 2588x698

not 4Gb!!!! only 14Mb!!!

and out of memory!


Top
 Profile Send private message  
 
PostPosted: Sun May 13, 2012 1:01 pm 
Lemma-Class Veteran
User avatar

Joined: Mon Jul 21, 2008 5:41 pm
Posts: 3399
Projects: Planet Stronghold: Warzone, Loren The Amazon Princess, Queen Of Thieves, DIM, Undead Lily, and more...
Disk space != memory usage :) if you look around you should find some tutorial/explanation, look for "texture allocation size" or something like that.

_________________
follow me on Image Image Image Image
computer games


Top
 Profile Send private message  
 
PostPosted: Sun May 13, 2012 2:32 pm 
Miko-Class Veteran
User avatar

Joined: Thu May 14, 2009 8:15 pm
Posts: 585
Projects: Castle of Arhannia
going back to dafool's question, would any of these help?

http://www.renpy.org/wiki/renpy.predict

http://www.renpy.org/wiki/renpy/doc/ref ... .cache_pin
http://www.renpy.org/wiki/renpy/doc/ref ... ache_unpin

http://www.renpy.org/wiki/renpy.free_memory

http://www.renpy.org/wiki/renpy.block_rollback


Top
 Profile Send private message  
 
PostPosted: Sun May 13, 2012 6:38 pm 
Crawling Chaos
User avatar

Joined: Mon Feb 13, 2012 5:37 am
Posts: 1112
Location: Kimashi Tower, Japan
Completed: SMAR,AAA
Projects: DMC
KimiYoriBaka wrote:


Oh Sweet. Renpy.predict works perfectly.
Cache_pin is a bit difficult to use, but I'll try to make some useful code with this at the next game.

_________________


Top
 Profile Send private message  
 
PostPosted: Mon May 14, 2012 12:11 am 
Regular

Joined: Wed Dec 07, 2011 5:52 am
Posts: 44
I think no one of these will help me.
Cache useless (all images differ), free memory too etc.
I think the problem is renpy load all images in memory before using it. I think it is wrong. I think correct algorithm may be
looks like : load in memory image 1 -> manipulation (transform, show etc)-> unload from memory image 1, load 2-> manipulation-> unload2 .... etc


Top
 Profile Send private message  
 
PostPosted: Mon May 14, 2012 10:21 am 
Miko-Class Veteran
User avatar

Joined: Thu May 14, 2009 8:15 pm
Posts: 585
Projects: Castle of Arhannia
Quote:
load in memory image 1 -> manipulation (transform, show etc)-> unload from memory image 1, load 2-> manipulation-> unload2 .... etc


you could do that manually, couldn't you?

...or so I can say, but I wouldn't recommend anything of the sort. that sounds like an utterly horrible idea


Top
 Profile Send private message  
 
PostPosted: Tue May 15, 2012 7:03 am 
Regular

Joined: Wed Dec 07, 2011 5:52 am
Posts: 44
yeah. It seems unresolving internal renpy issue working with ATL =(((


Top
 Profile Send private message  
 
PostPosted: Tue May 15, 2012 7:48 am 
Crawling Chaos
User avatar

Joined: Mon Feb 13, 2012 5:37 am
Posts: 1112
Location: Kimashi Tower, Japan
Completed: SMAR,AAA
Projects: DMC
It's more like a format issue. If images work well in that way, what the meaning of videos?

_________________


Top
 Profile Send private message  
 
PostPosted: Tue May 15, 2012 10:35 am 
Regular

Joined: Wed Dec 07, 2011 5:52 am
Posts: 44
ok. It is format issue. What correct ATL definition should be? My definition you may see above.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group