Topic: Question about controllers and models for game system

Okay, so I am learning rails and I have chosen to try making a simple rpg browser game as I learn. My question to everyone is: what is the best way to design my app to handle all the characters? Basically, I just want to make it a website and have many non-player characters which give the player options and reward them with items. My idea behind this is to have a list of characters show up in the browser with whatever option they provide (e.g. if you have x you can do y and get z).

I don't think it would be feasible to have a controller and a model for EVERY character to handle the options they provide. What would be an alternative? Is there a way to use the database to handle each character and their options? Maybe I'm getting way ahead of myself, but I'd like to know the right direction to take so that when it comes time to design that portion I will understand what needs to be done.  Any help is much appreciated!

Re: Question about controllers and models for game system

There are many ways to handle persistence and in designing my Rails game I've found that database persistence is often unnecessary.  Ruby Yaml can handle many persistence needs. YAML is a readable text format for data structures and can help keep things simple.

Re: Question about controllers and models for game system

You could have a Character class and a Category class. I imagine this would be a many to many association. You could make a npc category and base some logic off of it. So you character attributes would be something like name, attack damage, intelligence, etc. and your category attribute would be something like name:string. Then you make as many categories as you need, such as npc, mage, warrior, etc. and assign the appropriate categories to each character. So you could have a npc warrior, npc mage, warrior mage, etc.

I've never designed a game before, but this is how'd I try to do it.