From: "Matthew K. Williams" Date: 2010-03-30T04:55:32+09:00 Subject: Re: Question: Dynamic code execution On Mon, 29 Mar 2010, Thorsten Hater wrote: > Hi > > I'm currently writing a small game application in ruby. > The problem is, not all of the rules are static, meaning some > of the actions in the game are allowed to change them. > My question is, what is the best and safest way to implement this > feature? > Specifically, I have database of items, which may change parts of > the rules upon activation. > Storing code along with those and eval()ing it at runtime feels > kind of awkward and not really safe, but seems the most flexible > way at a first glance. > Has anybody ideas and/or pointers to this matter? > > Thorsten > > You might consider looking at this, which talks about some dynamic game generation I've done (and if you have further questions, I've got more): http://aetherical.com/2008/4/25/classes-on-the-fly