Skip to content

Instantly share code, notes, and snippets.

var vuf = new VeryMicroFramework("idOfCanvas");
vuf.add('intro_screne', {
init: function()
{},
update: function(delta, time)
{},
draw: function(context, delta, time)
{},
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
var infos = {
'other_pos': [],
'my_pos': [],
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
var is_scanning = true;
var is_blocking = false;
var angleTarget = 0;
var lastTarget = [0,0];
@yetanotherportfolio
yetanotherportfolio / gist:3751087
Created September 19, 2012 17:51
common mobile phones resolution

iOS

  • iOS - iPhone 3GS
    320x480, 256MB = 3x2
  • iOS - iPhone 4
    640x960, 512MB = 3x2
  • iOS - iPhone 4S
    640x960, 512MB = 3x2
  • iOS - iPad
@yetanotherportfolio
yetanotherportfolio / gist:3396752
Created August 19, 2012 17:57
javscript collision detection with rotated rect and such
//code inspired by http://www.ragestorm.net/tutorial?id=22
var Vect = function(x, y)
{
this.x = x || 0;
this.y = y || 0;
}
var Rect = function(pos, size, angle)
{