Sign in to follow this  
wendrowyek

Npclist in Role-playing games.

Recommended Posts

I am quite interested in how, most role-playing games handle the list of npcs (monsters, shopkeepers) etc.
Are they loaded all at once from HD to memory, into an array or list, when the player starts a new game?
Are they retrieved during the loading screen of each map?

Thanks for your advice.

Share this post


Link to post
Share on other sites
They are probably stored in a vector or array and once they are dead, they are deleted from memory. I'm not completely sure, but that's how I'd do it.

Share this post


Link to post
Share on other sites
This question can have many answers. If the RPG had "levels" or different "lands" then it may read the level from the HD, and load all the entities into memory (usually stored in some kind of list, be it a vector, list, aray, whatever, it isn't important). If the RPG is one huge world, and the zone are loaded seemlessly, then it probably loads to and unloads from memory dynamically, and just loads the npc's within a certain range of the player.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this