[SOLVED]Should I update?

Discussion and feedback on Construct 2

Post » Sun Jul 12, 2015 12:17 am

Hello World,

I'm considering updating to the latest stable build(release 206), I am currently running build 200, however I am worried/have questions about 2 changes introduced since build 202.

1. My first problem is with the new local storage, and I quote:
Local Storage preserves the types of values stored. WebStorage would return all values as strings, even if you store a number, which can cause confusing bugs. Local Storage returns a number if you store a number, avoiding issues with unexpected types.


Now in my current game I use an array to store my scores in.(which are numbers obviously) Does that above quote mean that if I don't update when the player closes the game(event system - save game to slot xxx) and then when he opens the game again(event system - load game from slot xxx) those score values(as well as other global variables saved as numbers) will be buggy?
As a matter of fact am I even using webstorage in my case? Cause those events that I wrote in () are from system, not webstorage or localstorage so I'm a bit confused.

2. My second problem is with the operator change, and I quote:
Recently a bug was reported noting that Construct 2 has the wrong operator precedence for power (^) and unary minus (as in the minus in -x). So for example the expression -x^2 would be evaluated as (-x)^2, and always return a positive result. This is inconsistent with the standard BODMAS order of operations, which means it should be evaluated as -(x^2) and always return a negative result. The problem with making this kind of change is it can break existing projects that rely on an expression like -x^2 returning a positive result in order to work correctly. However as discussed in the bug report it was determined that the change ought to be made since it's a pretty fundamental mathematical issue.

Hopefully few projects will be affected. However if you find anything working differently in this build, review your project for any use of expressions of the form -x^y and replace them with (-x)^y to make them work the same as before.


Now while I don't explicitly use any expression/action/event that contains the "^" operator I do however use a lot of behaviors in my game like physics, sine, bullet, rotate. Is there a chance that some of these behaviors use the "^" operator under the hood and that if I update my game will get screwed up?

As you can see I am in quite a pickle here because on one hand I really definitely need a stable save system for this game, but on the other hand I am already too far in the development process to afford/allow for that operator change to mess up my game and to then have to try and figure what exactly broke, where it broke and then try to find all the places where I have to fix it....

Thank you.

P.S. Don't get me wrong I love all you guys and appreciate your advice a lot, but @Ashley it would be really nice if you yourself could drop a line on this one.
P.S.S. Sorry for the wall of text, I just wanted to be as clear as I can.
Last edited by VIKINGS on Thu Aug 06, 2015 12:41 pm, edited 1 time in total.
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Sun Jul 12, 2015 1:37 am

WebStorage has been deprecated because, as far as I understand, it is no longer supported by the Chrome Web Store. However, it is still available if you right click on the add object popup and enable deprecated plugins. Keep a copy of the folder as well and, if one day in 5 years it is no longer shipped with c2, you can just paste it back into your plugins folder like any other 3rd party plugin.

Regarding the second point - almost certainly not a problem. There have been no bug reports I've been aware of where odd stuff has been happening because of that glitch.

So, do it!! :)
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Sun Jul 12, 2015 12:46 pm

1. Save game is separate from local storage / web storage. You shouldn't be affected by that.

2. That change only affected expressions that you type yourself.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630

Post » Sun Jul 12, 2015 1:19 pm

Ok, thank you guys. Then I guess I'll just update and keep my fingers crossed that nothing breaks....
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Sun Jul 12, 2015 2:11 pm

If it does you can always roll back to earlier versions. If the operator precedence breaks anything then just update the expressions (I mean how many can you have using ^? It's not very common) Pretty sure Webstorage is still fully functional, too.
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests