BBTouch, code, multitouch, openSoundControl

BBTouch and the new TUIO27 Jan

Hey All,

I must apologize as I have been out of the loop on NUI group happenings for a few months due to high levels of busyness. Luckily, Sandor has pointed me at some TUIO formatting discussions and I am going to try and keep BBTouch up to date with those sorts of things (i fully support expanding the TUIO protocol in a nice standard way, It sounds like tBeta is leading that charge and good on 'em.)

Anyway, from what i can gather in my 5 minutes of research (reading some NUI forum posts) is that currently some of the Quartz composer and Max plugins that NUI group helps maintain are basically advancing in TUIO protocol technology and BBTouch and some of the other 'old' trackers are not working well with them.

This is due to the fact that tBeta is using a slightly newer form of TUIO which includes the height and width of the cursor object in the data stream (ie the blob bounding box) I think this is a great addition and could use it in my own TUIO client apps straight away.

Anyhow, I am going to try and add the height and width params to the BBTouch TUIO stream (in some configurable way so that you can choose to not use them if you are using an older client) hopefully by the end of this week, busyness permitting.

That is all for now!
Cheers!
-b

code, iPhone

Snow Dude is on the app store!26 Jan

snowdude_icon512x512

Hey All,

The iPhone game I have been working on for the past little while is up on the App Store! So Go buy it! (and then post nice reviews :-)

App Store Link

It is a fun little snowboarding game that uses the accelerometer to control the 'Dude'. Swish around the slopes to avoid obstacles and jump them to score more points. As they say : "Easy to pick up, hard to master" :-)

I did the coding for 'Dude, and these guys did the design and visuals (and sound): The Lycette Bros.

The official SnowDude site is here: http://www.lycettebros.com/snowdude/.

code, iPhone, openAL

More openAL tidbits for iPhone24 Jan

Hey All,

my last post (which was a zillion years ago it seems) was about openAL. It has gotten quite a bit of traffic in the past few months, so apparently openAL on the iPhone is something people are interested in. So i am going to post this which is a few more tidbits that I have discovered over the intervening months about openAL.

First off, i have noticed that the vast majority of people are taking apple's sample code 'SoundEngine' and plopping it directly into their code, and then spending countless hours and days trying to get it to work just right for them.

Here is my advice:

Dont.

Look, I love the apple engineers, I love the work they do, but sample code is just that; a sample. It is meant to show you all the various different ways you can do something. the SoundEngine code does way more than you should ever really need. Your best bet is to start from scratch, figure out what your sound needs are and build you own sound controller object. If you do this you will be in a much better place to debug (because you will know how it all works) and you will be able to add only the code your app needs, and less code means less bugs.

What you say? What about code re-use?! I shouldnt reinvent the wheel, I dont fall into the 'not invented here' trap!! Heresy!

to that I say: you are re-using code. you are re-using the openAL codebase. but it turns out at the level that you are gluing openAL into your app, you should strive to make your own implementation geared towards what you need.

This is especially true for the iPhone. If there is any code in your app that you can get rid of by pre-formatting your sounds then you should be doing that. There is absolutely no reason that your sounds should be in more than 2 formats (ie an uncompressed format for your short sounds and a compressed format for anything longer) if you are checking the type and format of your sound files at runtime you are doing it wrong. Pick a sample frequency and format (stereo/mono) that works with all your sounds and make them all the same. This will simplify your code immensely and simpler code == less bugs == better performance.

Anyway, that was a bit of a rant. But I see so many posts to the apple dev forums that are like: "I am using SoundEngine from the crashLanding app and i am having this problem..."

Really, openAL is not that hard. I spent about 2 hours with the programmer guide and I got my simple sound controller working and wrote a tutorial since i was such an expert by then. That and the resulting code was about a tenth the size and complexity as soundEngine and I have had very few problems with it (and the problems I have had were easy to track down and debug because there just is not that much code there.

Anyhow, I really did mean to have some technical advice in here, and not just rant, however this is getting long, so it may have to wait until another post. :-)

-b

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!

PHVsPjxsaT48c3Ryb25nPndvb19hYm91dDwvc3Ryb25nPiAtIGFib3V0LXdpZGdldDwvbGk+PGxpPjxzdHJvbmc+d29vX2FkX2JlbG93X2ltYWdlPC9zdHJvbmc+IC0gaHR0cDovL2JlbmJyaXR0ZW4uY29tL3dwLWNvbnRlbnQvdGhlbWVzL3ZpYnJhbnRjbXMvaW1hZ2VzL2FkNDY4LmpwZzwvbGk+PGxpPjxzdHJvbmc+d29vX2FkX2JlbG93X3VybDwvc3Ryb25nPiAtIGh0dHA6Ly93d3cud29vdGhlbWVzLmNvbTwvbGk+PGxpPjxzdHJvbmc+d29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