Hi,
So I’m creating a trading card game (much like Magic: The Gathering, with different gameplay mechanics).
To test I usually create cards on the fly, but now it’s time to create a database.
So I first thought of simply setting up a xml file which contains all cards and an object file of players with their decks and cards.
Problem though, it’s not quite secure to save it locally.
So I was thinking of creating a server which keeps tracks of all cards and players.
The server would later be used to create rooms where players could battle each other.
But I’m not sure where to start.
So I have a few questions on this matter:
Is xml advised? Let’s say I have around 250 cards. An example of xml would be:
<?xml version="1.0" encoding="UTF-8"?>
<creatures>
<creature name="Skeleton">
<description>This is a skeleton</description>
<damage>3</damage>
<health>2</health>
<cost>2</cost>
<type>ground</type>
<effects>
<effect name="Lightning">
<target>opponent</target>
<skipturn>false</skipturn>
<damage>2</damage>
<cost>2</cost>
<effect>
</effects>
</creature>
<creature name="Slime">
<description>This is a slime</description>
<damage>1</damage>
<health>1</health>
<cost>1</cost>
<type>ground</type>
</creature>
<creature name="Pinguin">
<description>This is a pinguin</description>
<damage>0</damage>
<health>3</health>
<cost>1</cost>
<type>flying</type>
<effects>
<effect name="Heal">
<target>self</target>
<skipturn>false</skipturn>
<damage>-2</damage>
<cost>1</cost>
<effect>
<effect name="Push">
<target>target</target>
<skipturn>true</skipturn>
<damage>0</damage>
<cost>1</cost>
<effect>
</effects>
</creature>
</creatures>
How would cards be imported in game (from the server)? Is it a one time retrieval (copy to new card object)?
Or what’s your view on this?
How would you save up players and their info? For example cards? Would you keep track of only the id’s of cards?
Maybe any more suggestions on what I should pay attention for?
Regards
Goowik