The endless complexities of an RPG framework

I was recently browsing the unity forums and discovered another post of someone wanting to build their own RPGs.  They naively ask the question, “How do I make a game?”  Like someone could answer in another sentence or two with the steps. 

It started me thinking about the framework I am toiling on and just how much further I need to go to reach some kind of critical mass.  I seem to be drawn down extensive learning curves over and over as I try to build out each necessary piece of the framework.

I have spent a great deal of time trying to get the right look for one outdoor scene and in the process have learned the terrain system in unity and how to manage textures and scale properly.  I have had to figure out things like the tree system and how to configure wind.  I have also learned how to do light mapping and use post processing to give everything a richer look.

Within this process, I have had to find an organized way to manage the large number of models and textures that I have setup both as source material and how they are actually used in prefabs and eventually content that is both hand specified in scenes and procedurally created.

I have found that there isn’t much to help with large libraries of all these resources and also as you acquire third party resources they always seem to be organized differently.  Since I am not an artist and can’t really manage all the art, it is hard to optimize what is in the project.  How many wood textures becomes a waste?  Things like this become important when you have a project where there can be a lot of art.  The build size depends a lot on the number of textures and their sizes and can balloon very quickly to unacceptable levels.

On the programming side, I have developed the basics of the framework, essentially foundation classes. There has to be a generic stats, ai, and container/mounting system that are all at the core of the framework.  Building this stuff isn’t easy.    

One area that was another large learning curve was figuring out animated characters and using the character controller and developing a path finding solution.  Related to this were physics and collisions among items and characters and also between characters.

Once I had all this figured out, I put in some monsters and items that are in every game of the genre – orcs, skeletons, barrels, crates, etc.  Within this environment is where I worked out the details of the basic architecture of the core classes in the framework.    

With any large game like an RPG you have a complex system that is data driven.  For my framework I put together a rather sophisticated properties system that uses JSON.  It allows for inheritance, linking, and embedding of properties.  When you build a system that has hundreds to thousands of characters, monsters, items, quests, and so on, it becomes very important.  

Related to the properties system is its twin the versioned archiving system.  You need to be able to save and restore state of an entire scene and the hundreds of objects in it both completely and reliably.  And the restore process must support upgrading of older versions.  This is a core aspect of the framework that must be done early and maintained properly or it will be a nightmare.

The other area that was a massive learning curve was the UI.  I have built a basic UI system that provides docking/stacking of windows and reusable panels.  It also provides text effects and popups.  There is a huge amount of work that is required to get a more sophisticated UI working on top of Unity.

Anyway, after all this time, I still have only a few monsters and items in a simple forest setting with a basic UI.  So, to anyone wanting to know how hard it is building an RPG in Unity or how a game is made in general.  All, I can say is that it’s a lot of work and you will need to have immense willpower to even get a 10th of the way there!  Sorry, it just isn’t that easy.

Bookmark the permalink.

2 Comments

  1. I was wondering, have you tried any of the GUI assets for Unity on the store (NGUI among others), or are you waiting for the future improvements in Unity?

  2. I am definitely waiting for the pathfinding in 3.5 before I do anymore work in that area. I integrated Aron Granberg’s pathfinding to test with. However, now I see that it has been updated to 3.0 so I may need to look at it again. I am at the stage now where I am working on actually implementing the combat which will run on top of the ai which is a goal based data driven state machine with a ton of pre-built actions and my stats system. This is all rather uncertain territory for me so it will likely take me a while to refine it.

    I have spent some time to utilize the existing gui system and I am careful to do all logic changes in the update and only handle presentation in the on gui calls which helps with the performance and garbage collection issues. I am also only targeting desktop – you could never do what I am trying to do in mobile at least graphics wise.

Leave a Reply

Your email address will not be published. Required fields are marked *