Re: keeping information about players around

Discussion in 'Python' started by Jean-Michel Pichavant, Sep 25, 2012.

  1. ----- Original Message -----
    > PHPMyAdmin? Might I ask why? This is a mud, so it's all command
    > based,
    > so that's not even a question, but I'm kind of curious how PHPMyAdmin
    > factors in there. It's a database creation tool from all I've ever
    > seen
    > of it, to define tables. Also, using it requires that I have it up on
    > some server or another, and I'd really rather avoid that if I can.


    Given the nature of your project forget MysQL and phpAdmin. At most you may use sqlite. Sqlite data is stored in one file, locally, you can move it back it up easily. Sqlite doesn't need any server.
    If you don't see How sqlite would benefit your mud, that would be strange, but then drop it and use pickled dictionaries if you're familiar with them.

    > > Why would you use a dictionary, when it's DB manipulation you're
    > > after?

    >
    > It is? I don't remember mentioning database anything in my thread.
    > Unless I missed it, I mentioned pickle once or twice. But either
    > way, I'd use a dictionary to keep a copy of {uid:eek:bject} for
    > objects and {uid:player} for players. Makes lookup by uid pretty
    > easy, as well as for any loaded objects.


    Actually you mentioned a "player database" in your original post. Player with their stats are typically something that may ends up in a database, along with any object and its properties.
    That's why people suggested to use a database. Databases provide then powerful tools to fetch, search and edit your data. Performances on disk access would be handled by sqlite itself, something you may care by yourself if you use dictionaries.

    Or maybe your mud doesn't store anything on disk, every run start fresh, in that case just use dictionaries.

    JM
     
    Jean-Michel Pichavant, Sep 25, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Littlefield, Tyler

    keeping information about players around

    Littlefield, Tyler, Sep 24, 2012, in forum: Python
    Replies:
    0
    Views:
    202
    Littlefield, Tyler
    Sep 24, 2012
  2. Jean-Michel Pichavant

    Re: keeping information about players around

    Jean-Michel Pichavant, Sep 24, 2012, in forum: Python
    Replies:
    0
    Views:
    215
    Jean-Michel Pichavant
    Sep 24, 2012
  3. Jean-Michel Pichavant

    Re: keeping information about players around

    Jean-Michel Pichavant, Sep 24, 2012, in forum: Python
    Replies:
    0
    Views:
    210
    Jean-Michel Pichavant
    Sep 24, 2012
  4. Chris Angelico
    Replies:
    1
    Views:
    229
    Steven D'Aprano
    Sep 25, 2012
  5. Dwight Hutto
    Replies:
    5
    Views:
    239
    Dwight Hutto
    Sep 25, 2012
Loading...

Share This Page