IPhone 4 Antennas

Every now and then i look at other platforms. Before i bought my first Android i was considering buying the N900, the phone successor of the N770, N800 and N810 (i had both the N770 and the N810 and love them like a pet). A friend of mine bought one and let test it. I was underwhelmed with the strange UI choices and the overall look and feel. Even worse, the thing was extremely heavy and bulky.

Anyways, earlier this month Apple released the latest iteration of their IPhone. In respect to the features it seemed pretty solid, ignoring all the meaningless marketing speak (retina display my ass…). With added multitasking (sort of…) and other nice stuff it seemed like a good successor to previous generation IPhones. I wouldn’t want one myself for various reasons but it seems like a really great smart phone.

Until i read this today:

Now that’s a bit… unfortunate i guess. The problem seems to not affect all new IPhones with the same strength. Another interesting fact is that Apple started selling rubber cases on their own now which solve the problem. Coincidence? Maybe 🙂 While it might not pose a problem in the real world it is still a tad bit funny that Apple’s QA let that one slip. I also wonder why they decided to have the antennas on the outside.

In other news: Apple increases the legal pressure on HTC with another patent law-suite.. Maybe Nokia can help a little with the troll…

What can libgdx do for you?

Quiet a lot. Some of the german readers might remember the tutorial i wrote for AndroidPit earlier this year. The example game was a 3D space invaders clone, a very basic one i have to say. Now, i took the original source and ported the relevant portions to libgdx, mainly the rendering code and the start up code. The game mechanics code stayed 100% the same. Next i extended the applet backend of libgdx a little so i can also load resources etc. (basically a proper implementation of the Files interface). The original game only worked on Android. Not it works on Android, any browser with the Java plugin (32-bit and 64-bit btw due to jogl magic) and any desktop pc with a 32-bit Java VM. Here’s how the thing looks like:

Here’s the link to the standalone desktop version: http://file-pasta.com/file/0/gdx-invaders.zip. Unzip and doubleclick gdx-invaders.jar on Windows. On Linux you probably want to start it from the command line with “java -jar gdx-invaders.jar” as otherwise it won’t find the jogl binaries. No idea about Mac but anyone trying it should report back. Use the cursor keys to move the ship and space to fire.

Here’s the link to the Android version:

If you are on Froyo it will install to the SD-card. It was tested on a HTC Hero (1.5), a Motorola Milestone (2.1) and a Nexus One (2.2). It is a tad bit slow on the Hero due to lighting (if i turn it off i get smooth 60fps). It will also slow down upon touch events on the Hero. The joy of 1.5. Other than that it works flawlessly. Also, you can pause and resume the game if you press the home button or get a call or get interrupted another way. This took no effort apart from telling libgdx to make all textures and meshes managed (they will be restored once the OpenGL context is recreated). The music also automatically stops and resumes. Tilte the device to move the ship and touch the screen to shot.

And finally here’s the link to the applet version: http://www.apistudios.com/hosted/marzec/badlogic/gdx/gdx-invaders/GdxInvaders.html. Note that my server is slow and the jar is 5mb big. It will take about 2-3 minutes to load only showing a “loading” progress bar in the bottom. Nothing i can do about it at the moment i’m afraid. The controls of this version are equal to the desktop controls.

Note that the desktop and applet version currently run at 100% cpu usage :p. I forgot to put in a sleep. I’ll update the thingies asap.

If you try it out on an Android device please report back whether it worked or not.

The source code for the 3 versions can be found at http://libgdx.googlecode.com/svn/trunk/gdx-invaders/ (actual game code & desktop launcher), http://libgdx.googlecode.com/svn/trunk/gdx-invaders-android/ (the android version) and http://libgdx.googlecode.com/svn/trunk/gdx-invaders-applet/ (the applet version). You will notice that the android and applet version actually only consist of one class each that are simply launchers with 5 lines of code. You can check out the 3 projects from SVN via the urls provided above.

We’ll look into how this was made in an upcoming series of tutorials which will teach you all you need to know to get going yourself.