Comprueba tu nivel de inglés…

Si eres capaz de pronunciar, sin ningún titubeo y a la primera, el modulo de ingles “para masters” incluido a continuación, eres mi héroe personal…

MODULO BÁSICO

"Tres brujas miran tres relojes Swatch. ¿Cuál bruja mira qué reloj? "

En inglés:

"Three witches watch three Swatch watches. Which witch watch which Swatch watch? "

MODULO AVANZADO

"Tres brujas 'travestis' miran los botones de tres relojes Swatch. ¿Cuál bruja travesti mira los botones de qué reloj Swatch? "

En inglés:

"Three switched witches watch three Swatch watch switches. Which switched witch watch which Swatch watch switch? "

...Y ESTE ES PARA MASTERS

"Tres brujas suecas transexuales miran los botones de tres relojes Swatch suizos. ¿Cuál bruja sueca transexual mira qué boton de cual reloj Swatch suizo? "

En inglés:

"Three Swedish switched witches watch three Swiss Swatch watch switches. Which Swedish switched witch watch which Swiss Swatch watch switch? "

Juas!

Microsoft Coding Camp – Imagina Windows Phone 7

CODING CAMP- IMAGINA WINDOWS PHONE 7Este próximo fin de semana, Javier Cantón, creo que Vicente Cartas, y yo mismo (los 3 MVPs en DirectX/XNA que estamos en España), estaremos presentes en el Hotel Auditorium de Madrid en el evento Microsoft Coding Camp – Imagina Windows Phone 7.

Si te apetece aprender cómo desarrollar videojuegos para el móvil más cool del momento, y de paso sacarte una pasta vendiendo miles y miles de copias de tus creaciones (no se garantizan resultados ;) je je….), regístrate en el evento haciendo click aqui, y vente por allí, que seguro pasaremos un muy buen rato.

¡Espero veros allí!

Simax ECO-Driving and Road Safety HD video

At Simax, we have been working hardly the last months on improving the ECO-Driving and Road Safety training features of our simulators. Some results of this work are shown in the following video:

(I´d recommend you to see it in HD if you have a fast internet connection).

Some of the new features included are:

  • New hybrid cars
  • Pedestrians walking around cities, which interact with cars and traffic lights
  • New ECO-Driving indicators, to graphically monitor fuel consumption
  • New ECO-Driving advisers, which indicate you how to drive optimally, to reduce CO2 emissions
  • 2D digital copies of car’s displays and indicators, to make them clearly readable in small screens
  • And much more…

More info at: www.simaxvirt.com

Gravitards game for Windows Phone 7

Gravitards is my new, upcoming title for Windows Phone 7.

It was first introduced by Microsoft in the last TechEd Europe 2010 (in Berlin), and will be released very soon. In the meantime, you can see a couple of work in progress videos here:

 

Sounds are still temporary (borrowed from an ancient game), and will be replaced in the first release.

Hope you like it!

Cheers

Error en ResGen.exe (archivos .ResX, especialmente en controles ImageList) al compilar con VisualStudio 2010

La ultima versión de VisualStudio incorpora algunas diferencias en el modo en que se invoca el proceso ResGen.exe que pueden convertir la migración a 2010 en una pesadilla.

Este error es un problema conocido, probablemente a solucionar en el próximo HotFix o Service Pack, y está bien documentado aqui. Aún así, traduciré y trataré de resumir lo que en ese post se comenta.

Síntomas

Al compilar, aparece un error de tipo: <<ResGen.exe error: An attempt was made to load a program with an incorrect format>>

Ejemplo concreto de un error de este tipo: <<ResourceForm.resx(1436,5): error RG0000: Could not load file or assembly 'file:///C:/Users/sjoiner/Desktop/TestForm/ResTest/bin/x86/Debug/Foo.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Line 1436, position 5.>>

Ejemplo concreto de un error de este tipo en Castellano: <<ResourceForm.resx(1436,5): error RG0000: No se pudo cargar el ensamblado 'file:///C:/Users/sjoiner/Desktop/TestForm/ResTest/bin/x86/Debug/Foo.dll' o una de sus dependencias. Se intentó cargar un programa con un formato incorrecto. Line 1436, position 5.>>

Nota: La ruta y el nombre del ensamblado (Foo.dll) son solo un ejemplo. A cada uno os aparecerá ahí el nombre del más abajo llamado Ensamblado B.

Al hacer doble-click en el error, VisualStudio nos lleva automáticamente al archivo ResX del formulario.

Escenario donde se produce el error

  • Estamos en un sistema operativo de 64-bit
  • Y - Cualquier proyecto que contiene archivos de recursos .ResX (como Windows Forms). Le llamaremos Proyecto A
  • Y - El Proyecto A referencia un ensamblado (lo llamaremos Ensamblado B)
  • Y - Alguno de los archivos de recursos (.ResX) del Proyecto A utiliza algún tipo definido en el Ensamblado B
  • Y – Se da una de las siguientes combinaciones marcadas con una X en la siguiente tabla.

