oosyrag's Recent Forum Activity

  • This is why sprite fonts and web fonts are a thing.

  • This may not be possible with C2 as it currently stands.

    You can append a caret to the text object. The only way I can think of to get the position of the last character is if you placed every character in its own instance of a text object, which is possible, but probably not very elegant.

  • Are all the sprites one object or separate? If it is one object you can use a loop and a counter.

    First set CounterVariable to 0.

    Repeat Sprite.Count times - Add Sprite(loopindex).Width to CounterVariable.

    Make sure the loop runs by trigger and not every tick.

    If they are separate objects you should be able to do the same thing with family.

  • 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

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies