I'm trying to get a decent sprite system going and I've ran into a bit of a snag with the sprite management loop. My methods before weren't very intuitive and the way it was coded sprites always started at sprite 01. My methods are running a loop indexed with X for each sprite that's on screen. I've ran into a problem with things such as bullets that need to be destroyed and spawed often. The destroying part is the problem. The way I have it set up now, the loop that runs each bullets code takes the number on screen as the index. The problem is to destroy an entity I thought I could simply decrease the this number. It doesn't work that way I know now because once you decrease this number it could end up destroying other sprites. I got away with this on my entry for the contest by hackish code, but I'm onto a new project now and I'd like to see if anyone could show me a dead simple projectile management system idea that doesn't waste to much RAM. There just bullets and all share the same code so I don't think a linked list is needed. I also tried keeping an array if each one that was active and somehow that didn't work either.
Thanks, zkip.
Thanks, zkip.