I have a situation where my game objects can disappear off the edge of the screen, but continue to exist. The player needs to know where these objects are so that he can track/follow/avoid them. Rather than a radar, I prefer the idea of having little icons which float around the edge of the screen, in the direction of the objects.
I'm trying to work out the best way to do this. One idea I'm thinking is that when the object is created, an icon object is created at the same time, with some sort of ID for both - i.e they could both have a variable which is set to the same value. The game then needs to check each frame to see if the object is on the screen - if it is, the corresponding icon has it's visibility turned off - if it isn't, the icon is made visible and it's position calculated. And of course, when the main object is destroyed, the icon has to be destroyed too.
This would probably work but sounds a bit intensive and fiddly.
Is there a better way of doing this?