dop2000's Forum Posts

  • You mean the framerate was set to "unlimited"? Yeah, that option should only be used for stress-testing.

    Check the refresh rate of your monitor - if it's high like 120-240Hz, as an experiment try reducing it to 60. See if this improves the CPU usage even further.

  • Where are you planning to store these words?

    If it's a comma-separated string (like "apple,banana,pear"), you can use tokenat/tokencount expressions:

    Set word to tokenat(list, random(tokencount(list,",")), ",")

    You can also store words in an array, then you can get a random word using Array.At(random(self.width))

  • It depends on what you do with these images. If you allow to load many of them, then yes, this may cause problems.

    One solution would be loading an image into a sprite, resize the sprite to the size of the drawing canvas, paste it on the canvas, then destroy the sprite and unload it from memory.

    This way you'll end up with a small version of the image.

  • Now, to figure out why my bullet spawns at my feet every so often when I fire too fast...

    Do you spawn the bullet at a specific image point on the character sprite? Maybe that image point is missing in one of the frames.

  • You've done a great job troubleshooting!

    34% usage by engine seems quite high.. It's possible that the issue is not with your project. Have you checked CPU usage in other projects? For example, try the Kiwi Story game - is the performance much better there? For reference, on my pretty old laptop I'm getting about 25% total CPU utilization, 10% draw calls and only 2% engine.

    If the numbers are much higher on your machine, try different browsers - Edge, Chrome, Firefox. Try enabling/disabling worker mode in project properties.

    Check in debug mode if webgl2 is enabled. If not, then all graphic tasks are handled by the CPU.

  • You can use Array.indexOf(value) expression. If Array.indexOf(value)<0, this means the value was not found in the array. For example:

    System Compare Two Values: Array.indexOf(Sprite.var)<0
    ... Sprite set animation frame 0
    Else 
    ... Sprite set animation frame 1
    
  • It could be a bug similar to this:

    github.com/Scirra/Construct-3-bugs/issues/5570

    After using the Crop tool, try closing the animation editor. Then open it and adjust the positions of image points.

    If you are certain you found a bug and can reproduce it - please post a bug report.

  • If you are writing to different keys, there shouldn't be any problems.

    If you are setting the same key multiple times in one tick, I'm guessing the latest value will always be recorded.

    You should avoid writing to LS and reading the same key from LS at the same time, because in this case the results may be unpredictable.

  • There is an official template in C3:

    editor.construct.net

  • Just random 4 digits? What things did you try?

    Try zeropad(int(random(10000)), 4)

  • the instance variable it has is inside of an array

    I don't know what you mean by that.

    To set animation frame to an instance variable you can use this action:

    Sprite set frame to self.Var

    To set animation frame to a value from an array:

    Sprite set frame to Array.At(index)

  • There are many ways to store values - in a dictionary, JSON, array, in instance variables on some object, in Local Storage.

    I would suggest using a dictionary - copy the variables which you wish to keep to the dictionary. Then reset global variables. Then restore the values from the dictionary.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You mean you want to rotate the sprite smoothly to the target angle?

    You can use one of these methods, run them on every tick:

    Rotate 1 degree towards angle self.simAngle

    or

    Sprite set angle to anglelerp(self.angle, self.simAngle, dt*4)

  • I don't know which errors in the log are relevant. Try to disable Worker mode in project properties. Try a different browser.

  • I don't own a steam deck, but I can confirm that it can run C3 games, and all controls are functional.

    There appears to be a problem though with gigabytes of some junk files which are created every time you play and filling up the internal storage. Not sure yet what's causing this and how to fix it.