How to diagnose phantom/invisible sprites

0 favourites
  • 5 posts
From the Asset Store
Build your map with these isometric objects and terrains
  • I have a game modified off of the simple Vertical Space Shooter template. The 'enemy' sprites are generated every second, and I have a animation frame of 26 images, for which I assign one at random when the new sprite is created. (Each sprite represents an object starting with one of the letters of the alphabet).

    I have another sprite that moves around to collect these items, and collision detection seems to work fine... except

    there appear to be sprites generated which don't appear visually but do trigger the collision detection. I captured some of the properties to the screen in other fields and they look like legitimate objects, they just aren't displaying (as if opacity were 0 - but it's not).

    I even see one triggered way before it's logically even generated - since I have a 8 second delay (for reading a message screen) before I start the object generation, but a collision is detected pretty much as soon as the layout starts.

    Any ideas on how to track this down?

  • Easiest way would be to post your capx file so we can take a look for you. Otherwise, we're just throwing guesses into the wind. <img src="smileys/smiley2.gif" border="0" align="middle" />

    There's probably something off about your events. It's checking for collisions differently than you're intending, your conditions for spawning objects triggers when you don't want it too, something like that. But we can't say for sure without seeing it.

  • Posting your .capx here might be a good start... :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the offer of looking at the code! Capx is here: (it's my first project so if I'm doing anything "bad" would love to know).

    There's some randomness to the whole thing, so on the Game layout, if you just let it run without moving the guy, you'll likely see a phantom collision within a minute or so.

  • Not sure what's happening there but printing out the position of the target in the collision event shows that the fist is colliding with newly spawned targets that are up off the top of the screen. I'd say it's something to do with collision detection between objects on different layers. If you put the fist on the "Game" layer it doesn't happen.

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