Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Free/Release Sprites?

Author
Message
Gibbon28
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location: Derbyshire, UK
Posted: 26th Oct 2012 11:37
Hi, i have a problem that im trying to debug and cant figure out what the issue is.

I have a level with a about 8 sprites, 4 of are simple physics.

which are "clickable" so clicking on them have an effect, there is also a reset button that resets the level. But after so many resets, everything becomes "unclickable" including the reset button, despite it not locking up, animations are still running fine etc.

When i click the reset button i run a function that deletes the sprites then re-creats the level, but ive noticed that even though i delete the sprites and re-create the ID incriemnt everytime i reset the level?

Are they being free'd?

Otherwise is there any other issue to why this may be happenening?

Thank you
Andy
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2012 15:14
Hard to say without seeing some code I'm afraid. We'll need a little more information like:
1-How are the sprites created
2-How are they being deleted
etc.


this.mess = abs(sin(times#))
Gibbon28
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location: Derbyshire, UK
Posted: 26th Oct 2012 15:16
After much debugging and loss of hair, it turned out that after so many "level restarts" despite running the exact same functions and loops, on every 17th time the auto "depth" of images were the problem.

I can only assume its a bug, becase although all sprites were visible and the background sprite was behind all others, it was the backgeround sprite that was blocking all clicks on other sprites, so it was 'acting' like it was infront of all other sprites, even though it was behind them all, visibly?

Strange one...

Thanks
Andy
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2012 15:18
Can you package the project and email it to me? I'll see if it's an AppGameKit bug and pass it on.


this.mess = abs(sin(times#))

Login to post a reply

Server time is: 2024-04-28 19:14:51
Your offset time is: 2024-04-28 19:14:51