Visiting VR Zone Shinjuku in Tokyo

I had a chance to visit in April, 2018 and loved my overall experience.

It was like Ghost In The Shell themed VR laser tag.

Japan. It’s been on my list of place to visit for years. Decades at this point. I finally got to this Spring. On this trip, I got to experience a Live Events tech space that I’ve only previously seen and worked with in the context of pop up shop style one offs for concerts, sports tournaments.

The Concept

If you’re in the US and you’ve heard of The Void. Perhaps, you’ve been there. I’m about to go check that out next week. VR Zone Shinjuku is a similar VR theme park. I got to play a 3 on 3 game of VR laser tag as a Ghost In The Shel themed operative whose mission is to take out “the terrorists” (the opposing team of 3 in our case).

The Tech

The staff at VR Zone Shinjuku were naturally fairly tightlipped about specifics of how everything works behind the scenes. No photos were allowed inside, past the entrance.

However, they headset was HTC Vive, coupled with what looked like custom VR tracker shin guards, a gauntlet and body sensor belt that allowed for full range of motion wireless tracking. The ceiling had a ton of what looked like infrared sensors, pointed in every possible direction.

Each player had an MSI VR ONE Backpack PC strapped to their back.

The Vive headset had custom wireless trackers mounted on top of it as well.

The Staff

These guys were very professional and on top of their game. I was very impressed. The team was highly knowledgeable on the complex gear up procedure and it seemed like everyone spoke at least 3 languages (Japanese, Mandarin and English). I deal with Brand Ambassadors at live events on a regular basis – the VR Zone Shinjuku staff were in my top 3 crews of all time.

Digital Signage Touchscreen Displays with a Mac Mini?

Use Case

First of all, why would you want to? Digital Signage isn’t always just a video playing in a loop, which can run off a built-in media player (like on a Samsung DM55E screen with MagicInfo S3 Digital Signage Software) or a BrightSign player with it’s overly convoluted content management system. Sometimes you have an HTML5 application that can run in Google Chrome as a full screen app, other times you have a complex Unity3D desktop app that also needs to run off more of a serious machine than a typical media player.

You’re certainly better off with a PC in this situation. Intel’s NUC and others now even allow the small form factor that Mac Mini used to rule.

Mac Minis weren’t originally designed for touchscreen displays, but what if you’re stuck with venue or client that has already purchased a Mac Mini and now you have to use that equipment because the budget’s been spent?

One option that works

Assuming there’s budget and you have some leeway in choice of touchscreens, rent an ELO touchscreen. Something like the 4202L 42″ Interactive Digital Signage. ELO does provide drivers for Mac that work with single touch (at least).

Note: ELO’s site provides drivers for lower versions of Mac OS / OS X and says “MAC OS X (10.12): Contact Tech Support for Max OSX 10.12”. Unofficially, their latest driver at the time – UPDD_05_01_1482.dmg – worked for me on Mac OS 10.12. Their tech support never got back to me, so keep that in mind.

Unity3D for iOS: “MissingReference” Error After Calling Application.LoadLevel()

I got a MissingReference error recently when loading a scene for the 2nd time via Application.LoadLevel(). In other words, I had MENU scene that handled some game settings, etc. When you hit the PLAY GAME button, Unity loaded a GAMEPLAY scene. After finishing the game, the MENU scene would load again. Without quitting the game, if I hit the PLAY GAME button inside MENU again, it would once more call Application.LoadLevel() on the GAMEPLAY scene. GAMEPLAY scene loaded ok for the 2nd time but shortly after calls to certain UIToolkit objects would generate a “MissingReference” error, similar to this one:

MissingReferenceException: The object of type ‘Transform’ has been destroyed but you are still trying to access it.

Both scenes had a GameStructureManager script. Inside the GameStructureManager script I created some members of type GameObject inside Start() via GameObject.Find() and grabbed the script component via GetComponent() in a C# project. I also assigned Events via Delegates, a technique I learned from Prime31’s UIToolkit plugin:

    void Start() {          
    ...          
       MyGameObject1 = GameObject.Find("HUD_Manager");     
       MyHUD = (HUDscript) MyGameObject1.GetComponent<HUDscript>();       

        HUDScript.onContinue += onContinueStuffHandler;         
    ...
    }

Solution

Adding an OnDestroy() and using it to unsubscribe from events subscribed to in Start() fixed the MissingReference error in this case:

    void OnDestroy() {
    
       HUDscript.onContinue -= onContinueStuffHandler;     

       Destroy( MyGameObject1 );
       Destroy( MyHUD );
    }

AS3.0 Signals example juxtaposed with native version

AS3.0 Signals is an event handling framework from Robert Penner that’s gaining popularity lately. There’s a good video tutorial by John Lindquist and tutorials here.

Here’s a quick comparison of an old XML processing class written both ways for comparison. For this simple example, Signals was about 10 to 50 milliseconds faster than using regular AS3 events. The results varied a lot each time I compiled.

Using the Signals framework for events:

XML processing class:

