Alternative to object variables?

Discussion and feedback on Construct 2

Post » Sun Feb 26, 2017 7:42 pm

I noticed my project is probably taking forever to start a preview because I had to put a ton of variables in a lot of objects in many layouts. I was wondering if there's a better alternative to adding variables to objects to store things like UID of other objects to associate them properly.
B
45
S
13
G
1
Posts: 236
Reputation: 4,010

Post » Mon Feb 27, 2017 1:29 am

@corlenbelspar

adding variables to objects is a great way to do things. Variables take up very little room. The graphics, sounds, music take up a lot more memory.

Try exporting and running to see if that takes an acceptable amount of time to start, and compare that to a preview.
Or try running the debugger and see what is slowing things down.
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Mon Feb 27, 2017 1:44 am

Yeah object variables are your best bet I think. I tried plopping all object variables into arrays once. Very cumbersome to deal with and didn't improve speed any, at least as far as I could tell.
B
39
S
16
G
6
Posts: 543
Reputation: 7,619

Post » Mon Feb 27, 2017 6:03 am

Yeah you guys are probably right. I was just thinking it was taking a while because one of my layout files is 43mb, for example. I didn't think it was the graphics or audio because my music is done through NSF files and a JS NSF player, my sound effects are very short, though numerous with over 100 currently, and my graphics are for 320x240 because my game is NES-stylized.
B
45
S
13
G
1
Posts: 236
Reputation: 4,010


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests