How to manage Areas/Levels in an RPG?

Posted by Hexlan on Game Development See other posts from Game Development or by Hexlan
Published on 2014-06-06T14:26:30Z Indexed on 2014/06/06 15:43 UTC
Read the original article Hit count: 239

Filed under:
|
|

I'm working on an RPG and I'm trying to figure out how to manage the different levels/areas in the game. Currently I create a new state (source file) for every area, defining its unique aspects. My concern is that as the game grows the number of class files will become unmanageable with all the towns, houses, shops, dungeons, etc. that I need to keep track of.

I would also prefer to separate my levels from the source code because non-programmer members of the team will be creating levels, and I would like the engine to be as free from game specific code as possible.

I'm thinking of creating a class that provides all the functions that will be the same between all the levels/areas with a unique member variable that can be used to look up level specifics from data. This way I only need to define level/area once in the code, but can create multiple instances each with its own unique aspects provided by data.

Is this a good way to go about solving the issue? Is there a better way to handle a growing number of levels?

© Game Development or respective owner

Related posts about rpg

Related posts about data