Below is a list of open source games and game-related projects that can be found on GitHub - old school text adventures, educational games, 8-bit platform games, browser-based games, indie games, GameJam projects, add-ons/maps/hacks/plugins for commercial games, libraries, frameworks, engines, you name it.
If you'd like to add a repository to the list, please create an Issue, or fork this repository and submit a pull request.
Help: MarkDown Help, Markdown Cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // We support the GET, POST, HEAD, and OPTIONS methods from any origin, | |
| // and allow any header on requests. These headers must be present | |
| // on all responses to all CORS preflight requests. In practice, this means | |
| // all responses to OPTIONS requests. | |
| const corsHeaders = { | |
| "Access-Control-Allow-Origin": "*", | |
| "Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS", | |
| "Access-Control-Max-Age": "86400", | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const WebSocketProxy = new Proxy(window.WebSocket, { | |
| construct(target, args) { | |
| console.log("Proxying WebSocket connection", ...args); | |
| const ws = new target(...args); | |
| // Configurable hooks | |
| ws.hooks = { | |
| beforeSend: () => null, | |
| beforeReceive: () => null | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // "Extend" the EventEmitter like this: | |
| var EventEmitter = require('events').EventEmitter; | |
| EventEmitter.prototype.once = function(events, handler){ | |
| // no events, get out! | |
| if(! events) | |
| return; | |
| // Ugly, but helps getting the rest of the function |
#Test credit card numbers to use when developing with Stripe
4242424242424242 Visa
4012888888881881 Visa
4000056655665556 Visa (debit)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /*EXAMPLE METHOD*/ | |
| function matGaminCallBack(){ | |
| $inputJSON = file_get_contents('php://input'); | |
| if ($inputJSON != '') { | |
| $input = json_decode($inputJSON, TRUE); //convert JSON into array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @author Arie M. Prasetyo | |
| */ | |
| const mongoose = require('mongoose'); | |
| const mongoConfig = {useNewUrlParser: true, useUnifiedTopology: true}; | |
| // connect to Mongo database | |
| mongoose.connect('mongodb://localhost:27017/test', mongoConfig); | |
| // define the model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mongodb = require("mongodb") | |
| const MongoClient = mongodb.MongoClient; | |
| let _db; | |
| // Connect to the database | |
| const mongoConnect = (cb) => { | |
| MongoClient.connect( | |
| //connection string here | |
| { useUnifiedTopology: true } |
NewerOlder