ggibson1's Forum Posts

  • .

  • I have tested on several different devices and looked at the specs for all the different processors. I personally am not going to support iPhone 4 and below. It is simply too low power of a device (like a PC from the 1990s).

    The iPhone4s is about twice as powerful and everything above that gets even better.

  • I've got this working with my scores during gameplay so thanks for that but I've got an issue trying to get this to work with my webstorage.

    Sorry if i missed out anything out, hopefully someone can help.

    What I normally do to quickly find the bug in my code is use a Browser.Log and write out the variable in question or the return value of a function...etc. until I see what is going wrong.

  • I'm a beginner here and I too was looking at how to insert commas into numbers. Thanks trultz for the detailed guide into doing this.

    I'm curious to Magistross & ggibson1 method of doing this. Could you guys go into a bit more detail on how to use this expression please? I've tried inputting this into my score via functions but its not worked for me as nothing happens.

    I haven't found many topics that talk about RegexReplace so my knowledge on the matter isn't great, which is probably why it hasn't worked for me.

    Thanks.

    [attachment=0:3102jdac][/attachment:3102jdac]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Setting the framerate mode is not a suitable mechanism to implement pausing. Either use framerate independent mode and it happens automatically, or disable the behaviors when pausing. If you think there is still a problem when not changing the framerate mode at runtime please make a new report.

    1) The documentation says that the Framerate Independent mode isn't as accurate as the other mode. How much difference do think it really makes?

    2) Disabling the physics behavior doesn't work (I tried it) because for example if the player, which has the physics behavior, is in the middle of a jump and I disable the behavior to pause ... when I unpause and re-enable it then the player just drops straight down instead of completing the jump. If I flip from Fixed to Frame independent mode when I pause and then back again when I unpause then the physics calculations continue where it left off when I paused and player completes the jump.

    I am "tricking" C2 into freezing only the player, enemies, moving platforms, and other "play time" game elements (even physics behavior objects), yet still allow full C2 functionality during the "pause" for the game menus, dialogs, etc... I have tried all kinds of different ways to do it without causing some negative side effect (like #2 above), but the only way that works is 1) Disable Sine behaviors, 2) Set ALL physics objects to "Framerate Independent" and time scale to 0, and 3) disabling all events directly related to updating "play time" objects.

  • The 'framerate independent' mode is not designed to be changed at runtime.

    Because of that statement I suppose it is not a bug... however you might want to add that support because of the root reason where I was trying to pause individual objects at run time.

    I am sure you have seen in the forums people talk about how to pause the game yet still have menus, dialogs, and other UI that takes full advantage of the C2 engine while the game itself is paused in the background.

    This is exactly why I am changing the 'framerate independent' mode at run time. I want my physics objects to be as accurate as possible yet be able to pause them without setting the system wide timescale to zero which prevents my menus from using things like the "lite tween" plugin to implement "touch scrolling lists with momentum".

    I have this working now because I can change the 'framerate independent' mode at run time but it seems that I have to set it on the first? physics object I added to the layout and then it applies to all the physics objects. So I have a function that does it to each physics object type in the layout so that it happens to hit whatever the first one was on that layout whenever I pause the game... this works, but apparently isn't designed to work according to your statement.

    Let me know if I can help you in anyway (sample capx) if you are interested in adding this feature to allow people to pause the "game" but not the menus that popup during the paused game.

  • Yes that is basically what I meant.

    I think this probably just comes down to a convenience vs performance decision... just like in normal programming languages.

    The tools I have built on top of the C2 Array allows me to do basically the same thing you are doing except all through indexes (and arrays of UIDs pointing to more Arrays for hierarchies) instead of string / hash lookups... so I do not do any loops at all which will make it run faster than your plugin will... the con to my tools is it took me months to build them up as I was working on a game before they got to the point where they are today... with your plugin people can get the immediate usefulness of the plugin with the sacrifice of some performance.

    Your tool should probably be used by people to get their game up and going quickly and only switch to something more efficient like indexing via the C2 Array if they need to squeeze out more performance after doing tests.

  • Yann Good lord sir...

    I encourage you to at least try my plug in and offer constructive criticism on it before giving me a hard time for being symanteclly incorrect.

    Your plugin looks interesting and would probably be helpful to a lot of people who do not want to dig in and learn how to use the Array.

    I will check it out myself to see how it compares (pros and cons) with the tools I have built for myself on top of the C2 Array.

    With my current method of using the C2 array my column names are C2 instance variables and so they show up in the C2 intellisense and when I change a variable name it goes through all the events and updates the name in all the places where I used that variable... with your plugin is that possible or not because you are referring to everything with strings of text?

  • ++What Yann said.

    Arrays are much more fundamental than "collection classes" which is what most people who just started coding in the past 10 years think of when they are talking about lists of things... collection classes provide a lot of convenience features like lookup by field name string or index...etc.

    Attached is the capx from "bolosaur" on his other thread () with changes that use the three dimension array in a manner that might be useful to him... of coarse you can use the C2 Array in many different ways because it isn't a "collection class" but an array with various utility methods added on.

    [attachment=0:r8aknghi][/attachment:r8aknghi]

  • [attachment=0:35rsixyn][/attachment:35rsixyn]

    "FormatNumber"

    RegexReplace(Function.Param(0) & "", "(\d)(?=(\d{3})+$)", "g", "$&,")

    "FormatCurrency"

    RegexReplace(Function.Param(0) & "", "\d(?=(\d{3})+\.)", "g", "$&,")

  • Ok so now I uploaded another capx "BrokeAgain" version...

    This one just applies the "Fix" to the second physics sprite called "Box" and now the pausing has no effect again... strange.

  • *** I just noticed something though... in the FIXED capx I added a second physics sprite... it pauses also even though I am not settings its time scale at all? How can that happen?