Text Based Fighting Engine
Posted: Mon Jan 11, 2010 5:32 pm
I'm working on a text based mmo right now. Now, I hope this is advanced enough to go into this forum, I would consider myself a somewhat intermidiate php programmer for most tasks, but I'm not sure what would be the most efficient way of making this engine.
Essentially, I want the user to be able to choose a group of creatures to fight, or a "monster group". These monster groups would be taken from the database and put in a select menu; eg. <option>3 Dragons</option> etc. etc.
When you get into the fight, all three (in this case; the number of creatures would vary between encounters) of the monsters would have to have a different health number, different offensive and defensive stats, resistance to various spells and so on. All this could be stored in a table called "Creatures" on the database.
I'm wondering what would be the most efficient way of creating a system like this; should I store the creature's current health in sessions, then just retrieve their other stats from the database? Or create a new table called "fights" and have this store the health for all the creatures (which I assume would have to store all the creatures Id's as well as their current health). Or maybe I'm missing a miraculous php feature that could solve this whole issue?
Thanks in advance.
Essentially, I want the user to be able to choose a group of creatures to fight, or a "monster group". These monster groups would be taken from the database and put in a select menu; eg. <option>3 Dragons</option> etc. etc.
When you get into the fight, all three (in this case; the number of creatures would vary between encounters) of the monsters would have to have a different health number, different offensive and defensive stats, resistance to various spells and so on. All this could be stored in a table called "Creatures" on the database.
I'm wondering what would be the most efficient way of creating a system like this; should I store the creature's current health in sessions, then just retrieve their other stats from the database? Or create a new table called "fights" and have this store the health for all the creatures (which I assume would have to store all the creatures Id's as well as their current health). Or maybe I'm missing a miraculous php feature that could solve this whole issue?
Thanks in advance.