So, I have a question, again. I’m developing a trading card game and I’m thinking about the best way to set up the cards in the actual game. I guess the best way to save the decks for the player and the AI is in an XML format that simply contains a list of all the cards in that respective deck.
I would read that XML file once at the beginning of the game, shuffle it and then save it in an ArrayList or Stack-like structure (by using custom objects as a representation of cards, of course). When a player plays one of those cards, they would become spatials and I would attach data to these spatials according to the card’s attributes (like hitpoints, attack damage, defense, and so on).
The most obvious approach to do this would be to use a standard DOM parser, but I guess there are faster ways that suit the requirements of a game better. Also, I’d like to know if there are some built-in functions in jME that I could use. I’ve got to admit that I’m not very familiar with XML in general and therefore don’t know what’s best suited and how to use it exactly, so a little help concerning that would be very precious to me
(I already searched the forum for similar questions, of course, but I guess I need some additional help - I guess I’m just too inexperienced…)