Array size?

For questions about using Classic.

Post » Tue Jul 28, 2009 10:43 am

I just tried to set an array size to display width/height and fps bottomed out. So Im wondering what the maximum safe size is that I can use?
Image Image
B
164
S
49
G
125
Posts: 7,792
Reputation: 85,038

Post » Tue Jul 28, 2009 4:53 pm

Anything which will reasonably fit in memory. There is no predefined limit.

You're probably creating several hundred thousand array elements (what exactly is the display width/height?) which I definitely would not recommend. Why do you need data per-pixel?

Using lots of memory generally does not kill the FPS - are you using events to loop over the array every tick? That's what would kill the framerate.
Scirra Founder
B
373
S
218
G
84
Posts: 23,446
Reputation: 186,082

Post » Tue Jul 28, 2009 8:33 pm

I think I was using 640x480, but I think I had something on z as well so as you can imagine....

Any way I wasn't planning on doing per pixel, more like per tile... like displaywidth/sprite.width, I just forgot the tile size.
The thing is now that that's fixed this works perfectly fine starting with 32x32 tiles, but if I go down to 16 there is a noticeable drop in fps, and no its not in a loop.
Here's a cap if someone wants to verify
[url:bn6ev3re]http://files.getdropbox.com/u/666516/funwitharrays.cap[/url:bn6ev3re]
Image Image
B
164
S
49
G
125
Posts: 7,792
Reputation: 85,038

Post » Tue Jul 28, 2009 8:37 pm

mine doesnt go down in framerate until 3 pixels
at 4x 4 it's still 60+

4200+ athlon x2
4 gigs 800MHz ram
Spriter Dev
B
95
S
21
G
12
Posts: 3,252
Reputation: 16,780

Post » Tue Jul 28, 2009 8:57 pm

Well that makes sense mines about 1/4th that. lol
Image Image
B
164
S
49
G
125
Posts: 7,792
Reputation: 85,038


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests