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 / Sprite are not loading sometimes

Author
Message
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 6th Oct 2011 14:32 Edited at: 6th Oct 2011 14:34
Basically I need to know how to delete all sprites( cloned or not cloned) that are currently in use.

More Detail.

I have 500 sprites or so currently in game. The problem I am having is that sometimes when I try to go and clear the room the current room I am in then then load new graphics on the screen. The problem I am having is that some of the sprites are not replaced and the room looks funny, but when I build the project again the rooms look fine.

Here is a example using XCode.

Clone sprite some sprites like walls and traps keep track of them.
then put sprite at a certain depth.
if user steps through area transition then erase all sprites that are kept track of then erase clone more sprites.

Go through yourself at a wall.
BraindeaD
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 6th Oct 2011 15:14
Hi 3dPoint...
I don't know if you have tried this: you can keep each sprite number in an array in memory and, when you want initialize the room, just run from first element to last one doing an deletesprite from each element of the array.
Hope this help

Regards
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 6th Oct 2011 15:28
All system created sprites starts from 10001 upwards, so making a for next loop checking if they exist, then delete them should not be to hard.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 6th Oct 2011 18:19 Edited at: 6th Oct 2011 18:19
Hu if the go 10001 upwards all i have to do is mark the first sprite, and last that was created from the previous room. then delete all sprites from first to last.

Go through yourself at a wall.

Login to post a reply

Server time is: 2024-11-25 04:02:17
Your offset time is: 2024-11-25 04:02:17