MP Variable sync capped at 255

Discussion and feedback on Construct 2

Post » Sun Aug 03, 2014 2:56 pm

Hey all,

I am coming along in leaps and bounds with my MP game, and noticed that variables over 255 get set to 255 for the peer. Also, it does not support decimals (so 120.25 = 120). Is this intended or is this a bug? I tried looking through the manual again, but it seems the whole section on syncing variables has been removed?

For my game it's not too big a deal for me to work around this, but I would just like to know what's going on exactly before I make any hasty alterations.
B
28
S
8
G
5
Posts: 429
Reputation: 7,007

Post » Sun Aug 03, 2014 3:25 pm

uhh. Depends on what sync level your setting your value and rate at.

8 bit's of information is 0 to 255 and is often INT in nature(ie no decimal value)
16 bit is apx 65k and can also handle decimle.

If your using on the lesser data values/rates at 8 bit. then that's what will happen. SI u;n guessing your using
So i'm guesing your using Low(int, 2bytes).
first it's an INT. No decimals.
I'm als going to assume that C2 use of 2bytes is -255 to 255 rather than 0 to 255 for 1byte.
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Sun Aug 03, 2014 3:53 pm

@jayderyu - ah, right you are! Thanks for clearing that up for me.
B
28
S
8
G
5
Posts: 429
Reputation: 7,007

Post » Sun Aug 03, 2014 5:12 pm

AHHHH @jarderyu that's a golden information, I almost thought the plugin is having a bug, some of my string/text on multiplayer were incomplete and I wondered why. Thanks!

@Ashley I would like to suggest this kind of information to be included in the manual, describing the coverage of the bit information just like how @jarderyu explained above, and go a bit further on giving example of the effect of the bit size on numbers/integers/text/etc. This might seems like ABC for programmers, but for a non-programmer alike it's an absolute new thing.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Sun Aug 03, 2014 5:49 pm

@DuckfaceNinja - Yes it is very helpful! But also for your text: it does not sync! I had issues with it before and Ashley told me that text variables are not meant to sync at all by design, but it had been forgotten in the manual. You need to use messages to rely text.
B
28
S
8
G
5
Posts: 429
Reputation: 7,007


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests