{"id":22256847,"url":"https://github.com/evolutionleo/warp","last_synced_at":"2025-05-07T15:46:15.881Z","repository":{"id":42572687,"uuid":"308929361","full_name":"evolutionleo/Warp","owner":"evolutionleo","description":"Warp is a feature-rich framework for multiplayer games, written in GameMaker and NodeJS (previously GM-Online-Framework)","archived":false,"fork":false,"pushed_at":"2025-03-22T12:55:57.000Z","size":19162,"stargazers_count":136,"open_issues_count":0,"forks_count":8,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-01T14:02:20.571Z","etag":null,"topics":["framework","gamemaker","gamemaker-language","gamemaker-studio-2","gml","gms2","javascript","js-framework","multiplayer","nodejs","online","tcp-client","tcp-server","typescript","warp"],"latest_commit_sha":null,"homepage":"https://discord.gg/WRsgumM2T6","language":"TypeScript","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/evolutionleo.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}},"created_at":"2020-10-31T16:54:33.000Z","updated_at":"2025-04-30T10:34:03.000Z","dependencies_parsed_at":"2023-02-18T07:45:49.649Z","dependency_job_id":"0bc8e54a-fc5e-41d1-9ab7-2d12709d8ef3","html_url":"https://github.com/evolutionleo/Warp","commit_stats":{"total_commits":213,"total_committers":4,"mean_commits":53.25,"dds":0.215962441314554,"last_synced_commit":"7f4b4580b55ddf5468d479c40e0867b010d8cad4"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolutionleo%2FWarp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolutionleo%2FWarp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolutionleo%2FWarp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolutionleo%2FWarp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evolutionleo","download_url":"https://codeload.github.com/evolutionleo/Warp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252908954,"owners_count":21823525,"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":["framework","gamemaker","gamemaker-language","gamemaker-studio-2","gml","gms2","javascript","js-framework","multiplayer","nodejs","online","tcp-client","tcp-server","typescript","warp"],"created_at":"2024-12-03T08:08:44.693Z","updated_at":"2025-05-07T15:46:15.827Z","avatar_url":"https://github.com/evolutionleo.png","language":"TypeScript","readme":"# Warp (previously GM-Online-Framework)\n#### A feature-rich framework for multiplayer games, written in GameMaker and Node.js\n#### Maintained by [@evolutionleo](https://github.com/evolutionleo)\n#### If you have any questions, please join my [Discord](https://discord.gg/WRsgumM2T6)\n\n\n# Features\n- **Simple API** to send/process packages on both server and client sides with a single line of code\n- **No need to deal with buffers** whatsoever\n- **Advanced systems:** server-side physics, entities, lobbies, account/profile system, saving/loading data with MongoDB\n- **Well-commented source code** for better readability\n- **NodeJS server** can run on a Linux hosting/dedicated server, as opposed to servers in GML\n- **MIT license** (you can use Warp in commercial projects and contribute/modify it in any way)\n\n# Examples (use old versions)\n- [Chess Example](https://github.com/evolutionleo/ChessOnline) (uses v5.0)\n- [Platformer Example](https://github.com/evolutionleo/StreamGame) (uses v3.0)\n- [Pong Example](https://github.com/evolutionleo/GMOF-pong-example) (uses v3.0)\n\n# Installing\n## Client + Server ~~(recommended)~~ (temporarily broken, sorry)\n- You need to have [NodeJS](https://nodejs.org/en/) and [npm](https://npmjs.org) installed\n- Install the package with `npm i -g @evoleo/create-warp-app`\n- Run `npx create-warp-app`\n- Select the client and server templates\n- Done! The script will automatically bootstrap a new project from the [latest release](https://github.com/evolutionleo/Warp/releases/latest)\n\n## Client and Server separately\n### Client-side\n- Install .yymps from the [latest release](https://github.com/evolutionleo/Warp/releases/latest)\n- Import it to your project using GameMaker's Local Package system *(you can also choose to include the Demo)*\n OR\n- Install GMClient.zip and unzip it\n\n### Server-side\n- Install [NodeJS](https://nodejs.org/en/) (along with npm)\n- Install [VS Code](https://code.visualstudio.com/) (or use any other code editor of your choice)\n- (TypeScript) Install the [Typescript compiler](https://www.typescriptlang.org/) with `npm i -g typescript`\n- Download JSServer.zip or TSServer.zip from the [latest release](https://github.com/evolutionleo/Warp/releases/latest)\n- Open the clonned folder in the command line (or open the folder in VS Code)\n- Run `npm install`\n\n\n- (Optional) To use the accounts/saving system, install the database engine:\n\n## Database \\(Optional\\)\n- Install [MongoDB](https://www.mongodb.com/try/download/community)\n- Choose the default settings, it should now run in the background\n- Done!\n\n## If you don't need MongoDB - please disable it in the server's config file (it's under common_config.db_enabled), otherwise you will get an error!\n\n\n# Usage/Workflow\nCongratulations on completing the Installation step!\n\nStarting with netcode might be a bit overwhelming at first (even to experienced devs), which is why I tried to make implementing basic client/server interaction as simple and straightforward as possible:\n\n## Sending a packet (JS/TS and GML)\nSending a message to the server might be as easy as:\n```gml\nsend({ cmd: \"hello\", str: \"Hello, Server!\" })\n```\nor even (if you create a wrapper function):\n```gml\nsendHello()\n```\n\n## Receiving a packet\n\nGML:\n```gml\naddHandler(\"hello\", function(data) {\n    show_debug_message(data.str)\n})\n```\n\nJS/TS:\n```js\naddHandler(\"hello\", (client, data) =\u003e {\n    console.log(`${client.name} says: ${data.str}`)\n})\n```\n\n## Using lobbies and maps:\n- Add new maps in the `maps/` folder\n- Choose how many lobbies you want to create initially in `initializers/04_lobbies.js`\n- Use the commands `\"lobby list\"`, `\"lobby join\"`, `\"lobby leave\"` to work with lobbies\n- Configure lobbies' behaviour inside the server's config file (under config.lobby)\n- If you need any specific features for your game that aren't supported by existing configs,\n- You can extend/change the `Lobby` class in `concepts/lobby.js` and the `Map` class in `concepts/map.js`\n\n## Using entities and rooms:\n- (You can always disable entities and rooms completely from `config.js` if you don't need the functionality for your game)\n- Entity types are located inside `entities/entity_types/`, you can add new ones or modify/delete the existing ones\n- Your custom entities generally should inherit from `PhysicsEntity` if they are moving and colliding with other entities, and from the regular `Entity` class otherwise\n- You only need to code the entities behaviour logic once, on the server-side. The client will then interpolate between the data that it receives\n- The `Entity.create()` and `Entity.update(dt)` methods function similarly to GameMaker's Create and Step events (except `tps` (the game's tickrate) is 20 by default as opposed to 60 in GM, and so it's recommended to use the `dt` (aka \"delta time\") parameter to implement your game physics in a tickrate-agnostic way)\n- The `Entity.object_type` property links the server-side entities to GameMaker's instances/objects\n- Rooms are automatically loaded with all the entities from GameMaker's .yy files from a path defined in `config.js` (by default it's a path to the `Client/rooms/` folder)\n\n## Using accounts and saving:\n- Make sure you installed MongoDB (instructions in the Installing section)\n- Use the \"register\" and \"login\" commands on the client-side, the server will do all the authentification for you\n- Info: \"Account\" is an object that holds a pair of login + password, and some data bound to them, while \"Profile\" is intended to hold the actual gameplay data. One Account could theoretically have many Profiles bound to it\n- You can access the gameplay data of each client in `c.profile.%some_variable%`, it will save automatically\n- If you want to add new properties, extend the schemas in the `schemas/` folder\n\n\n# Running\n- Client runs as a normal GMS2 project\n- (TypeScript) Compile the server by running `npx tsc` (or `npx tsc -w` to avoid recompiling after every change)\n- To start the server, navigate to its folder and run `node .` or `npm run dev` in the command line\n\n# Configuration\n- Edit the server configs inside `config.js`\n- Edit the client configs inside `__NetworkingConfig.gml`\n- Select the server config by appending `--env=prod` or `--env=dev` parameter to the `node .` command\n- **Select the client config by clicking the 'target' button in the top-right corner of IDE**\n\n# Deploying\n- Install Node.js and npm\n- Install and configure MongoDB if you're using it in your project\n- Copy the JS/TS `Server` folder over, along with the `rooms/` folder from the GameMaker's project\n- Navigate to the folder in command line\n- Install all the necessary packages using `npm install`\n- Run `npm run prod` or `node . --env=prod`\n- (Optional) Use a tool like [PM2](https://pm2.keymetrics.io) for running the server in the background and managing the process\n- Don't forget to change the client's config to \"Prod\" by clicking the target button in the top right corner of the IDE!\n\n\n# Contributing\n### Rules for submitting a PR:\n- Please try to keep the coding style consistent with the rest of the project (e.x. use tabs instead of spaces, etc.)\n- When modifying the server code - *please only edit the TypeScript version*, as it can be then automatically translated to JS, but not the other way around\n- After you've made your changes to the TS server, go to /autorelease/ and run `npm run release` to compile everything to JS and create the .zip files in /Release/\n- I only accept pull requests with new features that in my opinion make sense for the framework, so if you want to introduce a brand new feature, please lmk first (create a new issue or ask on Discord) because it could be either something that I don't want to be a part of Warp, or it already has an alternative, or it's just something that I'd want to implement myself\n## Feature requests/typos/bug reports:\n- Check if someone has already made an issue about your bug/feature on the [issues tab](https://github.com/evolutionleo/Warp/issues)\n- If not, [open a new issue](https://github.com/evolutionleo/Warp/issues/new) detailing the bug that you found in Warp/the feature that you want to be implemented\n- If it's a feature request, please write why it makes sense to include it/what problem it solves\n\n# Credits\n- [Messagepack](https://msgpack.org/) serialization format \n- [@jujuadams](https://github.com/jujuadams)'s [SNAP](https://github.com/jujuadams/snap) library, which enables Messagepack's encoding/decoding inside GameMaker\n- [NodeJS Messagepack](https://github.com/msgpack/msgpack) encoder/decoder\n- [rm2kdev's really old series on creating an MMO in GMS 1.4+Node.js that inspired all this](https://www.youtube.com/watch?v=EyNVeTzhC1w\u0026list=PLLUWsMtogf9jQGzn3nAjAw2_aq3PM08pC)\n- Pull request for the first TypeScript version: [@davawen](https://github.com/davawen)\n- [@YellowAfterlife](https://github.com/yellowafterlife)'s [execute_shell_simple](https://yellowafterlife.itch.io/gamemaker-execute-shell-simple) extension\n- Framework by: [@evolutionleo](https://github.com/evolutionleo) (me)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolutionleo%2Fwarp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevolutionleo%2Fwarp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolutionleo%2Fwarp/lists"}