{"id":17482494,"url":"https://github.com/creationix/world-db","last_synced_at":"2025-04-10T02:44:16.651Z","repository":{"id":1003245,"uuid":"817671","full_name":"creationix/world-db","owner":"creationix","description":"A specialized database for massive tilemaps","archived":false,"fork":false,"pushed_at":"2010-09-04T22:32:34.000Z","size":188,"stargazers_count":18,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T04:14:46.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creationix.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-08-04T19:29:44.000Z","updated_at":"2023-09-08T16:27:15.000Z","dependencies_parsed_at":"2022-08-16T11:45:26.657Z","dependency_job_id":null,"html_url":"https://github.com/creationix/world-db","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creationix%2Fworld-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creationix%2Fworld-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creationix%2Fworld-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creationix%2Fworld-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creationix","download_url":"https://codeload.github.com/creationix/world-db/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761141,"owners_count":20991545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-18T23:43:42.268Z","updated_at":"2025-04-10T02:44:16.629Z","avatar_url":"https://github.com/creationix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# World-DB\n\nThis is a specialized tilemap database used by a MMO game demo I'm working on.\n\n## Design\n\nThe API is a simple key/value system with special characteristics.\n\n - You can only have 256 unique objects in the database.\n - every instance can exist any number of times with x,y,z coordinates.\n - 1mb planes (1024x1024x1) are allocated dynamically for infinite mapping.\n - The entire database is saved at once in atomic writes.\n - Saves are throttled to not happen more than a certain interval.\n - SIGINT and SIGTERM are caught and the data is flushed before exiting.\n\n## Usage\n\nThe public api is very simple:\n\n    // load the library\n    var WorldDB = require('world-db');\n    \n    // Load or create a library with 1024x1024 planes and save throttling\n    // to no more than once each every 10 seconds.\n    var myworld = WorldDB('world.db', 1024, 10000);\n    \n    // Objects can be anything, but can't be more than 256 of them.\n    var water = {name:\"Water\", props:[]};\n    var tree = {name:\"tree\", hp: 43};\n    \n    // Set some objects\n    myworld.set(0, 2, 0, wall);\n    myworld.set(0, 3, 1, water);\n    \n    // String are singletons and can use the literals inline\n    myworld.set(0, 3, 1, \"wall\");\n    \n    // Loading stuff back\n    var value = myworld(0, 3, 1); // \"wall\"\n\n## Contributing / Issues\n\nIf anyone wants to use this, then let me know your interest. Till then I'm going to assume it's only used by me.\n\n## MIT License\n\nCopyright (c) 2010 Tim Caswell \u003ctim@creationix.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreationix%2Fworld-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreationix%2Fworld-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreationix%2Fworld-db/lists"}