Skip to content

Instantly share code, notes, and snippets.

View triptych's full-sized avatar
💭
Making web things

Andrew Wooldridge triptych

💭
Making web things
View GitHub Profile
@triptych
triptych / xplevel.xml
Created November 16, 2010 21:51
a YQL open table for calculating the XP requirements of a given Character Level
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<sampleQuery>select * from xpl where basexp="100" and numlevels="5" and startlevel="2"</sampleQuery>
<author>Andrew Wooldridge</author>
<description>Returns a list of levels and their required experience points. Suitable for RPGs or other games.</description>
</meta>
<bindings>
<select itemPath="" produces="XML">
<inputs>
javascript:void(function(){
var%20s=document.createElement('script');
s.src='http://yui.yahooapis.com/3.2.0/build/simpleyui/simpleyui-min.js';
document.getElementsByTagName('head')[0].appendChild(s);
}())
//<iframe id="frame">
var frame = Y.Node.getDOMNode(Y.one('#frame'));
YUI({
win: frame.contentWindow,
doc: frame.contentWindow.document
}).use('node', function(Frame) {
//An element inside the frame
var foo = Frame.one('#foo');
});

Game Engines

Name Latest Release Size (KB) License Type Unit Tests Docs Notes
The Render Engine 1.5.3 MIT Cross-browser; extensive API; open-source. 2
gameQuery 0.5.1 CC BY-SA 2.5 Designed to be used with jQuery
gTile 0.0.1 (2008-07-21) Tile based
Akihabara 1.3 GPL2/MIT Classic Repro Intended for making classic arcade-style games in JS+HTML5 3
The Javascript 2D Game Engine GPL Emphasis on gravity/physics/collision detection; uses HTML5 Canvas and ExplorerCanvas for IE support. Focus on limiting CPU usage. 4
The GMP Javascript Game Engine
/**
* Provides requestAnimationFrame in a cross browser way.
* @author greggman / http://greggman.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
npm install yui-repl;
yui3;
YUI@3.3.0> .load http://yuilibrary.com/
Resetting Y to the default state [done]
Fetching URL: http://yuilibrary.com/ [done]
YUI@3.3.0> .debug
Setting debug on the Y instance to: true
This xml file allows you to essentially create a web service through YQL for game levels
See this blog post:
http://andrewwooldridge.com/blog/2011/04/07/creating-your-own-yql-webservice-with-no-server/
var ifr = Y.Node.create('<iframe id="'+frameId+'" src="javascript:0" name="ibframe" scrollbar="no" frameborder="no"></iframe>');
tgtNode.appendChild(ifr);
var ifrNode = Y.Node.getDOMNode(ifr);
var ifrNodeDoc = ifrNode.contentWindow.document;
var content = this.get("content");
// for Firefox
ifrNodeDoc.open().close();
this.set("innerFrameYUI",
renderUI: function(){
Y.log("IB: Panel: renderUI called");
var tgtNode = this.get("srcNode");
var frameId = this.get("frameId");
tgtNode.setStyles({
overflow:"hidden",
height: "0px",
opacity: 0
});
feedchief-lm:~ awooldri$ npm install couchdb
npm info it worked if it ends with ok
npm info using npm@0.2.11-5
npm info using node@v0.4.4
npm info range traits@>=0.3.0
npm ERR! registry error parsing json
npm ERR! Failed to fetch http://packages.dojofoundation.org/promised-io
npm ERR! SyntaxError: Unexpected token ILLEGAL
npm ERR! <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
npm ERR! <html><head>