random sprite crashes plus other weirdness

This forum is currently in read-only mode.
From the Asset Store
No Ad-Sharing, Fully Open Source, No Remote Control, Well maintained
  • I'm getting random crashes in the sprite plugin. Can't quite figure out why, as it's not consistent.

    Also, sometimes my explosion-particle systems are not being placed where they should, and I can't figure out why.

    Also, the timer that respawns the player (set as a behavior on the background) seems to get mixed with the timer that creates meteorites on each level after you clear one (set to the player sprite), so that if you die once, meteorites keep appearing over and over.

    here's the .cap with the game. Requires Spritefont and Heightmap plus. The error was present even before using spritefont... I'm just polishing it =)


    Please, try playing it a few times to get the crash, get killed early to trigger the meteorite bug, fire a lot to get the explosion bug.

    Help with any of these issues is greatly appreciated =)

  • Well I noticed the random explosions toward the center of the screen (to the left, usually three at once if that helps), seems to happen when asteroids are destroyed towards the bottom right.

    I did notice the ever increasing number of asteroids, but simply put that down to you being a cruel horrible person and making it insanely difficult after reading my mind when I said to myself "meh this is too easy" and thus quadrupling everything a minute later LOL!

    But I couldn't for the life of me get it to crash, and I've been playing it for a while now.

  • yeah I thought I had to adjust the difficulty formula, but then I noticed big asteroids appearing when there was supposed to be none left. I realised the timer that spawns them is being fired somehow in the middle of the level.... I suspect memory corruption.

    Also the 3 or 4 explosions are supposed to be placed in the same spot. When those show up, they do in the place I've put them in the layout.... it means they didn't get repositioned, which is really weird if you look at the events.

  • I'm not sure if it's a bug, or more like incomplete, any way yeah you can only use one named timer on the timer behavior. It is doable if you add an new behavior for each named timer you need.

    .... oh Rich... where are youuuu?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I FIGURED THE BUGS OUT! (woohoo!)

    Okay, so one of them was indeed two distinct timers on the same timer object. Nice one, Newt!

    The second bug (explosions not getting set sometimes) is rather obscure but:

    I was spawning explosions, setting their positions to a meteorite and then destroying said meteorite on laser collision with that meteorite.

    Turns out that sometimes a laser would hit more than one meteorite. This means the actions get run once for each meteorite.... but when destroying the meteorite, Construct destroys the whole matched list of them! So on the next run, there is no meteorite to set the explosions to, and sometimes the runtime crashes.

    This one is probably a bug. I got around it by adding "on each meteorite" after the "on collision" condition.... so now for each collided meteorite explosions get spawned and meteorite gets deleted.... one by one.

    I hope this was the source of the crashes.... so I can release the game

  • Are these bugs in the tracker? Which action was crashing with no meteorites? (It ought to handle zero objects fine)

  • Are these bugs in the tracker? Which action was crashing with no meteorites? (It ought to handle zero objects fine)

    I'm not exactly sure, it was hard to reproduce... but involved an event matching multiple objects in the condition, then referencing one of them in the actions, then deleting it (which instead of deleting one, deletes all of them in that call, which in turn messes up the remaining calls).

    I think I can whip up a test case now. It's not in the tracker, I just figured it out.

    EDIT: crash is still there apparently it's unrelated to the explosions thing, which is fixed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)