oosyrag's Forum Posts

  • Unlikely to be the cause of lag.

  • Add the following conditions to your event...

    Is touching button 1

    Is touching button 2

    Run once while true

  • The expression Browser.ExecJS("Date.now()") will get you Unix time in milliseconds. You can keep track of this by regularly saving it to local storage, and upon starting up your app you can compare the difference between the saved time and the current time to see how much time he passed.

  • Yes. Changing the positions of a lot of objects every tick probably utilizes significantly more resources than just changing the position of the viewport (or a single invisible helper sprite with the "scroll to" behaviour).

  • Ok if it's a sorted one dimension array that makes things a lot simpler.

    For each x,

    If array.curvalue = array.at(curx+1)

    Or

    If array.curvalue = array.at(curx-1)

    (Do nothing)

    Else

    Delete array index array.curx

  • How large is your number/value range, and how large is your array? The straight forward method will be pretty resource intensive if you have a lot of numbers and/or a large array to check.

    You might want to approach this from a different angle, depending on your situation. How is your array being generated in the first place?

  • There are a million different ways to do it in photoshop. Try asking on a photoshop/graphic design forum.

  • You are not using localstorage properly.

    After a "Get Item" action, the LocalStorage plugin does not have a value until "On Item Get" triggers.

    https://www.scirra.com/manual/188/local-storage

    [quote:2x421knt]Local Storage is asynchronous. This means reading and writing data does not complete immediately. The actions only start the process of reading or writing a value, and the game continues to run in the interim. This ensures that slow or busy storage systems do not impact the performance of the game. When the read or write is complete, a trigger fires (On item get or On item set) which indicates either the value is available to read (with the ItemValue expression) or that the value was successfully written.

    Basically, think of LocalStorage as a database server (that happens to be on the same computer as your program). You send it a request, and don't how long it will take to reply. Use the "On Item Get" condition trigger to "catch" the reply when it comes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Made a quick example for my own reference, sharing in case it can be of use for others.

    https://www.dropbox.com/s/mp7zrro7tynna ... .capx?dl=0

    ref: https://en.wikipedia.org/wiki/Smoothstep

  • Thanks, that'll do it. I missed that post completely. Too bad it isn't available yet. I guess multiplayer isn't really available for free version either anyway.

    Going to mention I would never have found it on my own without reading that blog article. I hope it gets added to the menu dropdown.

  • Update regarding the bounce, it isn't a bug or a rounding error, realized the ball collision box is just drawn a bit wonky.

    Although still, C2 and C3 versions behave differently for me - I don't know if this is supposed to happen.

    https://www.dropbox.com/s/q8knlvbs08e9e ... .capx?dl=0

    https://www.dropbox.com/s/qdsai6603tijx ... 3.c3p?dl=0

  • Sorry not sure I understand what your question is, but everything you need to know should be here https://www.scirra.com/tutorials/70/off ... onstruct-2 and here https://www.scirra.com/manual/110/browser

  • I don't mind looking, but I can promise nothing ahead of time regarding if I can actually get it working or not...

  • Any way to duplicate a project preview tab/window with C3?

    Useful for local testing of multiplayer. I could do it with C2, but not C3.

    EDIT: Found a workaround, just have to have two instances of C3 open with the same project, they can each open a preview. Being able to do this from one open project would be nice for changes made during the testing process (so the changes don't need to be saved/reopened in the second tab just to test).

    In an somewhat unrelated note, I seem to have found a bug in the pong example when the puck is sent on a near vertical trajectory. It is actually possible for it to reverse its direction during its travel across the screen! Results in one paddle being able to hit it consecutively without the puck reaching the other side.

    I suspect a rounding error with the bouncing behavior... but it was pretty significant if it can reverse the travel direction of the puck. I'm not sure if it is worth looking into, but I'm mentioning it here because I was able to reproduce this three times when the Construct 3 preview was hosting a Construct 2 preview, but not when I used two Construct 2 versions playing against each other. I wonder if there is any difference that might be worth checking out.

    I would put together a better testing environment/isolated example for a proper bug report, but the current C3 limitations prevent me from doing so at the moment.