Mi otro blog

June 24th, 2016

Me acabo de dar cuenta de que no he enlazado antes mi otro blog sobre investigación y demás cosas. El tema principal de mi investigación es privacidad en la interacción entre máquina y humano. Sobre todo relacionada con las interfaces de usuario tangibles.

Desactualizado y caído

May 21st, 2016

Este blog se la pasa más tiempo caído y desactualizado de lo que debería. Acabo de terminar de moderar los últimos 60 comentarios de 2014 :∫

Voy a empezar a ponerle un poco mas de “onda” al blog, espero que San Google me perdone y vuelva a recuperar la confianza puesta en mi.

En otro orden de cosas, estoy desarrollando un proyecto nuevo, pemark. La idea es que sea simple, rápido y multiplataforma. Un benchmark que te permite saber la velocidad de tu dispositivo comparada con la velocidad de otros dispositivos del mismo tipo. La version en javascript ya mas o menos funciona y la version en android esta en progreso.

Tareas de Mantenimiento

October 28th, 2014

mantenimiento

Oso32 published as Open Source

August 6th, 2014

Not available yet in English.

New webpage for UTnP project

July 17th, 2014

New webpage for the UTnP (Universal Touch and Play) project inaugurated:
UTnP project

Dogs Parking seen in Norway

July 10th, 2014

Dogs parking
Dogs parking front
Seen at the entrance of a supermarket in Norway.
The text says:
Dogs parking
Dear owner
The card for the dogs parking can be fetched at the “backstage zone” next to the door.
Have a nice day.

Video:

Collisions in OpenFL

April 6th, 2014

Fallback or ‘alternate’ content goes here.
This content will only be visible if the SWF fails to load.

To detect if there is a collision among two sprites, it is possible to use the method hitTestObject( DisplayObject ) this way:


if ( moving_left ) {
direction = DIRECTION_LEFT;
x = x - 1;
}

for (child in 1...parent.numChildren ) {
if ( Std.is(parent.getChildAt(child), Wall) ) {
if ( parent.getChildAt(child).hitTestObject (this) ) {
x = x + 1;
}
}
}

Lime.onKeyChange error in version 1.2.2 of openfl-native

April 4th, 2014

It seems that there is a bug in version 1.2.2 of openfl-native, This is causing a compilation error when compiling for the Android platform and using Linux as a host.
The error is displayed as following.


-compile:
[javac] Compiling 6 source files to /[PATH]/Export/android/bin/bin/classes
[javac] /[PATH]/Export/android/bin/src/org/haxe/lime/MainView.java:381: error: method onKeyChange in class Lime cannot be applied to given types;
[javac] me.HandleResult (Lime.onKeyChange (keyCode, true));
[javac] ^
[javac] required: int,int,boolean
[javac] found: int,boolean
[javac] reason: actual and formal argument lists differ in length
[javac] /[PATH]/Export/android/bin/src/org/haxe/lime/MainView.java:430: error: method onKeyChange in class Lime cannot be applied to given types;
[javac] me.HandleResult (Lime.onKeyChange (keyCode, false));
[javac] ^
[javac] required: int,int,boolean
[javac] found: int,boolean
[javac] reason: actual and formal argument lists differ in length
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 2 errors

The solution consists on upgrading openfl-native to version 1.3.0:

haxelib update openfl-native

Animations in OpenFL

March 15th, 2014

Click on the image and use the arrow keys to control the character.
Fallback or ‘alternate’ content goes here. This content will only be visible if the SWF fails to load.

I am experimenting with OpenFL. Very fast and powerful when developing Flash apps.


import flash.display.Sprite;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.events.Event;
import openfl.Assets;

class Player extends Sprite {

var bitmapArray : Array;

var i : Int= 0;

var moving_up : Bool = false;
var moving_down : Bool = false;
var moving_left : Bool = false;
var moving_right : Bool = false;

public function new () {

super ();
initialize();
}

public function initialize() {
bitmapArray = new Array();

var bitmap : Bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player00.png");
bitmapArray.push(bitmap);
bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player10.png");
bitmapArray.push(bitmap);
bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player11.png");
bitmapArray.push(bitmap);
bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player12.png");
bitmapArray.push(bitmap);
bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player13.png");
bitmapArray.push(bitmap);
bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player14.png");
bitmapArray.push(bitmap);
bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player15.png");
bitmapArray.push(bitmap);
bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player16.png");
bitmapArray.push(bitmap);
bitmap = new Bitmap();
bitmap.bitmapData = Assets.getBitmapData ("assets/images/player17.png");
bitmapArray.push(bitmap);

addChild(bitmapArray[i]);

addEventListener(Event.ENTER_FRAME, onEnterFrame);
}

private function onEnterFrame(evt:Event) {

if ( moving() ) {
removeChild(bitmapArray[i]);

i = (i + 1) % 9;

addChild(bitmapArray[i]);
}

if ( moving_up ) {
y = y - 1;
}

if ( moving_down ) {
y = y + 1;
}

if ( moving_left ) {
x = x - 1;
}

if ( moving_right ) {
x = x + 1;
}
}

public function moving() : Bool {
return (moving_up || moving_down || moving_left || moving_right);
}

public function up() {
moving_up = true;

}

public function down() {
moving_down = true;

}

public function left() {
moving_left = true;

}

public function right() {
moving_right = true;

}

public function stop() {
moving_up = false;
moving_down = false;
moving_left = false;
moving_right = false;
}

}

Google has updated the pagerank

December 8th, 2013

It seems Google has performed an update of the pagerank during this week.