I'm currently doing some RPG components containing all the stuff you need to create RPG's like Dialog, Spell and Item handling, Abillities etc.
The components will be quite easy to use with any graphics engine.

I have a little nut to crack however. I'm not sure what technique is best to use to keep track of NPC's throughout the world. The way I was thinking, was that the player and NPC's uses the same structure to keep things simple. The structure contains stuff like health and position. The idea is to have the main player search for potential "targets" within a certan distance.

So, the problem is: how do I keep track of all the NPC's? I thought about using LinkedLists or something, but I could really use some advice from someone more experienced than me. Also, the components should be able to diside what gets drawn. Is this possible while still keeping the "independant graphics engine" principle, or should I just write a graphics engine aswell?