Data structure

Discussion and feedback on Construct 2

Post » Sat Jul 18, 2015 2:44 pm

Since there is no way to declare a Data Structure to group the variables in Construct 2, I use objects (text), declare them Global and add the instance variables that I need. What do you think about using this technique?

Image
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Sat Jul 18, 2015 3:53 pm

It shouldn't be a problem to do it that way, but you could use an Array object (and write down what each array position is used for) or use the Dictionary object which allows you to name the variables (add them by events on the first layout, then change their values/read them like normal variables.
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
145
S
50
G
20
Posts: 2,283
Reputation: 23,045

Post » Sun Jul 19, 2015 12:06 am

@phimaka
That's what I also do. I used to use JayJay suggestion, but now I only use that method when I want persistent dad.
B
94
S
18
G
9
Posts: 2,457
Reputation: 15,177

Post » Sun Jul 19, 2015 12:25 am

I do it exactly that way as well :).
Learning other engines, but C2 still rocks. Image Image Image Image
B
80
S
22
G
96
Posts: 2,456
Reputation: 58,304

Post » Sun Jul 19, 2015 12:52 am

There are some 3rd plugins for data structure, like this one.
Goodbye
B
115
S
31
G
295
Posts: 4,549
Reputation: 164,633

Post » Sun Jul 19, 2015 2:20 am

If it's a large data set, and performance is an issue, I like to use a four dimensional octree, with a recursive scalar index for the first couple of levels.

Otherwise, I just use global vars.

:)
Don't lose your work. Backup your game with Dropbox.
B
45
S
10
G
11
Posts: 1,106
Reputation: 9,732

Post » Sun Jul 19, 2015 2:28 am

TiAm wrote:If it's a large data set, and performance is an issue, I like to use a four dimensional octree, with a recursive scalar index for the first couple of levels.

Otherwise, I just use global vars.

:)


If you're not using lambda calculus for your boss FSM and a kalman filter to determine the player's ability then I'm not interested....

Probably! ;)
Learning other engines, but C2 still rocks. Image Image Image Image
B
80
S
22
G
96
Posts: 2,456
Reputation: 58,304

Post » Mon Jul 20, 2015 7:44 am

Colludium wrote:
TiAm wrote:If it's a large data set, and performance is an issue, I like to use a four dimensional octree, with a recursive scalar index for the first couple of levels.

Otherwise, I just use global vars.

:)


If you're not using lambda calculus for your boss FSM and a kalman filter to determine the player's ability then I'm not interested....

Probably! ;)


Yeah it almost goes without saying :)
B
53
S
16
G
9
Posts: 1,098
Reputation: 11,282


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests