{"id":20372427,"url":"https://github.com/vkoskiv/nmc2","last_synced_at":"2025-04-12T06:43:42.542Z","repository":{"id":111641632,"uuid":"455765431","full_name":"vkoskiv/nmc2","owner":"vkoskiv","description":"Lightweight, high-performance WebSocket server for No Man's Canvas, the pixel drawing game.","archived":false,"fork":false,"pushed_at":"2024-06-02T21:40:47.000Z","size":473,"stargazers_count":10,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T06:43:38.117Z","etag":null,"topics":["c","game","json-api","websocket"],"latest_commit_sha":null,"homepage":"https://pixel.vkoskiv.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vkoskiv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-05T03:31:27.000Z","updated_at":"2024-07-31T13:25:58.000Z","dependencies_parsed_at":"2023-05-25T00:15:21.990Z","dependency_job_id":"de2d8c1b-1229-44bd-b522-1919e7c79e67","html_url":"https://github.com/vkoskiv/nmc2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vkoskiv%2Fnmc2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vkoskiv%2Fnmc2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vkoskiv%2Fnmc2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vkoskiv%2Fnmc2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vkoskiv","download_url":"https://codeload.github.com/vkoskiv/nmc2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530610,"owners_count":21119592,"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":["c","game","json-api","websocket"],"created_at":"2024-11-15T01:13:12.249Z","updated_at":"2025-04-12T06:43:42.515Z","avatar_url":"https://github.com/vkoskiv.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"~~~\n\nnmc2 - new backend websocket server for No Man's Canvas\n\nDependencies: sqlite3, uuid, zlib, libbsd, gcc with nested function support\nYou can try this, but it's linux so you'll probably have to google it anyway:\n\nUbuntu: sudo apt install uuid-dev libsqlite3-dev zlib1g-dev libbsd-dev\nArch: sudo pacman -S sqlite zlib\n\nTo build: make -j4\nTo run: bin/nmc2\n\nmacOS Caveat:\nChange cc -\u003e gcc-11 in Makefile before compiling\n\nWeb client can be found here: https://github.com/EliasHaaralahti/No-Mans-Canvas-Client\n\nThe original Swift 3.1 + Vapor 2 implementation is here:\nhttps://github.com/vkoskiv/NoMansCanvas\n\nYou can find some runtime config options in params.json:\n\n* new_db_canvas_size - Edge length of square canvas when generating a new one.\n* getcanvas_max_rate - Max rate of getCanvas requests\n* getcanvas_per_seconds - Per this many seconds^\n* setpixel_max_rate - Max rate of postTile request\n* setpixel_per_seconds - Per this many seconds^\n* max_users_per_ip - Try to limit the amount of users per host to this amount\n* canvas_save_interval_sec - Save the canvas to db once every this many seconds\n* websocket_ping_interval_sec - Ping active websockets every this many seconds\n* admin_uuid - Doesn't have to be an uuid. Just the password to invoke admin commands at runtime (see tools directory)\n* listen_url - Address, port for listening\n* dbase_file - Name of the database file to use\n* colors     - Array of colors of format [R, G, B, id]. id has to be unique. Order in array determines which order they show up in the client.\n\nYou can reload the config file at runtime by sending SIGUSR1 to the running process:\n`kill -SIGUSR1 $(pidof nmc2)`\n\nYou can tell the running server to save a backup of the database under backups/ by sending SIGUSR2.\nThe script backup_db.sh shows you a nice way to run backups with cron\n\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvkoskiv%2Fnmc2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvkoskiv%2Fnmc2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvkoskiv%2Fnmc2/lists"}