Results 1 to 4 of 4
  1. #1
    TacoManStan is offline Member
    Join Date
    Sep 2011
    Posts
    50
    Rep Power
    0

    Default Best way to store game information

    Hi all,

    Basically, I want to know what the best way to store game information would be. For example, all of the units in my game can use abilities, AKA cast spells. These spells will have different conditions, effects, targets, etc. I was considering creating an enum Spell, and then create enums for each of the spells, but I figured if I ever wanted to make a spell editor, that would be almost impossible.

    So, should I use something like XML or PHP instead? Eventually this game will be on a server, which I still don't know how to do 100% properly. I'm very good at technical stuff, but I simply haven't had the experience in what would be best for this situation, and I know very little about servers.

    Any advise would be greatly appreciated, thank you.

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Best way to store game information

    You're asking so many different things, and it's not clear what any of it has to do with Java.
    Get in the habit of using standard Java naming conventions!

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,030
    Rep Power
    6

    Default Re: Best way to store game information

    There is no best way and in the future you can immediately stop and try again when you want to use the word "best", nobody is qualified to say what that is. Rather focus no finding a way that is correct.

    And to know which way is correct depends on the requirements. You haven't listed any requirements.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,541
    Blog Entries
    7
    Rep Power
    20

    Default Re: Best way to store game information

    I'd simply serialize the whole shebang; that is enough to keep the occasional script kiddies away ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Store information
    By tnrh1 in forum New To Java
    Replies: 9
    Last Post: 02-28-2012, 03:50 PM
  2. Replies: 3
    Last Post: 12-11-2011, 07:22 PM
  3. Replies: 5
    Last Post: 04-27-2011, 09:14 PM
  4. Replies: 3
    Last Post: 04-07-2008, 06:02 PM

Posting Permissions

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