Game Development Community

Sprites disappearing

by Jon Scarborough · in Torque Game Builder · 09/05/2009 (12:48 am) · 2 replies

I've been plugging along nicely on my first game using Torque for the last few weeks, but I've run into the first problem I can't solve by searching the forums.

For no apparent reason, out of the blue, I'm getting some really strange behavior from new sprites that I add to the project. In the TGB editor, I'll drag a sprite onto the canvas. Instead of seeing the sprite, I'll just see the handles where the sprite should be. If I zoom in far enough though suddenly the sprite will appear. Zoom out and it's gone again. I'm not zooming in our out that far, just the normal moving around the canvas you'd do while editing a level.

Even stranger, when I start the game the sprites will show up for 3-4 seconds, and then disappear. Sprites that have been in the project a long time seem fine; it's only the ones added in the last 2 days that are doing this.

Anyone seen anything like this? I'm pretty much stuck until I can find a solution.

Thanks!

About the author

Recent Threads

  • Font problems

  • #1
    09/05/2009 (5:06 am)
    I know this is really simple, but easy to forget or overlook. Did you double check the physics (gravitic) and/or grouping of your new sprites?
    #2
    09/05/2009 (7:27 am)
    I did, and I didn't see anything that looked unusual.

    More late-night tinkering has narrowed down the problem though, it seems to be connected to the use of scrollers, which I'd added to the project about the time the problem started. I removed them from the scene, and everything else appeared as normal again.

    These weren't large scrollers, they were two small ones that I was using to create an effect.

    In my current project I'm able to reproduce this easily now. I add a scroller - any scroller - to the project. Any sprites I add after that are invisible until I zoom in far enough. Take them out and everything is fine again. What's interesting, is that if I do an undo to reverse the deletion of the scrollers, everything is still fine, even with the objects that I'd previously added afterwards. So there's definitely something going on with the order of the objects in the project.

    I tried to recreate this behavior in a fresh project but was unable to do so.