Velocity Reviews

Velocity Reviews (
-   Python (
-   -   Re: keeping information about players around (

Jean-Michel Pichavant 09-25-2012 09:09 AM

Re: keeping information about players around
----- 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:object} 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.


All times are GMT. The time now is 11:45 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.