I'm not sure that there is a defined limit to graphics storage in sB, but I have definitely hit a point in some recent coding which indicates at least an unofficial limit. I found in creating a slideshow app that I have just enough room for an image on the display screen and 9 rows of ten sprites each that are created by scanning an image into rectangular pieces like a puzzle. If I try to subdivide the image into more, smaller pieces by defining 10 rows of sprites or adding another sprite to each row, the last few sprites are not created, leaving holes in the puzzle. Since the total number of pixels is not increased, I assume that I am very close to the graphics memory limit, and just by defining more sprites I run over the limit. I don't consider this a bug, but useful information.
I have an iPad Air with 128 GB, so your results may be different. I will post my code in the next week, and would appreciate it if I could get any feedback or suggestions regarding this limit.
Graphics memory limit
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Graphics memory limit
The only thing that gets me down is gravity...
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Graphics memory limit
Yes, there is a memory limit. But there are no ways to detect it and to prevent device from crash if memory is overloaded.
So, smart BASIC users are in the same position as any iOS developer here, and the Apple's advice is just "use as less memory as possible".
So, smart BASIC users are in the same position as any iOS developer here, and the Apple's advice is just "use as less memory as possible".