Game and Remote Control via Smartphone

Posted on Sunday, May 27th, 2012

Almost everyone had already a controller of a WII in hand or at least knows how to use it.
With simple hand movements, transfered to the virtual character, this generation of games is controlled.
 
What works only with games of this specific console is is by principle also possible with other devices. So I got the idea to use the accelerometer of a smartphone, in order to achieve the same functionality and to control a game on my local machine.
 
 
Because I’m thinking about including this type of control into a larger project, I will not publish the corresponding code.
But basically there are the computer that is running the game, and the smartphone with the corresponding control-application in the same local network. The connection is done automatically at startup.
From that moment on, the phone transmits the corresponding accelerometer data, how much degrees the phone is rotated in each axis, to the application. These informations are used to move the character accordingly.
 
The application shown below is only to present the concept and has not been optimized.
 
 
Demo Video:

 
 
 
Available for all owners of an Android smartphones there is also the control app and a small demo program to test it.
Procedure:
1. Download and install the app.
2. Check that your phone is on the same network as the computer.
3. Open the demo application in the browser and provide the desired permissions.
4. Launch the mobile app.
5. Play.
 
 
Demo: (also controlable using the keyboard and space bar)
http://cdn.porzelt.net/tst/
 
App download:
http://cdn.porzelt.net/tst/Remote-Phone.apk
qrcode
 
 
 
I know that there may be a slight delay between the controller movement and the movement of the character.
 
I would appreciate your feedback of course.
 
Max
 
 
 




The Unofficial Google Text-To-Speech API

Posted on Monday, May 7th, 2012

The fact that Googles Translation-Application translate.google.com offers the possibility to readout an inserted text (TTS text to speech), is nothing new. The specialty, however, are the possibilities that arise through this feature.
 
The data for the audio output is in fact called by a simple HTTP GET (REST) ​​request:
 
http://translate.google.com/translate_tts?tl=de&q=text
 
 
By this request, which provides an MP3 file, can easily realize TTS-applications and works, thanks to the multilingualism of Google’s service, also for many other languages​​. The only drawback to this method is a limitation which allows only a maximum of 100 characters per request.
 
The main URL parameters in this case, the two for the selected language and speaking to the text:

    tl= <-Language->
    q= <-Text->

 
In ActionScript 3 the corresponding code would look like this:
 

  1. var sayWhat:String = “Hallo, wie geht es dir? “;
  2. var lang:String = “de”;
  3. // sayWhat = “Hello, how are you?”;
  4. // lang = “en”;
  5. var req:URLRequest= new URLRequest(“http://translate.google.com/translate_tts?tl=” + lang + “&q=” + encodeURI(sayWhat))
  6. var snd:Sound = new Sound(req);
  7. if (sayWhat.length > 100){
  8. throw new Error(“Only phrases < 100 charakters are supported.”);
  9. } else {
  10. snd.play();
  11. }

 

A URLRequest calls to the generated MP3 file, which is as usual in AS3 is received and played.
For a practical application the code had to convert the umlauts “ä, ü, ö” into “ae, ue, oe”, because Google’s TTS service that does not recognize them. Also Texts larger than 100 characters have to be divided into smaller sections which are requested and played one after another.
 
While testing the function I noticed that Google had a latency between 600ms up to 1.5seconds. So sentences, which had to be separated because of the length, were played with a large gap in between some Words. An optimization would be if the new MP3-pard would load while the previous part is played.
 
Demo-App soon…
 
 
 




How to get up to 16 GB of Dropbox-Space for free! – Tutorial

Posted on Friday, November 25th, 2011

Sorry, this entry is only available in Deutsch.




Google Music – Review

Posted on Sunday, November 20th, 2011

Today I finally got to test Google Music. After 6 months of beta testing the service now opened to all users. Though you have to be in the U.S. to register an account, but thanks to proxies and VPN connections it easy to “be” in the U.S. at least with the internet-connection. If you have no idea how Proxies work, you can find a good guide at engadget.com. (Note: you only need the American IP during registration!)
 
Typical cloud application, you can listen to your uploaded music collection (max 20,000 files) from any computer, tablet, mobile phones and other Internet-enabled device. But an Internet connection is required for this cost-free service.
 

Music Manager

Music Manager

After registering you can get going. At the beginning you can to upload your own music into the cloud with the co called “Music Manager”.
The Music Manager is a simple application which scans, on your approval, your music collection on iTunes or a selected folder and uploades them to your Google Music Account. There you can find a copy of your music collection, without asking whether they are purchased or fallen from the truck.
I’ve stopped uploading my collection after half an hour, which corresponded to about 50 songs.
 
Once the songs are in the cloud, you can listen to them at will, but you can’t download them again. At least I did not find the option for this.
 
Your songs are automatically sorted by artist, album and genre, so you can quickly search your way through a major collection and quickly find the desired song. (So, there is also a searchbox available.)
 
The playback options do not offer big surprises. In addition to the shuffle and repeat function you find the possibility of likeing and dislikeing your spongs. You also can create playlists. These can either be thrown together by yourself, or you can suggest one with “Instant Mix”.
 
Abspiel-Optionen

Abspiel-Optionen


This “Instant Mixes” feature is one of the nice comfort features in Google Music. You choose a song and click on “Instant Mix”. In seconds, the program creates a playlist of similar or matching songs and makes them available to you.
 
Though I had no great expectations in Google Music, but I was still a bit disappointed at the end. Although I could listen to my songs in best quality on my tablet, but in my opinion the cloud is not the best storage for my music library. But this is exactly what Google Music is. The files you usually only have on your PC are now somewhere on the Internet, available to you 24/7.
It may be that my opinion is a bit distorted because I am a long-standing Grooveshark user, but i just miss the feature of further recommendations in Google Music. So my decision has been made.
 
For all others who want to have access to their private music collection from everywhere, I can recommend Google Music because of the simple user interface and intuitive control. For everyone else I say take a look at Grooveshark.com.
 
Google Music 1

Google Music 1

Google Music 2

Google Music 2

Google Music 3

Google Music 3


Google Music 4

Google Music 4

Google Music 5

Google Music 5


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 




Clickjacking – Wie ich dich dazu brachte meine Seite auf Facebook zu „liken“

Posted on Saturday, June 18th, 2011

Sorry, this entry is only available in Deutsch.