Using Metaprogramming for a RPG Battle Engine
Ever wonder what happens behind the scenes when you click on an action on your toolbar in Forumwarz? The action might perform an attack. It might heal you. It might even do both! Some attacks are stronger when you’re weaker, others spawn buffs that protect (or harm you) for multiple turns. How does the game know what to do? Putting Effects in the Database When I was first prototyping Forumwarz, I stored the information for each action as rows in a database table. An Action would have multiple Effects. ...