How do I handle a local multiplayer player loop?

Get help using Construct 2

Post » Tue Nov 04, 2014 5:57 pm

@Magistross

Wow, thanks "Pick by evaluate" actually works! But is it "fastest" than the "god" for each loop?
Last edited by RootKernel on Tue Nov 04, 2014 6:05 pm, edited 1 time in total.
B
6
S
2
Posts: 24
Reputation: 737

Post » Tue Nov 04, 2014 6:04 pm

I was about to ask @Ashley the same question. I guess we'll have to wait and see ! ;)
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Tue Nov 04, 2014 6:15 pm

Lol no wonder I didn't get the situation, I misread the situation haha my bad.

Magistross wrote:TRUE expression is probably a global constant with 1 for its value.

Hah! This is why I like to engage in a discussion, I'd get to learn things! I always assumed TRUE/FALSE is a value, never thought that it is actually a CONSTANT for value 1/0. That opened my eyes!
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Tue Nov 04, 2014 6:38 pm

@DuckfaceNinja Well let me open them a bit more if I may. true/false are actually values of the "boolean" type. However, Construct2 support for that particular type is quite limited. For example, the getbit() expression return type is number, 0 or 1, when in theory, a bit can only be true or false. But that's alright, since an implicit conversion of a number to a boolean is quite simple : 0 is false, everything else is true. It's also common practice to consider "true" to have a numeric value of 1, hence the creation of global constants of FALSE = 0 and TRUE = 1.
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Tue Nov 04, 2014 7:09 pm

Magistross wrote:@DuckfaceNinja Well let me open them a bit more if I may. true/false are actually values of the "boolean" type. However, Construct2 support for that particular type is quite limited. For example, the getbit() expression return type is number, 0 or 1, when in theory, a bit can only be true or false. But that's alright, since an implicit conversion of a number to a boolean is quite simple : 0 is false, everything else is true. It's also common practice to consider "true" to have a numeric value of 1, hence the creation of global constants of FALSE = 0 and TRUE = 1.

Thanks! It's good to have knowledge sharing like this every now and then. :D
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Wed Nov 05, 2014 5:22 am

Thanks for the discussion guys, I will wait @Ashley answer I'm quite interested.
B
6
S
2
Posts: 24
Reputation: 737

Post » Wed Nov 05, 2014 11:39 am

It's probably fine, profile it and if you can't measure anything then the performance difference doesn't matter.
Scirra Founder
B
397
S
236
G
88
Posts: 24,389
Reputation: 194,448

Previous

Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot] and 21 guests