{"id":13458467,"url":"https://github.com/Overtorment/NoobHub","last_synced_at":"2025-03-24T15:31:23.490Z","repository":{"id":4178241,"uuid":"5294729","full_name":"Overtorment/NoobHub","owner":"Overtorment","description":"🌐🔥 Network multiplayer and messaging for CoronaSDK, Moai, Gideros, LÖVE \u0026 Defold","archived":false,"fork":false,"pushed_at":"2024-07-16T11:19:58.000Z","size":131,"stargazers_count":336,"open_issues_count":4,"forks_count":51,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-03-18T07:12:32.475Z","etag":null,"topics":["corona-sdk","gideros","love2d","lua","moai","networking","nodejs","pubsub","wtfpl"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Overtorment.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-08-04T10:22:40.000Z","updated_at":"2025-03-12T21:06:48.000Z","dependencies_parsed_at":"2024-07-16T13:51:04.340Z","dependency_job_id":"b3be5b98-9a69-49d0-a63c-4dd94f1b8564","html_url":"https://github.com/Overtorment/NoobHub","commit_stats":{"total_commits":66,"total_committers":13,"mean_commits":5.076923076923077,"dds":"0.43939393939393945","last_synced_commit":"72554240eb11c7541b9d4a0ac9827e76ffc8d20d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overtorment%2FNoobHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overtorment%2FNoobHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overtorment%2FNoobHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overtorment%2FNoobHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Overtorment","download_url":"https://codeload.github.com/Overtorment/NoobHub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244913331,"owners_count":20530817,"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":["corona-sdk","gideros","love2d","lua","moai","networking","nodejs","pubsub","wtfpl"],"created_at":"2024-07-31T09:00:52.878Z","updated_at":"2025-03-24T15:31:18.471Z","avatar_url":"https://github.com/Overtorment.png","language":"Lua","funding_links":[],"categories":["Development","资源","Networking","Resources","Lua"],"sub_categories":["Videos","Game Development","Game Framework"],"readme":"# NoobHub\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\nOpenSource multiplayer and network messaging for CoronaSDK, Moai, Gideros, LÖVE \u0026 Defold\n\nBattle-tested and production ready. Handling thousands of CCU (concurrent users), serving hundreds of thousands multiplayer games daily, routing hundreds of messages per second, with months of uptime.\n\n- Connections are routed through socket server with minimum latency, ideal for action games.\n- Simple interface. Publish/subscribe paradigm in action.\n- Server written on blazing fast Nodejs.\n- Zero dependency. Works out of the box, no NPM ecosystem required. (for websocket bridge relies on `ws` module, read below)\n- Socket connections, works great through any NAT (local area network), messages delivery is reliable and fast.\n- Low CPU and memory footprint\n\nRepo includes server code (so you can use your own server) and CoronaSDK/Moai/Gideros/LÖVE client. More clients to come.\nYou can test on my server, credentials are hardcoded in demo project!\n\nLua code may serve as an example of how LuaSocket library works.\n\n## How to use it\n\nSTART SERVER\n\n```bash\n        $ nodejs node.js\n```\n\nTo make use of the websocket bridge, uncomment wsPort in the config.  \nIf so, make sure to do `npm install` as well.  \nThese are useful to serve browser clients. Irrelevant otherwise.\n\nINITIALIZE\n\n```lua\n        hub = noobhub.new({ server = \"127.0.0.1\"; port = 1337; });\n```\n\n```js\nconst hub = noobhub.new({ server: '127.0.0.1', port: 2337 });\n```\n\nSUBSCRIBE TO A CHANNEL AND RECEIVE CALLBACKS WHEN NEW JSON MESSAGES ARRIVE\n\n```lua\n        hub:subscribe({\n          channel = \"hello-world\";\n        \tcallback = function(message)\n\n        \t\tif(message.action == \"ping\")   then\n        \t\t\tprint(\"Pong!\")\n        \t\tend;\n\n        \tend;\n        });\n```\n\n```js\nhub.subscribe({\n  channel: 'hello-world',\n  callback: (data) =\u003e {\n    console.log('callback', data);\n  }\n});\n```\n\nSAY SOMETHING TO EVERYBODY ON THE CHANNEL\n\n```lua\n        hub:publish({\n            message = {\n                action  =  \"ping\",\n                timestamp = system.getTimer()\n            }\n        });\n```\n\n```js\nhub.publish({\n  action: 'ping',\n  timestamp: Date.now()\n});\n```\n\n## Clients\n\n- CoronaSDK\n- Gideros\n- Moai\n- LÖVE\n- Node.js\n- PHP (debug console only)\n- JS / Browser\n\n## Tests\n\nSimple acceptance test uses Nodejs client to test the server itself:\n\n```bash\n    $ ./run-tests.sh\n    starting Noobhub server...\n    NoobHub on :::1337\n    running tests...\n    tests ok\n```\n\n## Getting ready for production use\n\nIf you expect more than 1000 concurrent connections, you should increase limits on your server (max open file descriptors,\nmax TCP/IP connections) and optionally fine-tune your server's TCP/IP stack.\nTo make sure server process stays alive you might want to use tools such as forever.js or supervisord.\n\n## Authors\n\n- Igor Korsakov\n- Sergii Tsegelnyk\n\n## Licence\n\n[WTFPL](http://www.wtfpl.net/txt/copying/)\n\n## Official discussion thread\n\n- [old] http://developer.coronalabs.com/code/noobhub\n- [new] http://forums.coronalabs.com/topic/32775-noobhub-free-opensource-multiplayer-and-network-messaging-for-coronasdk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOvertorment%2FNoobHub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOvertorment%2FNoobHub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOvertorment%2FNoobHub/lists"}