Hello, everyone. I’m making a game that is basically a clone of Pokemon. As those of you who have played know, there are hundreds and hundred of NPCs, each with a name, and something stupid and inane to say. I’m not quite sure how to store these guys. The best example I have is just the stuff from my Java gaming books, where there are no NPCs.
What I’m thinking is that I should have an array of the NPCs, and one class that takes a name (of an NPC), and updates that specific NPC. There would be a method that uses the player’s current position to detect NPC paths within the view (I want to animate the NPC even if only the path, and not the NPC itself, is in view). Then, for each one, it would update it. Oh, and the paths are numbered according to which NPC it is (if the path is 4, it will update npcArray[4]).
Sorry for the convoluted idea. Right now it is the best I have. If there is a better way of doing it, or a good example somewhere in this forum I didn’t find (I looked), I would love if someone could share with me. Oh, and thanks for your help with the last problem I had, too (the keyboard thing).