VIKINGS's Forum Posts

  • Ok, thank you guys. Then I guess I'll just update and keep my fingers crossed that nothing breaks....

  • Yes MikeMS , if you don't sign you apps manually(which is what I do and recommend, check this tutorial if you are curious) and you let programs like intelxdk or cocoon sign them auto for you, then you will have to create a new project in the google console.

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

  • Well LittleStain maybe it's a bug that got fixed, I'm still runing build 200. I'm waiting on the next stable release to update....

  • Well, after a lot of tweaking to your latest suggestion LittleStain I finally got it to work!! Thank you!!

    And I olso realized what the problem was. It seems C2 is an idiot, what did you do Ashley , get him drunk? No, but seriously, it seems C2 does not know what = means....

    It doesn't matter what value I get C2 to check on in the third event 4, 3, 2, 1(YESS even 1 which we actually previously set it to in event nr.2!!!...) as long as I use =(equal to) C2 doesn't figure it out. However if I use >(greater than) well then it works....

    Extremely stupid in my opinion(guess now I have to go over all of my games and see if I used = anywhere else...) but at least I'm glad I got it to work. Thanks again Stain.

    And don't worry MadSpy , like Stain said, we're all here to learn. I don't think anyone here knows C2 inside out and 100% never needs any help.

  • If I really have to I'll try your way too MadSpy , but I want to stay away from everytick events as much as possible, so I'd like to try a little harder to make Stain's idea work.

    I guess you're still not awake LittleStain , like I said in the post above I already figured that part out and changed the timer to an object that never gets destroyed and is always present. I olso added the screen shake effect, here's how it looks now.

    Could you please redo the events in your C2 and show me where and what you would modify? As I'm not sure where to make the changes you suggested.

  • Sadly no LittleStain , it doesn't work. I even made some modifications to make it more stable(at least that was their purpose) like changing the timer from the marbles(which get destroyed) to another object that is always there.

    Regardless the game over object never gets created... it's like the timer never completes....

    Any other ideas please? Anyone?

  • Ok LittleStain here is what I did following your suggestion. Does this look right to you? The event that says "Create object game over" is gonna be replaced by the actual shake, which I haven't created the events for yet, I just haven't gotten around to it yet. I'm thinking of putting those events in a function and then just replacing the "Create object game over" event to call on that function.

  • Well that's why I said to play around with it, check the manual, etc., it's not a simple as just adding a plugin and you're done.

    For example if you use the one I did, in intelxdk at the plugins dropdown menu you have to click on "Get plugin from the web" and then fill with the following:

    Name: AdMob Plugin

    Plugin ID: com.cranberrygame.phonegap.plugin.ad.admob

    Check the 'Plugin is located in the Apache Cordova Plugins Registry' box

    P.S. And I think there was something else that even I'm forgetting.... rats.

  • Yes, I got it to work just fine using the default Admob Ads plugin that C2 comes with. Check the manual, play around with it and see if you can make it work. If not send me a pm and I'll try to remember all the steps/rules that you have to follow to make it work.

    P.S. And yes guys, I know the default plugin is made by cranberrygame, and I olso know that he has a more recent/updated version of that plugin. But since the default one worked just fine for me, I didn't see a reason to bother with the other one.

  • Hello World,

    So let's say I have a shake screen effect, and some "balls" for the player to destroy, and a "bullet" with which the player destroys them.(if anyone is curious how I plan to do the screen shake let me know)

    How do I tell C2 that I want the shake screen to be triggered only if the player destroys lets say 4 balls in lets say the same second? Or 6 balls in 1.5 seconds, or 9 in 2 seconds, or 5 in 1 second, etc.?

    Thank you.

  • You should still use instance variables with those objects, UID's are not very reliable from what I understand.

  • Tried this today and here is what I get. Help please?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, I've read that post a while ago newt , unfortunately if I remember correctly what you are suggesting would require me to have my own server to host those images on. Which is not a possibility for me at the moment.

    Anyway, thanks for trying to help guys. Guess I'll just try to compress them as much as I can, maybe resize them a bit more, have way less diversity then I originally wanted and that's that...

    I'll keep my fingers crossed for C3 to have that option.... Ashley

  • Colludium , ryanrybot I'm afraid you're both missing the point.

    The first one that I tried which was .png to begin with droped over 500kb in size after compressing it with tinypng, putting it in the project and saving the project(not exporting).

    The tinypng compressing on the png file helped reduce the size after C2 was done with it and there was absolutely no loss of quality(to the naked eye at least)!

    So the point is that after all that I can export it normally(as png-32), get a reduced file size, AND the entire process will be loseless!

    If I try it your way, to not care about the size before exporting, and then exporting as png-8 I can clearly see a drop in image quality.....

    So, is there any way to make that process work with jpg files too so I can keep the loseless process going?

    P.S. To whom it may concern: If it's too late for C2, then I at least really hope we see in C3 a nice and easy way of using the expansion files that google now provides....