dop2000's Recent Forum Activity

    what if the temperature of your integrated graphics is getting too high and throttling itself, but other apps on your computer are using the dedicated Nvidia GPU which means other apps wouldn't freeze at all?

    dGPU on this laptop is only enabled when gaming. All other apps are using integrated graphics. There is an icon in windows tray that shows when a program is using dGPU, so I'm sure about this.

    Yeah, I also tried to force Chrome to use dGPU in the past, but didn't have any luck.

    The temps are low when I'm working in C3, I've checked them many times. But to test your theory, next time the editor starts to lag I'll put a large ice pack under the laptop, see if it helps :)

    XHXIAIEIN Nvidia GPU is disabled when I'm working in Construct. It uses the integrated Radeon graphics.

    Regarding some problem with the power - I guess this may be possible, but it would probably affect all apps. Like I said, other apps are not affected by these freezes.

    1StepCloser Thanks for posting that bug report!

    I haven't tried the latest beta yet. I expect it will probably make the freezes shorter, but won't fix them completely, because something else (not autocomplete) is causing these lags in my case.

    Yesterday my Chrome was lagging almost non-stop for about half an hour. Even opening the project was taking 3-5 minutes instead of the usual 10-20 seconds. And today there were barely any lags. This randomness is driving me crazy!

    Asmodean I tried your suggestions. Chrome with disabled hardware acceleration - still freezes. Edge - same thing. So it must be something specific to the Chromium engine.

    Firefox - no freezes, but it's just generally quite slow. My game runs at 100 fps in Chrome, but only at 30-40 fps in Firefox.

  • Another option is to keep using instance variables on the Player sprite, but make the Player sprite global.

    The global instance of the Player sprite will automatically move to another layout with all its instance variables. All you need to do is set its position and maybe move to the correct layer.

    You need to be very careful - keep only one copy of the Player in the project (put it on the first layout), don't create new instances and don't destroy it. It's very easy to make a mistake and end up with multiple instances of the object, which will cause all kinds of bugs. That's why I don't recommend this method.

  • You don't have to transform all instance variables to global. Only those which need to be preserved when switching layouts.

    Working with Dictionary is easy and not much different from global variables.

    You can give any names to dictionary keys. For example:

    Dictionary set "lives" to 5

    Dictionary set "score" to (self.get("score")+100)

    Dictionary Compare "lives" value=0 : Player play animation "death"

    etc.

    There are probably some tutorials and lessons on how to use dictionaries, try googling.

  • Most common method is to use global variables for values which you need to be available across multiple layouts. You can also use dictionaries, arrays, JSONs.

  • Where do you currently store this progress? Is it in instance variables on the player sprite, or in global variables?

    With global variables, the progress should not reset when you switch between layouts. Unless you perform "Reset global variables" action, in which case - don't :)

    You can also use a Dictionary to store things like player stats, gold, scores etc. One advantage of dictionaries is that they can easily be saved in Local Storage.

  • Are you pasting the sprite on the Canvas? Try waiting longer before destroying the sprite - use "Wait 0.2s" instead of "Wait for previous action"

  • You can use the same approach for string variables. If you want to compare a part of the string, use expressions like find(), left(), right(), lowercase() etc.

    But then you will need to pick instances using System events, for example:

    System Pick Workers by evaluating Left(Worker.name,4)="John"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I assume the workers are instances of the same sprite?

    I strongly suggest using number variables instead of boolean - they are much easier to work with in Construct. Just assign 0 for false and 1 for true.

    For example, to count the number of workers who have plague, you can use this code

    Local variable n
    Local variable percentage
    
    For each Worker
    Worker hasPlaque=1 : Add 1 to n
    
    Set percentage to int((n/Worker.count)*100)
    

    Another method without the loop:

    Worker hasPlaque=1 : Set percentage to int((Worker.pickedCount/Worker.count)*100)
    

    Basically pick instances by comparing instance variables and count them. When multiple instances are picked, you can use Object.pickedCount expression. For total number of instances use Object.count expression.

  • Another option is to use Permutation Table feature of the Advanced Random plugin.

    dropbox.com/scl/fi/2zm5qvovopd01po0rzs2f/TilemapPermutation.c3p

  • It will be much easier to use MoveTo behavior here - you can give it waypoints for the entire path.

    If you need to use Tween, I would suggest giving tags to tweens. Move them all into a function. Instead of using "Repeat 10 times" loop, run the function once. When the last tween ends (use "On Tween Finished" trigger), run the function again.

dop2000's avatar

dop2000

Online Now

Member since 26 May, 2016
Last online 4 Feb, 2025

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • 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
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • 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
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies