Opening links from code

@panreyes suggested this morning that there should be a way to open links from code. Since the Wii version can already do it it seemed like a good idea to enable this for Android too. So since revision 485 in the repo you can do it.
You can see a small video (yep, I love making small videos) of the feature in action below:
In order to open a link your code would look like this:
exec(_P_NOWAIT, "http://themostsearched.blogspot.com", 0, 0);
Just ensure to import mod_sys before using this function.

The cool thing is that Android is smart enough to know what type of link you're trying to open so if you give exec() a YouTube link, Android will open the YouTube app, if you give it a Google Play link it'll open Google Play, and so on.

I'll soon release binaries together with the packager. Since it's already working, I hope it won't take long before you can start packaging your own code for Android :)

Android progress

Just recorded a small video of the current status of the android port:
Small video of a simple test program running in Android.
As you can see in the video, a few things work already:
  • Multitouch
  • [Barely hearable] Playing music from within APKs
  • Stopping the app when needed and coming back:
    Note: This actually consists of two parts: when the BennuGD code notices it's gone to the background, it quits.
    When the system asks the app to come back, it restarts. I'll publish some more info on this soon.
  • Other minor things
Will keep you posted!

Android port progress, multitouch module

Yesterday I finally got a couple of important things working regarding BennuGD on Android:
First of all, the guys working on SDL workarounded what appears to be a bug in Android that caused APK resource loading to fail, so now you can just package your game's resources into the APK and directly load them from there. There's nothing special you have to do from your BennuGD code. Up until now you'd had to use resources found in the user's SD card, which isn't particularly useful...

Another important thing is multitouch support: Yesterday I created a module to support multitouch. It's based in SDL 1.3 so it should work in both iOS & Android (and on desktops too, if you're still using that sort of devices :P), although I have just tested it in Android. It's still quite buggy but it's working. You can see a very simple preview of how it's working (the sample has some background music although I'm not sure it can be heard in the video) below:

The video is pretty crappy, but you get the idea.
Also, touch sensitivity is better than it looks like in the video.

Those are two very important things to have working for a game engine running on Android so I'm quite happy to see them working.

As per the work left regarding the Android port of BennuGD before we can call it a release, the list of things to do goes as follows:
  • Fix image loading: The colormode for PNG loaded images is not working as expected (yet). Not sure about other formats.
  • Handle rotation: The programmer should have a way to control how they want the phone to respond to rotations when their game is working.
  • I believe that right now we don't have a way to know when the app is in second plane->let the programmer know it through mod_wm.
  • Fix set_mode. Right now the video mode is set for you to your device's default resolution and, if you call set_mode again, Bennu crashes.
  • learn where the programmer must keep their persistent data.
  • [Update mod_chipmunk+compile mod_sqlite3 in].
  • Test it!
Get your little green devices ready because BennuGD is coming!

How To Put Limewire Music, Youtube & Google Video, or DVD Video to iPhone


1. Put music and videos from Limewire to iPhone

Limewire is a download tool I assume lot of us use. I often use it to download free music and videos and put them on my iPhone. If you don't have Limewire, you can download it from its official website.

Search and download songs from Limewire. You may get songs in all sorts of formats, but not all formats are supported by iPhone. Usually I select three formats: MP3, AAC and M4A formats that are supported by iPhone and can be directly transferred to iPhone using iTunes. You can visit the official website of Apple for the detailed specs info for iPhone. After you download the songs, open your iTunes, click "File" from the upper left corner, select "Add file to library", browse your computer hard drive and find the songs downloaded by Limewire, select the songs you prefer, click OK and the songs will be put in your iTunes. Then you can just transfer the songs to your iPhone from iTunes.

2. Youtube video to iPhone

I often visit Youtube to watch videos on iPhone and sometimes I download videos which cannot be found on iPhone from Youtube to put on my iPhone. Youtube videos are in FLV formats, so I use a free online FLV converter to do the conversion.

Firstly, go to Youtube and open the page of the video you want to put on your iPhone. And you will find the Youtube URL of this video to the right of the playback window. Then copy this URL.

Secondly, go to vixy.net , paste the copied URL into the URL field of this web page, and select "MP4 for iPod/PSP" from the "Converts to" drop-down list. (iPod Video could also be used on iPhone. This will save you a lot effort if you have many iPod videos.) Then click "Start" below this list to start the conversion.

Finally, after the conversion, this website will provide a download link for you to download the converted MP4 file. When you see the link, you can just download the final file from the link, save the downloaded MP4 file on your computer and use iTunes to sync it on to your iPhone.

Here you can get a free resource website list which has free stream video you can download for free.

3. Google Videos on iPhone

Because Google allows you to download (most) videos from their site in an iPhone compatible format, all you need to do is download that version of the video. To do this, pull up Google Video and search for a video as you normally would. When you actually get to the video, you're not going to see much. To play the video, click the little select list on the right and select "Video iPod/Sony PSP" and press "Done". Press download and the video will come up shortly. Simple, right?

4. DVD/Video to iPhone

I have a huge collection of DVD movies and video files. And I always put a few movies on my iPhone to kill time while I'm on the subway/bus.

DVD movies cannot be transferred to iPhone via iTunes directly, so I had to find a converter to do that. I have used a few converters and the one I am using now is Wondershare DVD to iPhone Converter. It is not free, but not expensive either. I decided to spend the money coz it does a good job on the final quality and conversion speed. And if I don't want to put a whole movie, I can just convert part of a movie onto my iPhone with this app. My OS is Windows, so I use the Windows version. If you are using a Mac OS, I have noticed that they have a Mac DVD to iPhone converter that you can try, which I don't know if is as good because I don't have Mac OS.

Most of my video files are not MP4 formats that can be directly used on iPhone, so I also bought the iPhone Video Converter from the same company coz I thought it would also be nice app, and it turned out to be so great! Actually, this video converter and the DVD converter are pretty much the same as far as the functions and the operational steps are concerned, and the only difference to me is that one is to convert DVDs and the other is to convert video files. Meanwhile, these programs are all able to work for iPod and Apple TV; this will save you some bulks if you happen to have an iPhone or an Apple TV. If you also want a video to iPhone converter, you can just download a trial version to see if it is what you need. Unfortunately, they don't have a Mac version for video converters.

5. Sync music and videos to iPhone

So far, using iTunes to sync files to iPhone is the only choice we can make. I use iTunes too but I have found it a bit clunky. So let me show how to sync music and videos.

Select the audio/video files you want to sync from your iTunes library, drag them under "PLAYLISTS", and a new playlist will be created with all the selected files in it. Then you can click the Music menu tab, check the "Selected playlists" option, and select the newly created playlist to sync.

If you want to remove the files, just uncheck the box and you will find the way.

The above is my experience with converting and transferring files from various sources to my iPhone, and I hope it can shed some light.









Blog Archive