image

Es decir, el error aparecerá (resumen de los casos más frecuentes):

  • Siempre que el Proyecto A se esté compilando para .Net Framework 3.5 o inferior, y el Ensamblado B esté compilado específicamente para 32-bits.
  • O - Siempre que el Proyecto A se esté compilando para .Net Framework 4.0, y el Proyecto A y el Ensamblado B estén compilados para plataformas específicas, que además sean distintas.

Soluciones, o más bien apaños

Mientras Microsoft no distribuya un Service Pack que solucione esté problema, lo único que se pueden hacer son apaños más bien cutres.

Apaño 1 – Evitar los escenarios críticos descritos en la tabla, cambiando la plataforma de compilación al Ensamblado B, a una plataforma que no entre en conflicto según la tabla de arriba. O mejor aún, poniéndole como plataforma “Any CPU”. Obviamente, esto no siempre es posible (si el ensamblado es de una tercera empresa, por ejemplo).

Apaño 2.- Evitar los escenarios críticos descritos en la tabla, cambiando la plataforma de compilación del Proyecto A. Por ejemplo, pasando dicho proyecto a .Net Framework 4.0. Obviamente, esto tampoco es siempre posible.

Apaño 3 - Ordenar a ResGen.Exe que siempre se ejecute en 32 bits, haciendo lo siguiente:

  1. 1. Cd “%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.0A\Bin”
  2. 2. Corflags /32Bit+ /Force ResGen.exe

Lamentablemente, esto provoca un segundo error de tipo: “The specified task executable "ResGen.exe" could not be run. The handle is invalid”. Para solucionarlo tenemos 3 opciones:

  1. 1. Añadir la propiedad <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture> a un PropertyGroup en los archivos de todos los proyectos que generen archivos ResX.
  2. 2. O – Si se está invocando MSBuild.exe directamente, pasarle el parámetro /p:ResGenToolArchitecture=Managed32Bit
  3. 3. O – Establecer una variable de entorno en la ventana Command en la que se está ejecutando MSBuild.exe o desde la cual se está abriendo el entorno de VStudio.  ‘set RESGENTOOLARCHITECTURE=Managed32Bit’

Apaño 4 – Forzar al CLR a cargar todas las aplicaciones MSIL en 32-bits, haciendo lo siguiente:

  1. 1. Cd “%windir%\Microsoft.NET\Framework64\v2.0.50727”
  2. 2. Ldr64.exe setwow

Esta solución no me gusta nada, ya que afectará a todo tu sistema y a todas las aplicaciones .Net que ejecutes.

Conclusiones

Este problema resulta una molestia bastante importante, y por el momento no hay una solución satisfactoria. En el IDE de VisualStudio, debería poder especificarse el Bitness en el que deseamos que se ejecute ResGen.Exe para cada proyecto. No parece una solución tan compleja de implementar, así que esperemos se incluya pronto en un HotFix.

Si deseas saber más sobre este problema, así como leer conversaciones con las experiencias de otros usuarios, te recomiendo que leas el Post original (en inglés), disponible aqui.

Saludos!

Some technology behind Kinect

I cannot wait to have this thing -tomorrow is the day here in Europe-. I must admit that I was a bit skeptical at first. I could barely test the device at the Microsoft Spain&Portugal MVP Open Day, several weeks ago, but the more videos I see, the more convinced I am about the potential of the device. For instance, check this XBox dashboard demo:

The smoothness and precision of hand movements are amazing. It could even be an alternative to multi-touch technology. It seems that Microsoft is almost out of stock in the U.S. what means that it’s been a very successful launch. Congrats!

Adaptability and calibration

The Kinect includes a small electric motor that allows the device to tilt the camera up and down (up to 30 degrees), and also operates the zooming functionalities. This allows the device to properly adapt to any space. If you want to know more about the motor, you can check this site.

Sound Processing

The Kinect includes an array of 4 microphones, which provide:

  • Acoustic source localization: 3D localization or positioning of sound, to help detecting which player is talking, for example.
  • Ambient noise suppression: To make speech recognition more efficient, it filters sounds to remove any ambient noise that could distort voices and sounds to be processed.

Both functionalities allow to control the XBox with your voice (see above video for a demo), and probably will enable headset-free chat on XBox Live (though I haven’t seen this in action yet).

More about Voice Recognition on Kinect

Facial and skeletal Recognition

The video camera included on Kinect allows to automatically recognize players just by looking at them. So, you just need to jump in the game, and it will automatically detect you, keeping your scores, etc. This is awesome.

Gesture and movement recognition

Of course, the most important feature of Kinect is gesture and movement reco. It can handle up to 6 players, but making motion recognition to two of them at a time. Regarding this, both hardware and software are extremely important.

