Thursday, May 26, 2016

Sharing code between Unity3D Projects

Here at Taqtile we are working on multiple Hololens projects at once and would like to create a core library for overlapping features such as an adjustable window to place or custom interactibles.

Unity3D does not natively support external folders but I found a few workarounds:

SVN Externals
This stackoverflow answer seems like the best solution but relies on SVN but unfortunately we are using Git.

Git SubTrees or SubModules
A submodule seems to be the closest thing to an SVN External but it is more of a reference to the code path at certain point in time. SubTrees are a complete copy. Neither seem ideal since we'd like to be updating the core library continuously. While you can rig both to commit and update via command prompt, most of our team uses software such as GitHub, Tortoise, and SourceTree and support seems limited or non-existent.

If you happen to have one of these solutions working on Git software with a GUI for non-technical team members I'd love to hear about it in the comments.

SymLink
The solution we landed on was Symbolic Links. A symbolic link is a Windows feature to make a folder that is located in one directory to appear to be located in another. Here is a tutorial on creating Symbolic Links.

But it is as simple as running the command prompt and running the following from a relative address:
mklink /J .\Assets\TaqtileTools ..\TaqtileHoloTools

You can even make a .bat file and commit it to the relative directory so anyone setting up the project for the first time just needs to execute the bat.

Note, given that Hololens is solely a PC environment at the moment we can safely assume the entire team will be running Windows. However, Mac users could create something similar as well.

Friday, May 20, 2016

Hololens - Manipulate Gestures and Resizing Windows

I had a bit of trouble finding documentation for how to make a re-sizable window for Hololens and thus want to document my findings here.  As this is all fairly new please share your findings in the comments.

Here is the goal... in 2D form:

On the device you can click and drag (manipulate) any of the blue cubes to scale the window.  And you can click and drag the center circle to re-position the window in 3D space.

If you have a device you can find an example of this by opening the Photo app and clicking resize in the top right corner.

Prep:
First and foremost make sure you are up-to-date with the latest Unity build which currently is 5.4b16: http://unity3d.com/pages/windows/hololens

Otherwise you may crash while trying to listen to the manipulate gesture.

Gestures:
If you aren't familiar with Gestures you can learn more about them in detail here: https://developer.microsoft.com/en-us/windows/holographic/gestures

Manipulate is going to be our focus since we are going to move/re-size based on the user's hand movements.

Tutorial:
Microsoft's Holograms 211 tutorial will get you most of the way there. Namely the GestureManager code though their example uses both Navigation and Manipulation which adds a bit of complexity as you can't use both at the same time.  Since we only need Manipulate we can nix the Transition code and just add the GesturesSettings.ManipulationTranslate to our recognizer we are using for tap.  I'll share my code below.

Integrating with HoloToolkit:
Microsoft's HoloToolkit code base's GestureManager is different than the one in the tutorial. I decided to try to pick and choose bits from the 211 tutorial and drop it into the Toolkit code but ended up with a half baked solution.  You could manipulate items while gazing at them but as soon as the item lost your gaze the manipulation would stop. The trick is to make sure you Override the focusedObject. Otherwise when the focus object changes the gesture is cancelled.


GestureManager Class:
This class mixes the HoloToolkit code with the Holograms 211 Tutorial and makes adjustments to handle the change in focusedObject.



Handling:
To handle these events you will need to wire something to catch the starts and then update while manipulating.  I have my corner buttons catching the start manipulate calls and then triggering StartScaleManipulation while my center button triggers StartManipulation. Code below:



Custom Hand Manager:
I am not sure if we added the FocusedGameObject or if that was originally in the HoloToolkit and since removed. In either case, this is the HandManager we are using. Feel free to rename to HandsManager or customize how you see fit.



Saturday, July 5, 2014

Two and a Half

I hate to start with a cliche but time flies. Its been two and a half years since I have posted an update!

I'm still going strong at Kihon. We are in beta on our 4th title: Conquest of Champions which is in Early Access on Steam or you can download it from the site on PC/Mac. Eventually we want to get it to tablets and be cross-platform but the current focus is to iterate quickly on the desktop.

In 2013 we launched Dojo Danger.

In 2012 we launched SketchPhrase.

Earlier in 2012 we raised a round with Rick Thompson and made Kihon a legit business... well, I guess it was always legit but raising a round, hiring employees, etc really raises the stakes a bit.

And then of course there was Baby Monkey which I posted about in 2011.

On a technical side I've gone from Flash to Cocos2D to Unity3D.  I personally still have a soft spot for Flash, especially when it comes to tweens and animations.  However, I must admit Unity3D is a pretty powerful engine from a team's perspective.  Cocos2D was OK but I'd recommend skipping over it and just going straight to Unity3D, especially now that they are making an effort to support 2D natively.

I still keep my hands in the code and game production though admittedly is becoming less and less over the years.  I'm probably spending less than half my time coding now while the rest has gone to running the company and everything that entails.

I hope to post a bit more about the business side and the inner workings of Kihon as I originally intended when I was just starting years ago... however, I would be naive to promise such a thing.  Hopefully I will be on here again soon though. Until then!











Sunday, November 20, 2011

Freebie! Baby Monkey weekend Give-away

Kihon is running a special this weekend by offering Baby Monkey (Going Backwards on a Pig) for free.  If you haven't already, now is the time to check it out!

Still hesitant?  Whats wrong with you!  Check out this review, it sums up our new features such as Costumes, Backgrounds, Free Monkey Bucks, etc.  Review.

Friday, November 18, 2011

Speaking Monday at UofA

I'll be at UofA Video Game Developer's Club this coming Monday, Nov. 21st.  It'll be at 5pm in the Gould-Simpson building, room 813.  I believe non-students can attend.  More details can be found on the club's homepage: https://sites.google.com/a/email.arizona.edu/ua-video-game-developers-club/

If you are in town, come check it out.

Thursday, August 4, 2011

Baby Monkey (Going Backwards on a Pig) ... THE GAME!

DISCLAIMER!
DO NOT CLICK ON ANY OF THESE LINKS UNLESS
YOU DON'T MIND THE SONG BEING STUCK IN YOUR HEAD FOR 15 DAYS.  

Kihon partnered with youtube sensation Parry Gripp. It was released in app store this morning and can be found here.  Its based on Parry's popular Baby Monkey youtube video.

SURGEON GENERAL'S WARNING! 
KEEP OUT OF THE HANDS OF SMALL CHILDREN 
AS THEY MAY PLAY THIS CONSTANTLY WITH THE VOLUME ON FULL!

Parry also released a Game Trailer to accompany the release which you can check out below:


DON'T PANIC! 
IF THE MUSIC IS STUCK IN YOUR HEAD IT HELPS TO SHARE IT WITH OTHERS, 
IT WILL MAKE YOU FEEL BETTER. PROMISE!

Sooo. What are you doing here still reading?  Go download Baby Monkey (Going Backwards on a Pig)!






Sunday, July 17, 2011

Would you like to connect? Casually?

I am looking forward to checking out Casual Connect Seattle this week.  If you have any interest in meeting up, shoot @kihongames a tweet and we'll work it out.  We should be carrying a demo around of our latest game, which is finished but we are just coordinating some launch details.  Hope to see you there.

Cheers!