dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: SWF or Database?

  1. #1
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167

    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!

  2. #2
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    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.
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  3. #3
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    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.
    Last edited by Osteel; 08-05-2010 at 03:02 PM.

  4. #4
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    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).
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  5. #5
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center