Author Topic: Memory Limit in Views  (Read 6751 times)

0 Members and 1 Guest are viewing this topic.

Offline fsociety

Memory Limit in Views
« on: January 04, 2016, 06:06:05 AM »
So I was trying to import the main character from PQ4 into a view and I noticed after about the third loop when I save the whole view just goes grey and all the images are lost.  Is there a size limit to a view?



Offline Cloudee1

Re: Memory Limit in Views
« Reply #1 on: January 04, 2016, 06:57:20 AM »
Right now, most of my views seem to be hovering at about 25kb without any issues. So while yes there is a size limit, it is a total memory usage per room limit, not really a view particular limit.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline fsociety

Re: Memory Limit in Views
« Reply #2 on: January 04, 2016, 10:51:04 PM »
A bug in SCICompanion perhaps.

Offline troflip

Re: Memory Limit in Views
« Reply #3 on: January 05, 2016, 12:11:02 AM »
Yep, probably a bug. What exactly were your repro steps? How were you "importing" it?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline fsociety

Re: Memory Limit in Views
« Reply #4 on: January 05, 2016, 12:14:37 AM »
I loaded up PQ4 in SCICompanion and extracted the main walking cycle of the main character to seperate animated gifs.
I then loaded up the SCI 1.1 template, created a new view and imported the gifs as is.  After about the 3rd or 4th loop I saved the view, reloaded up the project file and that view was grey.  Even tried doing the rebuild function but no luck.

Quite a simple process to recreate.

Offline troflip

Re: Memory Limit in Views
« Reply #5 on: January 05, 2016, 12:23:30 AM »
I exported 4 loops from the PQ4 main character as animated gifs.
Then I created a new SCI1.1 template game, and created a new view.
I added 4 loops.
For each loop, I did Import image sequence, and selected "use imported palette".
Then I saved the view, closed and re-opened the game.

Result: No repro, everything was fine.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline fsociety

Re: Memory Limit in Views
« Reply #6 on: January 05, 2016, 12:25:46 AM »
Odd. The only thing I did differently was I didn't use the imported palette - I let SCICompanion create a preferred palette. I wonder why it isn't working for me?

Offline troflip

Re: Memory Limit in Views
« Reply #7 on: January 05, 2016, 12:35:35 AM »
How large is the corrupt view? Did it shrink to 0KB? If not, can you export it as a patch file and attach it to a post?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline fsociety

Re: Memory Limit in Views
« Reply #8 on: January 05, 2016, 12:43:11 AM »
I tried it again on another machine, was first the first save. Quit and reloaded SCICompanion and it turned grey.  Here is the exported view

Offline fsociety

Re: Memory Limit in Views
« Reply #9 on: January 05, 2016, 12:49:35 AM »
Also I tried exporting the patch file and importing it. It went from 200k to 20k with a grey box.  Here is the original export of the patch and the imported result.

Offline troflip

Re: Memory Limit in Views
« Reply #10 on: January 05, 2016, 01:29:32 AM »
Ok, it looks like it is related to the size limit. I'm not sure exactly what's going on yet, but I can repro it if I try to save a view over 64KB. 64KB is the resource size limit for SCI 1.1 (the resource header format only uses 16 bits to specify resource size (audio files use a separate format so they can be larger)). Companion should throw up a warning instead of saving a corrupt resource, so something is wrong with my validation code. Thanks for reporting this!

You'll note that the PQ4 main character is 182KB (which is possible, since this is SCI 2.0).

« Last Edit: January 05, 2016, 01:32:22 AM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline fsociety

Re: Memory Limit in Views
« Reply #11 on: January 05, 2016, 01:40:34 AM »
Glad I could help.  So if I wanted to use that resource I would essentially either make the sprite smaller or cut out frames. 

Offline troflip

Re: Memory Limit in Views
« Reply #12 on: January 05, 2016, 12:13:38 PM »
Yup.

You can scale a loop by shift-dragging the border while having "Affect all cels in loop" checked. However, depending on the original sizes, this might affect the positioning of the cels slightly, so there might also need to be per-frame adjustments of the "Offset" of the cel.

Or you could delete every other frame, like you said.

Or possibly you could reduce the number of colors used in the view and that might cause the RLE compression to work better.

You could also split the view into two views with 4 loops each. But then you'd need to adjust a bunch of the code that expects a walking Actor to have 8 loops.
Check out my website: http://icefallgames.com
Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.035 seconds with 22 queries.