dop2000's Recent Forum Activity

  • I'm not sure what's going on in your code, but the For each loop is working and it does change each of the 5 Brain arrays.

    You can check it yourself - run the game in Debug mode, select one of the arrays and see the values changing every 5 seconds.

    You can also add Browser->Log to this loop to output debug messages.

    For example: Browser Log Brain.UID, you'll see that all 5 Brain UIDs are processed.

  • GabrielIq

    You need to save the skin in a global variable (or a dictionary). On start of another layout, set animation frame to skin variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes.

    And also, I suggest you replace "Pause timer" with "Remove timer" in event #8 too.

    Then you will be able to check if the timer is running by comparing Timer1.ElapsedTime("UpgradeTimer")

    If ElapsedTime=0, the timer is not running, if it's >0, then it's running.

    You could remove the OnUpgrade variable and all those events where you save/load it to local storage.

  • I know one scenario where Pin behavior can cause lagging:

    Create 3 sprites A, B, C.

    Add Bullet or Drag and Drop behavior to A.

    Pin B to A.

    On every tick set C sprite position to (B.x, B.y)

    You'll see that A and B move together, but C is lagging behind. I'm guessing that's because Pin behavior updates coordinates of pinned objects at the end of the frame, after all other behaviors and events.

    So maybe you have something similar in your game. The solution would be not to use (x, y) coordinates of pinned objects in any events or calculations.

    [quote:15t8snbl]Just as a query what is the standard procedure for pinning an object, create then pin, right?? it doesn't need an every tick function or anything, I am assuming??

    Correct. Create and pin, no need to "re-pin" on every tick.

  • Sure, but you'll need to figure out the ratio of movement speed to animation speed.

    Say, if normal movement speed is 50px/sec and normal animation speed is 10 frames/sec, then you can do this:

    Sprite Set Animation Speed to (MovementSpeed/5)

    When movement speed increases to 100px/sec, animation speed will also increase to 20 frames/sec.

    Or if you want a much bigger increase in animation speed, you can modify the formula to something like this:

    Sprite Set Animation Speed to (10+(MovementSpeed-50)/2)

  • Could you share a capx demonstrating the problem?

  • On start of layout all sprites used on this layout with all their animation frames are loaded into the memory.

    So having a separate object for each layout is better for performance.

  • Does the number of coins decreases?

    Please share your capx, it's hard to guess what could be causing the problem without it.

  • Interinactive, I replied you in PM

  • You should change viewport size to 500x500 in project properties, not the layout size.

    Or you can enable Unbounded scrolling for the layout, but then you can get empty white space if your character moves too close to edges.

dop2000's avatar

dop2000

Online Now

Member since 26 May, 2016
Last online 12 Mar, 2025

Twitter
dop2000 has 262 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