multitouch

SDK4, Sound and Video quick tip28 Jun

Hey, so I upgraded to SDK 4 when it came out and everything is groovy, love the new iPhone 4 simulator, even if it makes all my non-doubled images look like ass.

Anyhow one huge frustration I was having was that the sound and video that worked just fine in the older SDKs no longer seemed to work on the simulator. (everything works fine on the device) I had a few bugs with the way the 3.2 and above handle video, but even after sorting that out it refused to work on the simulator.

I have been pulling my hair out about this for a week now. I mean, it is not a huge deal, I can get by without sound in the simulator, but it is really annoying when i KNOW the code is fine.

Just to be clear: I have a hybrid OpenAL/AVAudioPlayer sound management system, and the videos are all played with MPMoviePlayerController (using the old ways on the old systems and the new ways on the new systems) everything works groovy on all of my myriad devices but NOT on the simulator.

The movies wont even kick off, you tell them to play, and you immediately get MPMoviePlayerPlaybackDidFinishNotification. No errors, nothing.

I finally figured it out! It was my iSight camera. I have an old school original firewire iSight attached to my MacPro for the iChatting etc.. I disconnected that from the system and suddenly sound and video are working again! So I guess I would suggest to anyone else having similar issues: disconnect any external devices that deal with sound or video and see if the problem persists.

Anyway, I am glad I figured out the problem, but I am a bit annoyed that I have to unhook my iSight in order to be able to develop with the simulator. Mighty annoying.

Cheers!
-B

multitouch

iRaspberry in the app store now25 May

Just released a new little app: iRaspberry. It was actually last week, but I am perpetually behind, so there you go. Apparently we got some 12,000 downloads the first weekend, so that is cool :-)

It is free to download, and you get two of the raspberry videos for free, and there is an in app purchase to upgrade to the full app which gives you 16 ways the stick out your toungue at people :-)

anyhow, it is a silly thing, but lots of fun, so check it out!

Cheers!
-B

multitouch

iPad wallpaper and lockscreen template19 May

I posted this to the Escape Factory website yesterday and thought I would crosspost it here as well for your perusal:

I am just playing around with making myself some groovy looking wallpapers and lockscreen backgrounds for my iPad and realized it is not as easy as just whacking up some 1024x768 image. There is the whole auto-rotating issue. In the end I decided to make a template, and I made it just a wee bit nicer so I could post it here.

iPadScreenTemplate

Lovely isnt it?

The basic upshot is that for desktop wallpapers (the one that shows up behind your icons) your best bet is to make a 1024x1024 image and the center 768x768 is the area that will always be visible.

Here are some examples I took, to give you an idea:

IMG_0005

IMG_0006

It is important to note that the iPad overlays a gradient on top of your image (as well as icon shadows), so if you want to be color-perfect then you will want to take that into account.

As for the lockscreen, it is a slightly different beast since it has the overlay bars. In portrait, you have the same 768x768 'safe' area in the middle, but in landscape that is chopped down to a slightly thinner slice of image:

IMG_0007

IMG_0008

Thats it! have fun, make some cool wallpapers!

Cheers!
-Ben

multitouch

Beginning iPhone Games Development14 May

Hey, my new book is out! (actually it has been out for a few weeks now, but I am just getting around to blogging about it :-)

Here is the amazon link:

http://www.amazon.com/Beginning-iPhone-Games-Development-Cabrera/dp/1430225998/

Anyhow, it is a really good book, even if you are not a beginner. Here is a snippet from the promo blurb about 'what you will learn':

  • Efficient methods for drawing in 2D and 3D to the iPhone screen
  • Game-specific animation techniques with Core Animation
  • To use OpenGL ES for more complex and realistic gaming backgrounds and action
  • Numerous ways to add music to enhance the gaming experience
  • How to give your users access to their iPhone libraries from within games
  • The tools and techniques of 3D audio for creating even more realistic gaming experiences
  • How to do networking right, including two-player games over Bluetooth and multiplayer games over Wi-Fi

