dop2000's Recent Forum Activity

  • GetAsBeautifiedString() expression returns a portion of JSON as a string, which contains key names and values, with quotation marks "" and line breaks. These special characters need to be escaped with "\" if you want to store them in JSON as a string.

    To be honest, I don't understand what you are trying to do. If you want to copy all values from "Equip.0" into "Item", use Set JSON action:

    JSON Set JSON: "Item" to JSON.GetAsCompactString("Equip.0")

  • Your events 26-27 can potentially run on every tick. And you have "Wait" action in them. This can cause serious problems.

    My guess is that the issue you are having is caused by that Wait action - even when the condition becomes false, all delayed actions from previous ticks will continue to run for 3 seconds! And if you reset isFinished to false in some other event, these delayed actions will continue to set it to true for 3 seconds.

    Use Timer behavior instead of wait - Timer runs per instance and can be stopped or paused.

  • You do not have permission to view this post

  • when I used the action to set collision cell size to 10x10 it reduces the checks down from 125000 to 800.

    This is insane! I wonder if collision checks actually work correctly with such heavy optimization.

    Ashley Could you comment? 125000 to 800 seems too good to be true.

  • So I tested again and here are the results:

    There are 1000 instances of sprite A and 1000 instances of sprite B. Animation frame is set to 1 for half of them.

    250K collision checks per tick - collision cells are working.

    125K collision checks - collision cells are working. And it's more efficient because we eliminate half of A instances.

    500K collision checks - collision cells are NOT working.

    Test project:

    dropbox.com/scl/fi/u8tlp28lh0fj87yh1n6n9/coll_cell_test.c3p

  • The way you are using functions is very wrong. Functions should be at the top level, avoid nesting them under other events or conditions. Also, "Every X seconds" inside the function won't work.

    And that chain of functions calling each other is completely unnecessary..

    Say, you want to spawn a new wave of sharks every 2 seconds. And each wave should contain 5 more sharks. Then you can do something like this:

  • Yeah, you are right! With no sub-events I get ~430 iterations. With two nested sub-events only 163

  • You are adding children to Button family. It should be "ButtonNormal add child ButtonPressed".

    Even if Button and ButtonNormal is the same object, Construct treats the family as a different object in events, allowing to pick family instances independently from object instances.

    Also, the second event should probably look like this:

    Cursor is over ButtonNormal 
    Cursor Left button is down
    .. ButtonNormal pick child ButtonPressed : ButtonPressed set visible
    Else 
    .. ButtonNormal pick child ButtonPressed : ButtonPressed set invisible
    

    And by the way, while hierarchies is an awesome feature in Construct, in this particular case it would be better to use a container instead. Then both objects in a container will exist as a pair, creating one will automatically create another, picking one will pick another and so on.

  • This is odd, I'm getting the same v=237 on my laptop and desktop pc. And then "Maximum call stack size exceeded" error in console.

  • Weird, I just tested with 2000 sprite instances, and I'm getting the same number of collision checks and the same fps with "Is overlapping" being the first, second or only condition in the event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I did a test to see how many times I can call a function recursively in C3:

    And the answer is 237.

    Is this a hard limit? Or can it be higher/lower on other devices, depending on the amount of RAM etc.?

    Tagged:

dop2000's avatar

dop2000

Online Now

Member since 26 May, 2016
Last online 27 Nov, 2024

Twitter
dop2000 has 248 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
  • x4
    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