{"id":24961202,"url":"https://github.com/cag/coffeegame","last_synced_at":"2025-04-10T21:22:39.515Z","repository":{"id":4098713,"uuid":"5207152","full_name":"cag/coffeegame","owner":"cag","description":"A game engine for CoffeeScript and HTML5.","archived":false,"fork":false,"pushed_at":"2015-09-17T08:21:04.000Z","size":1241,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T18:52:30.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"isislovecruft/xocolatl","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cag.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}},"created_at":"2012-07-27T17:10:12.000Z","updated_at":"2024-12-17T09:54:24.000Z","dependencies_parsed_at":"2022-07-10T20:33:43.361Z","dependency_job_id":null,"html_url":"https://github.com/cag/coffeegame","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/cag%2Fcoffeegame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cag%2Fcoffeegame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cag%2Fcoffeegame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cag%2Fcoffeegame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cag","download_url":"https://codeload.github.com/cag/coffeegame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248299029,"owners_count":21080450,"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":"2025-02-03T08:45:48.376Z","updated_at":"2025-04-10T21:22:39.493Z","avatar_url":"https://github.com/cag.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"*coffeegame* v0.1\n=================\n\nA CoffeeScript HTML5 2D game engine.\n\nSetup\n-----\n\n*coffeegame* uses [node.js](http://nodejs.org/),\n[CoffeeScript](http://coffeescript.org/),\n[jQuery](http://jquery.com/),\n[RequireJS](http://requirejs.org/),\n[Tiled](http://www.mapeditor.org/), and optionally\n[Python 2.x](http://python.org/) and\n[Docco](http://jashkenas.github.com/docco/).\n\nPython 3 unfortunately does not seem to support Pygments at the moment\nso using Docco relies on having a recent version of Python 2.x.\n\n### Windows\n\nInstall node.js from the node.js website using the installer. You will\nalso want to have [git](http://git-scm.com/downloads/) installed.\n\n### Ubuntu\n\nnode.js is available with the `nodejs` package. Install it using the\npackage manager of your choice.\n\nIf you want to generate documentation as you develop, you will want to\ngrab Pygments via the `python-pygments` package, assuming you're\nrunning Python 2.x.\n\nNow check the *Common* section.\n\n### Common\n\nTheoretically this should work for Mac as well once node.js is\ninstalled. I've only tested this on Windows and Ubuntu so far.\n\nOpen up your handy console or terminal and\n[install CoffeeScript](http://coffeescript.org/#installation):\n\n    npm install -g coffee-script\n\nTo set up the engine for optimal deployment, you will want to install\n[r.js](http://requirejs.org/docs/optimization.html#download).\n\n    npm install -g requirejs\n\nNow, if you wish to generate documentation as you develop, you may\n[install Docco](http://jashkenas.github.com/docco/):\n\n    npm install -g docco\n\nIf you wish to only install these node packages locally, you may leave\noff the `-g` flags, but this will make using the engine more difficult.\n\nFinally, grab *coffeegame* and put it in a directory somewhere.\n\nDevelopment\n-----------\n\nSo you're all fired up and ready to go!... but wat do?\n\nYou will want a local server for development. If you have Python and no\nserver, you can simply `cd` into your *coffeegame* directory and run\nthis one liner:\n\n    python -m SimpleHTTPServer\n\nFor Python 3, use:\n\n    python -m http.server\n\nPython will start serving files from that directory to localhost\nport:8000.\n\nThat shell instance will be all tied up serving files, so let's leave\nit alone and open up another terminal. Go to the *coffeegame* directory\nand type:\n\n    cake watch\n\nCoffeeScript will start compiling all the `coffee` files you put in the\n`src` directory. Snoop around that `src` directory to get a feel for\nhow the engine works for now (until I or somebody super cool writes a\ntutorial or something). Then go crazy and start coding!\n\nTo play what you're making, open up\n[dev.html](http://localhost:8000/dev.html). Now, simply edit source,\nrefresh browser, rinse, and repeat until you're done.\n\nDeployment\n----------\n\nOpen up a terminal instance and type:\n\n    cake build\n\n`cake` will first do a CoffeeScript compile of `src`, and then it will\nrun `r.js` to optimize `js/main.js` (which is compiled from\n`src/main.coffee`). This will be put into an Uglified `game.js` file,\nwhich you can then test using the [index](http://localhost:8000/) page.\n\nThen put on your web server your assets (images, sounds, and sprite and\nmap JSONs), `index.html`, `game.js`, and `require.js`.\n\nWindows\n-------\n\nUnfortunately, `cake` doesn't seem to work well on Windows. Open\n`watch.sh` for `cake watch` and `build.sh` for `cake build` instead.\nYou will need to have git installed so that the scripts open up in\ngit's `sh` type emulator.\n\nAudio\n-----\n\nCurrently, audio only works in Chrome and Safari, as these browsers use\nWebKit, and WebKit is the only thing that has implemented the Web Audio\nAPI thus far. I am shying away from using a flash/HTML5 audio solution\nbecause they have sketchy browser implementations and are not as cool\nas Web Audio.\n\nThanks\n------\n\nWith regards to making *coffeegame*, I'd like to shower the following\npeople with my gratitude:\n\n*   Jeremy Ashkenas for CoffeeScript\n*   Paul Irish, Erik Möller, Jacob Rus, and Tino Zijdel for a\n    CoffeeScript `requestAnimationFrame` polyfill\n*   Tony Gentilcore for the [`Performance.now` shim](http://gent.ilcore.com/2012/06/better-timer-for-javascript.html).\n*   Thorbjørn Lindeijer for Tiled\n*   Kevin Reid for a monotonic timer implementation reference\n*   Boris Smus for a useful [Web Audio tutorial](http://www.html5rocks.com/en/tutorials/webaudio/intro/)\n*   metanet for their [collision detection tutorial](http://www.metanetsoftware.com/technique/tutorialA.html)\n*   vecna for the [Verge3 engine](http://verge-rpg.com/), from which I\n    cut my game development teeth and took many ideas\n    +   Along these lines, I'd also like to thank mcgrue and overkill\n        for being inspirational and stuff\n*   The mass of people I have missed because they have helped out\n    like invisible ninjas in the production of this thingy\n\nI'd like to thank everyone who has ever taught me stuff, jammed with\nme, or just plain hung out with me. Your time is precious to me.\n\n**Thank you.**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcag%2Fcoffeegame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcag%2Fcoffeegame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcag%2Fcoffeegame/lists"}