[SOLVED]Should I update?

0 favourites
  • 5 posts
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • 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:

    [quote:13cvp53d]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:

    [quote:13cvp53d]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.

  • 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!!

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ok, thank you guys. Then I guess I'll just update and keep my fingers crossed that nothing breaks....

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)