dop2000's Forum Posts

  • I’m not using an animation with a multiple-frame setup, each of my objects is an individual sprite.

    You could use the family in all events instead of spCard sprite. But I suggest combining your objects into a single sprite with multiple animations.

    found a small bug in your project, when I drag a card and drop it somewhere other than the slot, it goes back to its position, but I can’t drag the same card again; it gets stuck.

    Strange, it works fine for me.

  • What about the example I sent you yesterday on Discord? I just want to understand why you're asking the same question again.

  • After a failed attempt to open a project, press F12 and check for error messages in the console log.

    I would also try a different browser.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can do parabolic motion with either qarp or tween, you don't need both.

    With tween:

    tween x from X1 to X2 in T seconds, linear ease
    tween y from Y1 to Y2 in T/2 seconds, OutSine ease, ping-pong
    
  • Line of sight uses origin points, and your walls are blocking each other, for example:

    This will be difficult to fix. You'll probably have to make collision polygons slightly smaller and add invisible "detector" sprites to each corner of each wall block. And then check LOS to those detectors. If at least one of them is in sight, then the whole block is considered as visible.

    Also, I strongly suggest scaling everything up, say, use 32x32 px blocks. Having 1x1 px objects is super inconvenient and applies many limitations.

  • You need to share your project file - upload to any file exchange service and post the link here.

  • Ashley Could you please explain this anomaly, which R0J0hound pointed out?

    Logically, both events are identical, yet there's a huge difference in performance! Which I can also observe in Windows Task Manager and Resource Monitor.

    Is this a bug?

  • There is no official raycasting in C2. But I remember there was a plugin, maybe you could find it.

    Another option is to draw a line (sprite or tiledbackground), until it overlaps the target. See these links

    howtoconstructdemos.com/lasers-hitting-obstacles-c2-version-without-raycasting-capx

    construct.net/en/tutorials/lightning-fast-raycasting-587

  • It's not really about collisions or visibility, it's about picking. Replace "is visible" with any other condition, say, "is animation playing" - and the result will be the same.

  • And oddly enough number two performs just as bad if the "system compare" was directly below the loop instead of in a sub-event.

    You are right, wow...

  • Yeah, but +55% CPU usage - it makes no sense! And if I move the "is visible" condition inside the loop, the difference is only 3%

  • Here is another fun example - a massive 55% difference in CPU utilization when I replace the condition inside the loop:

    Can anyone explain?

    Project file:

    dropbox.com/scl/fi/l01aj1fqnc916d78gob70/LoopPerformanceTest.c3p

  • Well, this completely shatters my belief system... I always thought filtering the SOL before running a For Each loop was more efficient.

    And it’s not even about collision checks - the same thing happens if you use any other condition inside the loop, like 'Compare instance variable'.

  • According to chatgpt:

    The spellcheck attribute (<input spellcheck="true"> or <textarea spellcheck="true">) only enables or disables the browser’s built-in spellchecking.

    Browsers do not expose the results of that spellcheck to JavaScript for privacy and security reasons (e.g., otherwise scripts could snoop on what words you mistype).

    You can enable/disable browser spellcheck, but you cannot read the error state programmatically. If you need programmatic access, you must implement your own spellcheck system.

  • The image points are defined on the enemy sprite, not on blocks. And it's easy to replace blocks with a tilemap:

    dropbox.com/scl/fi/s813xhmap2se856wdzta0/WalkAroundWalls_Tilemap.c3p