HUGE layout sizes ..and the damage done

Get help using Construct 2

Post » Wed Oct 16, 2013 10:52 am

Is there a size that basically isnt good?

In my game i have this system locking freeze for about 5 seconds just before my layout .

Its x5000, y10000

Im assuming this is the problem as my codes very tidy (for me )

My solution is to load a chunk (1000,1000) at the start , then expand it in the background till its that size



Its not letting me use "else"    [|) as in

if playernum = ainum
print "you win"
else print "you loose" railslave2013-10-16 11:35:56
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Wed Oct 16, 2013 11:15 am

The layout size shouldn't be a problem, but if you have a sprite that size please consider that it will take 5000x10000x4 = 200000000 bytes of memory. that's about 200 Mb if I'm correct.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Oct 16, 2013 11:18 am

Ok, does that include stuff that is "stretched to fit" and tiles ?
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Wed Oct 16, 2013 11:23 am

No, the size a sprite takes in memory is "widthxheightx4 bytes" of the sprite in your image-editor.

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Oct 16, 2013 11:30 am

Hmmm cant be that then, has to be the path finding , that seem to hit things pretty hardrailslave2013-10-16 11:30:28
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Wed Oct 16, 2013 11:32 am

One more thing, i have a little dice ( text) mini game.


Im struggling to store my input number (between 1 and 6) into a variable (to compare with the ai's) all i can find is "keyboard code", but i just need to compare the number.

Im sure there an easy solution





Its not letting me use "else"    [|) as in

if playernum = ainum
print "you win"
else print "you loose" railslave2013-10-16 11:36:47
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Wed Oct 16, 2013 12:30 pm

Like this?

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Oct 16, 2013 12:45 pm

[QUOTE=railslave] Hmmm cant be that then, has to be the path finding , that seem to hit things pretty hard[/QUOTE] Oh yeah, you should have mentioned that you used pathfinding in the first place. It has to generate the obstacle map when the layout starts. On such a big layout it can be long indeed. Did you try changing the size of map cells? the smaller they are, the more accurate the pathfinding will be, but the longer it will take to generate the map and to calculate pathOlivierC2013-10-16 12:46:27
B
12
S
5
G
2
Posts: 132
Reputation: 2,627

Post » Wed Oct 16, 2013 1:17 pm

Nope, i want to write the variable with my keyboard input... then compare..

So i type 3 and the variable is changed, cant seem to work it out on here.
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Wed Oct 16, 2013 1:20 pm

keyboard on key pressed 3 - set variable to 3
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, Lancifer and 55 guests