Extremely large playing field is crashing the program.

New releases and general discussions.

Post » Sat Aug 23, 2008 7:41 am

So I made a 50,000x50,000 playfield, and spawned 3000 clusters of objects in it. Yeah the program wouldn't run, and it is the size of the numbers because when I reduced them it ran fine, albeit boringly.

It's basically a large space field filled with asteroids and stuff...but it needs to be that populated and it needs to be that large. Is there some way I can stream the objects from an array or something? Things are going to be changing in other places as well, so the objects need to be in memory somehow...either via an array or whatever.
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sat Aug 23, 2008 9:22 am

Do the asteroid need to always be in the same place? I'm guessing no because asteroids generally move. Anyway, you could have your asteroids spawn just off-screen in the direction that the player is moving.

Then give them a count-down timer to destroy themselves after they've been offscreen a while. That way it won't look funny if the player turns around and goes the other way because the asteroids they just passed by will still be there. You probably wouldn't need to keep them around for more than a few seconds.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Aug 23, 2008 11:00 am

I've created layouts nearly that size before and its worked OK for me - could you possibly send the crashing cap to ashley@scirra.com?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sat Aug 23, 2008 9:19 pm

Is your computer just not quite able to run it maybe?
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Sat Aug 23, 2008 9:54 pm

No there's no performance issue, it doesn't hang at all since the program doesn't even start. It just throws a vague error on startup. If I knew where the logs for these errors were at or maybe could find a more descriptive error it'd help.
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sat Sep 13, 2008 5:39 pm

bope, i can run a playfield which is 999999999 by 999999999 and i cant put it any higher. maybe you dont have enough ram or something
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests