dop2000's Forum Posts

  • You can set a Timer when the character collides with a spike. Only reduce its health if the "invincibility" timer is not running. Or you can use a variable for the same purpose.

    Player On Collision with Spike
    compare variable InvincibleTime<time
    ... Player Subtract damage from health
    ... Set variable InvincibleTime to (time+2)
    
  • We're making the Moonstone Island - a creature collecting life-sim set in an open world with over 100 islands to explore! Our alpha demo is currently playable as part of the Steam Base Builder Fest and will be available until January 30th at 10AM PST! Please wishlist the game as it helps us a lot. Thank you!

    Download Moonstone Island Demo on Steam

  • We're making a creature collecting life-sim set in an open world with over 100 islands to explore! Our alpha demo is currently playable as part of the Steam Base Builder Fest and will be available until January 30th at 10AM PST!

    Please wishlist the game as it helps us a lot. Thank you!

    Download Moonstone Island Demo on Steam

    Download Moonstone Island Demo on Steam

  • understand but what if i have placed Sprie already on the map?

    "On created" will still be triggered for them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • Yes, you can use "On end of layout"

  • You do not have permission to view this post

  • Sprite On Created: Sprite set var to random(10,30)

    Note, if you want an integer number from 10 to 30, the correct expression is int(random(10,31))

  • Have you tried working on a project that's been opened for a few hours vs. the same one that's been freshly opened?

    So I was working for 8 straight hours today without closing the project. I can confirm that there is no memory leak in my case. Chrome memory usage stays at around 3.5 GB. Sometimes it goes up to 5-6 GB (when I open more tabs or preview the project), but eventually returns to 3.5 GB. And it seems to be unrelated to the lagging issue. I first noticed lagging after about 10-15 minutes, and memory usage was at 3.5 GB at that time.

  • Those are the collisions... Not sure if it's too high, I don't have a reference.

    Is this before or after you made those changed to the events?

    ~200 collisions per tick is perfectly fine. Even 1000-2000 per tick should not be causing major lags on mobile. So if the game still runs poorly on mobile, then the issue is with something else.

    Make sure that Framerate Mode is set to "V-synced" in project properties.

  • It's a single file project. Like I said, saving was very fast if no changes were made to any images. I assume, this means that Construct was not updating the images folder in the zip.

    Perhaps now with Zip64, the editor doesn't perform this optimization and re-packs all files every time.

  • How many collision and poly checks per second your game does? You can check these values in the debug view.

    You can try disabling groups of events to see if the performance improves. It's possible that the problem is not with physics, but with lots of events running on every tick.

    I also suggest adding a parent condition "Body Physics is enabled" to the event which disabled Physics:

    Body Physics is enabled
    ... Body is overlapping floors
    ... Or Body is overlapping floor_tiled : Body Disable Physics
    

    This will reduce the number of collision checks.

    And do the same for other events in that group.

  • Repeat 10 times
    ... Wait 0.1*loopindex
    ... Audio play sound
    
  • Yeah, you don't need a plugin, just add an empty script, paste those lines (const sdkElem ....) into the script.

    Set script purpose to "Main script" on the properties panel.

    After that you can insert small inline scripts into your events - to initialize the SDK, to show ads, to start/stop the gameplay etc. Here is an example from my game:

    By the way, has anyone had good experience with Crazy Games? I published two games with them, but the revenue was quite poor.

  • There is a lot of graphics in my project (over 13K images). So whenever I make any changes to sprites, it takes about a minute to save the project. I'm guessing this is because Construct has to re-index all those files, or perhaps re-add them to the c3p archive.

    However, in the previous stable version, when I made changes only in event sheets, saving was almost instant. Which was great, because I mostly work with code.

    In the new stable version it doesn't matter if I change events or sprites, saving always take the same amount of time - the progress slowly crawls from 0% to 40% and then speed up to 100%. So looks like image files are always re-indexed/re-added in the archive.

    Ashley Can this be optimized?