Hardware was firstly developed by the company –later acquired by Microsoft- PrimeSense. The diagram of the setup is:

As you can see, the righter part of the diagram includes a normal color camera, to detect the human visual spectrum with a resolution that seems to be: 640x480, according to some non-official sources. It is used for facial recognition and to include images of players in games, among other things.

The other part is regarding depth, space or 3D detection, whatever you want to call it.

How can a 2D camera extract 3D information?

The secret is the IR setup it includes, with both a projector and a camera. It first projects thousands of IR dots to you and your living room, and then read that information back with the IR camera (Depth Image CMOS). Depending on the size and distance between the projected dots, it calculates the depth map. The following is a representation of the result of this depth map:

This IR dots that Kinect projects use a similar technology to the one used in those video-recording cameras which include the so-called Night-Shot technology.

Those cameras project IR light in front of you with a small IR beamer, and then switch to a sensor which is sensible to IR light. This way, they project light ahead (what makes seeing possible), but in an invisible way to the human eye.

Knowing that, anyone else is thinking the same thing than me? I guess so…

This is what happens if you record your Kinect with a Night-Shot camera (I recommend you to see it in FullHD):

Et Voila! There are the dots. The IR projector seems to be projecting a matrix of 320x240 dots at 30 frames per second (again, according to non-official sources). Another example:

So, starting with info like this:

image

Kinect takes the distance between dots, and calculates a depth-map of your living room:

Some personal conclusions

I’m sure that the hardware included on Kinect is awesome. It’s been launched with a few titles, but I can guarantee you that best is yet to come. Now it’s time for software. New titles will come, and new ways to explore and use this device. And I’m 100% sure they will be incredible.

Go Microsoft !!

Want to know more?

http://www.ifixit.com/Teardown/Microsoft-Kinect-Teardown/4066/1

http://en.wikipedia.org/wiki/Kinect

http://www.t3.com/feature/exclusive-how-does-microsoft-xbox-kinect-work?

http://consolepress.com/main/2010/08/23/the-tech-that-drives-kinect/

World of batteries

Today, I´m receiving my new laptop and I wondered what myths about battery handling were true or false. I decided to Bing a bit around, and found some very interesting articles, like this blog post (in Spanish).

I also found the Battery University, an incredible resource to learn and understand how batteries work.

Here is a translated summary of the interesting battery FAQ I found in the above Spanish blog post, which talks about the most frequent batteries nowadays: the Li-Ion.

Note: This FAQ is provided “as is”. We do not take any responsibility on the veracity of this information or on any damage your battery could have. It’s still recommendable to check this information with other sources or consult the builder of your system.

Is it recommendable to make a first charge of 10-12 hours for a new battery?

NO. Li-Ion batteries do not require a long first charge. In fact, no Li-Ion battery requires a charge cycle longer than 8 hours, ever.

Is it true that the battery will reach its maximum performance after several charge/discharge cycles?

NO. Li-Ion batteries offer their maximum capacity from the very first usage.

Is it true that I should wait for the battery to completely discharge, before charging it again?

Absolutely NO. This is one of the most frequent mistakes, inherited from the “memory effect” the Ni-Cad batteries had. Chemical composition of Li-Ion batteries fits better with partial-charge cycles. Constant complete discharges could even damage their circuits. However, there’s and exception: it is recommendable to sometimes discharge the battery completely, to allow their charge-measurement system to be reset. This should happen once in every 30 cycles or so.

Is it bad for the battery to remain connected to the AC adapter, once it’s completely charged?

NO. This belief is also inherited from Ni-Cad batteries (which could even catch fire in this cases). Li-Ion batteries have circuits to stop the energy flow when they reach the 100% charge. However, a failure in this circuit can always happen, so it’s still recommendable to remove the battery from the AC adapter once it’s charged.

Is it bad for the battery to remain connected to my laptop, while it’s plugged to electricity?

YES. It is bad. Very bad. Heat and stress will not be good at all for your battery. If you are going to use your laptop plugged to electricity for long periods, it is very recommendable to remove the battery from the laptop. However, be careful with this, as this operation will leave the back part of your laptop open, and therefore this wouldn’t be recommendable if you are in an environment with dust or similar. Some devices have software-specific drivers which can avoid constant stress of the battery while plugged to electricity, but check this with your own builder.

Talking about Hand Held Devices, is it the same to charge them with the AC adapter than with a USB cable?

NO. According to Palm, the AC Adapter is the preferred charging method, as the USB port of some computers (specially laptops), won’t always maintain the required 500 mA to properly charge the battery. The charging times in this case could be even 3 times longer.

How should I store my battery if it’s not going to be used for a long time?

According to BatteryUniversity, Li-Ion batteries will resist time better with a 40% charge. In fact, most devices are released to the market with an initial charge of a 40%. You should never store a Li-Ion battery totally discharged, this could damage your device.

 

Hope this little FAQ helps out!