I wrote the chapters on OpenGL, so feel free to ask me any questions you might have about them :-)

Enjoy the book!
Cheers!
-B

BBTouch, Unity, code, multitouch

New uniTUIO CE scripts04 May

Hello everyone!

Thanks to anyone who stopped by the Unity3d booth at GDC and said howdy to Sandor and I and checked out the multi-touch table: the FishTish.

As promised, the updated uniTUIO scripts have been made available on the xtuio.com site!

They have actually been up for quite some time now, but I ahve been (as usual) either too busy or too lazy to get a post up, so here it is:

Note: they have been pretty much fully redesigned to take advantage of the 'iPhone Input' style of touch detection.

What does this mean? Well, the older scripts used a more centralized raycasting and distribution method. There was one main event handler that took each touch point and checked to see if it collided with any registered 'touchable' objects. This is a perfectly good design, and it works very well when you have lots and lots of points (in other words, you are only raycasting once per touch per frame)

However, we decided to go away from that and create a fake iPhoneInput class that you can access from the desktop version of Unity.

Why?

Well, the most compelling reason was so that we could quickly and easily port iPhone apps to the touch table. Once I had the faux iPhoneInput class that was being populated with TUIO generated touch information, then it was trivial to take a few of the iPhone apps (and most all of the Unity iPhone tutorial projects) and simply drop them in and have them 'just work'.

In fact, funny story: On the first day of the GDC expo, I had another Unity/iPhone dev come up and he was excited about the FishTish and thought that his app: iPottery would work really well on it. I grabbed the code from him with the intention of dropping in our scripts and installing it as one of the demo apps on the FishTish. Well, that day was quite a long one and I did not have the energy to actually do anything with the script until the next morning. I spent approximates 15 minutes with a totally unfamiliar code base (iPottery scripts are all in JS and the uniTUIO stuff is all in C#, so that also speaks to how simple it is to use them :-) and I had it working no problems. I spent most of my time deleting the onGUI stuff (onGUI doesnt work with uniTUIO, soory!) and adding some guiText/guiTexture based buttons instead.

For the next two days of the expo we showed off iPottery along with all the other demo apps and it worked great!

Ok, enough of my tangent, how does this actually work?

Well, grab the sample project from the link above, there are two scenes, one called 'basic touch' and one called 'buttons'. Buttons actually contains the entirety of 'basic touch'. (it just has more buttons in it)

Effectively what the new scripts provide is am iPhoneInput class that you can use in your TUIO enabled MT apps just like you would if you were writing an app for your iPhone or iPad. I have provided a dozen or so scripts that show some examples of how to use the iPhoneInput to do things like basic drag/scale/rotate and build buttons using either GUIText/GUITextures or 3d objects.

I havent had time to put together a video yet, but the code is pretty easy. The only thing that you will need is to make sure that you have an active BBiPhoneInputManager script running somewhere in your scene.

I use the BBTouchManagerStarter script to check to see if there is already an input manager and if not then make one. This is good because if you switch scenes, the input manager does not get destroyed. In an actual deployment, you can just instantiate one in your opening scene and be done with i, but during testing when you want to be able to just look at the scene you are in, this can become cumbersome, so I use the BBTouchManagerStarter in all my scenes instead.

Cheers!
-Ben

About

meMy full name is Ben Britten Smith.

I go by Ben Britten because Ben Smith is a bit too common and using my full name is a mouthful.

I live in Melbourne, Australia and service clients all over the globe.

Contact

Have some questions?

Feel free to contact me directly at support@benbritten.com with any questions you might have about any of the applications I support.

Thanks!

PHVsPjxsaT48c3Ryb25nPndvb19hYm91dDwvc3Ryb25nPiAtIGFib3V0LXdpZGdldDwvb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