dop2000's Forum Posts

  • Here is what I usually do in my projects -

    in Loader layout: On start of layout -> Check if Local Storage item exists -> Wait 1 second -> Go to Main layout

    One second should be enough to read data from LS, and I never read it again in other parts of the game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • simstratic Awesome analysis! How do you know so much about the inner workings of Construct?

  • simstratic Yeah, there's probably a lot of optimization going on.. Looks like the polygon shape matters more than the number of points. The polygon on the right has fewer points, but it's slower than the left one!

    Anyway, I'm still testing with an extreme number of collision checks. If there is one ball in the game, adding 5-10 extra points to its polygon for a more rounded shape will not cause any problems.

  • If you set the text color with code, you can also save this color value in a variable (global or instance). Or in 3 variables for r, g, b. Then you'll be able to compare the variable.

  • Here you go:

  • jobel Splitting the image into multiple parts, and pinning them to some base object (with drag&drop behavior) will require a lot more effort. And I imagine performance wise it will be much worse than one object with a complex collision polygon.

  • I think it's a bug, but a really cool one! :)

  • jobel I sometimes need more than 10 points, when the shape is very complex, or when I need a perfect curve/circle, or like in this example when I needed to make a hole in the sprite:

    Cascade Games I did test on mobile with a smaller number of objects, and the difference in performance is still around 30%. Like I mentioned, it's an extreme case - 20 points per polygon is a lot! And 2.5M collision checks per second is something that should never happen in a real game.

  • We've all seen this warning message displayed when you are trying to add more than 8 points to a collision polygon.

    I decided to test if complex collision polygons are really that bad for performance. Here is the test project.

    Note, that this test is quite extreme - there are 210 rotating objects, each object is tested for overlapping with all other objects on every tick. That's about 2.5 million collision checks per second!

    And yet on my mid-level laptop the difference between 4 points and 20 points in the collision polygon is really not that big!

    I'm also working on another project, where people can load a custom image and its collision polygon is detected automatically. As a result, some images might have 200-300 points in their collision polygon. And this still doesn't cause any noticeable performance issues.

    Conclusion:

    First of all - kudos to Scirra for optimizing collision checks!

    Second - don't be afraid to add a few extra points when needed. But of course, try to keep the number of collision checks low.

    And finally - I think the threshold for that warning needs to be increased. Maybe show it after adding 15 or 20 points. And I would really like to be able to click "never show this message again" and hide if forever.

  • Text object doesn't have ColorValue expression for some reason.

    You can do it with SpriteFont, for example:

    SpriteFont.colorValue = rgbEx255(0,0,255)

  • I can't open your link. Here is what you need to do:

    .

  • Yes, it should print any image you give it. It can be a system canvas snapshot, or DrawingCanvas saved image or anything else.

  • In new Construct beta r215 you can make snapshot of a portion of the screen.

    construct.net/en/make-games/releases/beta/r215

  • Disable diagonals in Pathfinding, add MoveTo behavoior with Rotate speed=0.

    On path found -> use MoveTo "Move along pathfinding path" action.