I have built a 'simple dressing game' wich works fine as a
'simple dresing game' , but I would like to be able to give
comments based on the clothing combination chosen and the
suitability of the choices made for entering the final scene (which
will be a random choice of two).
Ideally I would like the comments to be called from a
database. The database choice hasn't been really considered, but if
it makes it easier, I can use plain text files.
My problem is that I don't have any idea on how to attach the
data to the clothing object(s), how to recall that data or how to
perform the decision that a particular comination is right for one
situation and not the other.
I haven't written any code for this part of the game yet, so
any suggestions made will be most welcome!
xml is the simplest database you can use but it's awkward to
use for any sophisticated querying.
if xml meets your needs, you should check the xml class for
sample code on loading and parsing xml. if xml isn't sophisticated
enough, you'll need to check databases designed for complex
querying (like mysql).