package com.timshaya.net
{
	import org.osflash.signals.Signal;
	import org.osflash.signals.natives.NativeSignal;
	
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;	

	public class XmlGrabber 
	{		
		private var loadDone				:NativeSignal;									
		public var dataDone					:Signal;										
		public var cityItems				:Array = [];								

		private var xmlData					:XML;		
		private var loader					:URLLoader;
		private var reqst					:URLRequest;
		private var trgt					:URLLoader;
		
		public function XmlGrabber(pth:String):void 
		{
			loader = new URLLoader(); 
			reqst = new URLRequest(pth);
						
			dataDone = new Signal();	
			loadDone = new NativeSignal(loader, Event.COMPLETE, Event); 
			loadDone.addOnce(loadCompleted);					
			
			loader.load(reqst);	
		}	
		
		public function loadCompleted(e:Event):void 
		{
			var trgt:URLLoader = URLLoader(e.target);
			xmlData = new XML(trgt.data); 
			//trace(xmlData);
			
			if (trgt!=null) 
			{
				for each (var a:XML in xmlData.evnt) 
				{
					cityItems.push(a); 
					//trace("\n cityItems[a]: " + a.@city + "\n"); 
				} 													
			} else trace("error: check your data & datatype");
			
			dataReady();
		}
		
		public function dataReady():void 
		{	
			dataDone.dispatch(); 
		}
	}
}

Test class:

package 
{	
	import org.osflash.signals.Signal;	
	import org.osflash.signals.natives.NativeSignal;
	import com.timshaya.net.XmlGrabber; 	
	
	import flash.display.Sprite;	
	import flash.events.Event;	
	import flash.utils.getTimer;

	[SWF (width="600", height="400", backgroundColor="#FFFFFF", frameRate="30")]	
	public class Test extends Sprite 
	{	
		private var addToStage				:NativeSignal;
		private var xml						:XmlGrabber;		
		private var xmlPth                  :String = "xml/"; 
		private var xmlName  				:String = "events.xml"; 				
		private var timer					:Number;
		
		public function Test():void 		
		{										
			addToStage = new NativeSignal(this, Event.ADDED_TO_STAGE, Event); 
			addToStage.addOnce(initApp);			
		}

		public function initApp(e:Event):void 
		{
			timer = getTimer();
			
			xml = new XmlGrabber(xmlPth + xmlName);
			xml.dataDone.add(createPage); 									
		}

		public function createPage():void 
		{							
			trace("Test::createPage()");		
			trace("\t time elapsed: " + (getTimer() - timer));			
						
			trace("\t xml.cityItems[0].@city = " + xml.cityItems[0].@city); 
			trace("\t xml.cityItems[0].@state = " + xml.cityItems[0].@state);			
		} 				
	}
}

Same code using native AS3 events:

XML processing class:

package com.timshaya.net
{
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;	
	import flash.events.EventDispatcher;

	public class XmlGrabberOld extends EventDispatcher 
	{		
		public var cityItems				:Array = [];		

		private var xmlData					:XML;		
		private var loader					:URLLoader;
		private var reqst					:URLRequest;
		private var trgt					:URLLoader;

		public static var DATA_READY		:String	= "list_ready";
		
		public function XmlGrabberOld(pth:String):void 
		{
			loader = new URLLoader(); 
			reqst = new URLRequest(pth);
			loader.load(reqst);
			loader.addEventListener(Event.COMPLETE, listOnComplete, false, 0, true);	
		}
		
		private function listOnComplete(e:Event):void
		{			
			var trgt:URLLoader = URLLoader(e.target);
			xmlData = new XML(trgt.data);
			//trace(xmlData);
			
			if (trgt!=null) 
			{
				for each (var a:XML in xmlData.evnt) 
				{
					cityItems.push(a); 
					//trace("\n cityItems[a]: " + a.@city + "\n"); 
				} 					
			} else trace("error: check your data & datatype");			

			dataReady();
		}
		
		private function dataReady():void
		{
			dispatchEvent(new Event(XmlGrabberOld.DATA_READY));
		}
		
	}
}

Test class:

package 
{		
	import com.timshaya.net.XmlGrabberOld;

	import flash.display.Sprite;	
	import flash.events.Event;	
	import flash.utils.getTimer;

	[SWF (width="600", height="400", backgroundColor="#FFFFFF", frameRate="30")]	
	public class TestOld extends Sprite 
	{	
		private var xml						:XmlGrabberOld;		
		private var xmlPth                  :String = "xml/"; 
		private var xmlName  				:String = "events.xml"; 		
		private var timer					:Number;
		
		public function TestOld():void 		
		{								
			addEventListener(Event.ADDED_TO_STAGE, initApp);		
		}

		public function initApp(e:Event):void 
		{
			timer = getTimer();
		
			xml = new XmlGrabberOld(xmlPth + xmlName);
			xml.addEventListener(XmlGrabberOld.DATA_READY, createPage);											
		}

		public function createPage(e:Event):void 
		{						
			trace("TestOld::createPage()");		
			trace("\t time elapsed: " + (getTimer() - timer));		
			
			trace("\t xml.cityItems[0].@city = " + xml.cityItems[0].@city); 
			trace("\t xml.cityItems[0].@state = " + xml.cityItems[0].@state);						
		} 						
		
	}
}

Sample xml file, events.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<evnts>		
	
	<evnt lnk="test.aspx?c=0" city="Atlantic City" state="New Jersey" />
	<evnt lnk="test.aspx?c=1" city="Clifton" state="New Jersey" />	
	<evnt lnk="test.aspx?c=2" city="Allentown" state="Pennsylvania" />
	<evnt lnk="test.aspx?c=3" city="Akron" state="Ohio" />
	<evnt lnk="test.aspx?c=4" city="Wichita Falls" state="Texas" />
	<evnt lnk="test.aspx?c=5" city="Austin" state="Texas" />
	<evnt lnk="test.aspx?c=6" city="Orlando" state="Florida" />
	<evnt lnk="test.aspx?c=7" city="Atlanta" state="Georgia" />
	<evnt lnk="test.aspx?c=8" city="San Francisco" state="California" />
	<evnt lnk="test.aspx?c=9" city="Los Angeles" state="California" />
	<evnt lnk="test.aspx?c=10" city="San Diego" state="California" />	
	
</evnts>