My map editor crashes.

For questions about using Classic.

Post » Thu Oct 11, 2012 8:57 pm

Hi.
I wanted to made a game with different levels, so
i needed to create an editor first,
but everytime i run it, it crashes.


It is a 480x320 window, the layer is 8192x8192
(32 (one block)* 256 (- i wanted to have a big maps))
Is problem here?
It is too big?

www.uloz.to/xBptFXg/cw-lvl-edit-cap -is the .cap
--> password is "construct"

(I'm sorry if someone had the same problem before)
(sry for my english - i'm not a native speaker)
Frantataa2012-10-11 20:59:07
B
5
Posts: 22
Reputation: 494

Post » Thu Oct 11, 2012 9:50 pm

It is crashing because your array is sized 8192 x 8192 which apparently takes up 1gb of memory.

I changed it to 256 x 256 because that is the amount of tiles you want in your map. Also, 8192 x 8192 = 67,108,864 objects!


After making the change your program starts again.
crowtongue2012-10-11 21:50:53
B
7
S
2
Posts: 123
Reputation: 1,061

Post » Thu Oct 11, 2012 10:02 pm

Ok, but 256x256(px) is small - it is 8x8 blocks isn't it?

(perhaps i dont understood what you wanted to say me)

EDIT: ok, i have it now, thanks a lot.
(before i didn't seened the word array )
Now everythinkgs is like i needed to be. Frantataa2012-10-11 22:16:09
B
5
Posts: 22
Reputation: 494

Post » Fri Oct 12, 2012 12:50 am

If your array must be 8192x8192 you might consider using other data storage such as .INIs or Hashtables so that empty cells are not accounted for.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Sat Oct 13, 2012 2:47 pm

Or you can stream portions of the map. Eg: each map is a folder of text files numbered 0 to max like an array, then each segment you are in you load the text file on-the-fly to prepare the next area, maybe have 3 edges loaded at once so the player can always walk into another one without noticing.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat Oct 13, 2012 3:25 pm

It is really good idea jayjay, thanks.
maybe i will use it in the future, but now, i think, that
256x256 is large enought.
B
5
Posts: 22
Reputation: 494


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests