BBTouch,code,multitouch,Unity

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

multitouch

GDC 201003 Mar

Hey All!

I am going to be in San Francisco in just a few days for GDC 2010. If you are going to the conference and you want to meet up, let me know. I will be giving a few talks at the Unity3d theatre about uniTUIO and Sandor and I will be showing off Sandor's 'FishTisch' (fish table) which is his big multi-touch setup (also in the Unity booth) so come by and say howdee!!

In the next few days (or maybe next week, during GDC) I will put up some new uniTUIO scripts that make it quick and easy to port over your Unity3d iPhone games to the Unity Desktop and make use of TUIO for your multi-touch controls!

Cheers!
-B

multitouch

Mole and GameBook Adventures are out for the iPhone!10 Feb

It has been a very busy few months.

I started on "Mole - The Quest for the Terracore Gem" last october. Chris (the designer) and I worked hard on a prototype that we got out in about three weeks. We submitted that to the Muse games contest as well as the GDAA indie game contest at GCAP 2009.

Originally we were slated to do an iPhone release in mid December 2009, but since we got picked as a finalist for the GDAA Indie game contest, we decided to focus on polishing a desktop version that we could show off at the conference. This paid off huge in terms of really good gameplay additions as well as some invaluable data collected watching people play the game at GCAP. We took all of that information and updated the gameplay to make it even better and also spent a few weeks getting it running on the iPhone. After a good bit of external beta in mid January, we released it to the app store in early Feb.

Unfortunately somewhere in the final frenzy to get the game out the door one of the meta data files got overwritten with an older version. We built that into the version 1.0 release and pushed it to the store.

UNfortunately that little thing caused the game to go looking for some resources that no longer existed at the end of a level and was causing crashes. I hate crashes. As soon as we found out about the crashing bug we pulled the app from the store and pushed up a fixed binary. We had some great help from some of the touch arcade forum regulars who notified us of the bug right away, so thanks to them we were able to pull it so quickly and get the fix out straight away!

Although the initial app was approved in about 2 days, the fix took about a week to get through the process (still way faster than last year, so: yay Apple!).

In any case, Mole is out now, and we have had a great response to it.

Mole icon

Just a few weeks after I started dev on Mole, I was approached by Tin Man Games to take over the Gamebook Adventure development.

This turned out to be a much larger job than I had originally anticipated and it took about a month longer than we had hoped. However, the final product is really great. The time we spent to make sure the game was polished and performed well really paid off. There are a few bugs in this first release and we are working on a fix for them right now.
We have had some good press coverage for GA:

PocketGamer UK review
TouchArcade Review

assassin_512

Next up! We are looking to finish a handful smaller more casual titles that we have had in production for awhile now, SkateDude and BMXDude are at the top of this list as well as a couple new games called 'Steam Pilot' and 'Gooey' that I will post about later.

Cheers!
-Ben

multitouch

xTouch, now with more added OpenCV07 Jan

Oops. In my haste to fix up the Snow Leopard issues in xTouch i neglected to notice that I had not included the OpenCV framework as part of the package. Thanks to Martin Kaltenbrunner from TUIO.org for finding that little omission.

If you already had OpenCV installed (as many of us do) then you probably would not have noticed, but it is kinda nice to have it all in one package when installing on new machines and stuff like that.

Anyhow, I update the link in the earlier post, and here it is again if you want the binary:

xTouchV1.01.zip

This seemed to work on my Snow Leopard laptop that did not already have openCV on it, so hopefully it will work for other people as well :-)

Cheers!
-B

And let me know if anyone finds anymore bugs :-)

BBTouch,Blog,code,CoreImage,multitouch

xTouch on Snow Leopard07 Jan

Hey All!

Sorry this has taken so long. I had it sitting in my to-do pile forever. And I had figured out the problem, just not fixed it.

Thanks to Morgan at bluecrash.com for sending me an email to kick me in the ass and spend the ten minutes to fix it.

Anyhow,

If you are wondering what the problem was it was that I had forgotten to lock the CVPixelBaseAddress before trying to access the CV frame pixel data. (when grabbing frames off the QTCapture frame buffer)

On Leopard this worked fine (for some reason) but was wrong. Here is the proper way to go about it:

 
// Lock the base addy for the pixels
// or it will return nil
CVPixelBufferLockBaseAddress(videoFrame,0);
unsigned char * srcBytes = CVPixelBufferGetBaseAddress(videoFrame);
.
.
.
// dont forget to unlock it when you are done
CVPixelBufferUnlockBaseAddress(videoFrame,0);
 

And that seemed to be the problem on snow leopard. I know, lame and easy. So again my apologies for not just getting it done sooner.

Also, I do plan to release the code for xTouch, but it needs a refactor and a clean first, so that will have to wait. You can get the binary (works on leopard and snow leopard) here:

xTouch.zip

Cheers!
-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+d29vX2FsdF9zdHlsZXNoZWV0PC9zdHJvbmc+IC0gYmVuYnJpdHRlbi5jc3M8L2xpPjxsaT48c3Ryb25nPndvb19ibG9ja19pbWFnZTwvc3Ryb25nPiAtIGh0dHA6Ly9iZW5icml0dGVuLmNvbS93cC1jb250ZW50L3RoZW1lcy92aWJyYW50Y21zL2ltYWdlcy9hZDMzNi5qcGc8L2xpPjxsaT48c3Ryb25nPndvb19ibG9ja191cmw8L3N0cm9uZz4gLSBodHRwOi8vd3d3Lndvb3RoZW1lcy5jb208L2xpPjxsaT48c3Ryb25nPndvb19ibG9nPC9zdHJvbmc+IC0gdHJ1ZTwvbGk+PGxpPjxzdHJvbmc+d29vX2Jsb2djYXQ8L3N0cm9uZz4gLSAvY2F0ZWdvcnkvYmxvZy88L2xpPjxsaT48c3Ryb25nPndvb19jYXRfbWVudTwvc3Ryb25nPiAtIGZhbHNlPC9saT48bGk+PHN0cm9uZz53b29fY29udGFjdDw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