-
SWF or Database?
Hello everyone,
I'm at the stage in my project where I need to standardize the information. Now, for things like item/equipment/attack information where should I store it. Should I load it in the main SWF as a giant array or retrieve everything through from the database?
Which would be more the fastest method?
Thanks for your opinions! :)
-
i normally prefer XML in these situations, but what you should do really depends on your situation. if there's too much data, like a MMO, you should definitely go for a MySql db, on the other hand, if you need speed of access, then putting it directly in the SWF will be a good idea. You might consider byte-arrays too.
-
Thanks again Blue,
It's just a tactical RPG, so we'll be needing to store static information such as item/equipment information, character information and map information. All the dynamic information, such as saving, we already designed the database for.
With that said, you think we should go for an array that stores all information some standard way? Also, what is byte-arrays, sounds interesting. It would be nice to be able to only have to 'load' the information as we need it.
Thanks again. :)
-
If you are already using a db, then don't bother with multiple ways to load, and simply use a db. You could however, consider preloading this info into a local array(or Vector if you are crazy for speed), instead of repeated calls to the db.
Byte-array is a good way to send and receive huge amounts of data and other stuff(like a custom encoded map info).
-
Yeah, we already have a database to store the user information. We decided to go with storing all the static information in separate tables, such as items, equipment, characters, skills.
In terms of saving, we will store everything via a string of numbers [000] which Flash will break apart in groupings of three. Each block will represent something in the game that would be needed to load.
For example, the first block of [000] will represent which campaign mission the player is currently one. There will be a grouping's of [000]'s to represent character data such as character's value, level, equipment, and availability.
I think that by having to store one string and retrieving it once will save time rather than having to pull it out piece by piece. Of course, there still has to be communication between Flash and the Database more than once during load, since these values will represent something from the static tables.
I'm not sure if that makes sense ... :O