Monday 27 May 2013

Big China, Little Startup

Earlier this month, I had the opportunity to head out to Beijing to be part of the Global Mobile Internet Conference. After having the startup I'm working on be nominated as one of the best early stage startups, I was given a stand and an opportunity to pitch in front of some of the biggest angel investors and VCs in China.


Meeting an angel
I had never been to China before, and I'm not really much of a traveller, but I figured as long as I had my laptop and WIFI I'd be able to figure it out. When I arrived at the airport, one of the cool things that caught me out was the rogue taxi cab drivers. Well actually two things caught me out. Firstly, I didn't take down the number of the hotel I was staying at, and no one had heard of it before. Secondly, the line for the taxis start at the pavement, however as soon as you get to the front of the line (just before the pavement line), taxi cab drivers offer to help you get to your destination. Once you accept, they tell you to follow them round the back for 10x the regular fare.

Ok, so two problems, where is the hotel and learning about rogue taxi cab drivers. Firstly, lucky for me the rogue taxi cab drivers had no idea where the place was, or the english spelling of the address. I asked for help at the help desk, but no one knew how to get there. I tried logging into the airport WIFI however it seemed out of range from the Taxi section, so I sat down kinda stranded, contemplating what to do next, when... This amazing Chinese girl came and sat down next to me, she asked me for the name of the hotel I was looking for in her broken English accent, then frantically searched on her iPhone for clues. She found the hotel, phoned them up, arranged a meeting point, wrote down the name in Mandarin, hollered a taxi for me (taught me how to ignore the rogue ones), told the driver exactly where to go and to even phone up the reception desk for me when I got there. I wish I took a picture of her, she was a true angel.


Practice makes per... powerpoint slides
As a nominated startup, I had to attended the pre-day pitch practice meeting where we was given a stand to demo our product on and practice the pitch. The China National Convention Center was huge, and the directions given to the meeting point was pretty vague. Lucky for me, after asking a few guys if they spoke English, I bumped into the main guy from TapLinker, who is bilingual, so problem solved.

Preparing for the practice pitch was fun, I had prepared some slides the night before, and the practice pitch seemed to go alright. Some good feedback I got was to mention more about the potential sub-products we can sell and show those typical hockey stick revenue projection charts.

After the pitching I bumped into another startup founder Eric from LifeBit; which is a really beautiful mobile-first gamified blogging platform. Eric is an awesome friendly down to earth guy. He was joking about how awesome the salary rates for developers in the Philippines was. He was also pretty kitted out with a huge impressive banner stand for his product. We both didn't have posters for our actual exhibition stand though, so we teamed up and negotiated (he negotiated, I was cool with whatever) a knocked down price (half the original quote) for one of the helpers there to get a poster printed out for us.

Also got to befriend the guys from MNECreations; who are working on an awesome gamified learn Manderin app which I really could of used for this trip!


In the evening we were invited to a VIP dinner, in which I managed to crash the stage to give a quick talk on the benefits of localization, make some more business contacts, get invited to speak at an upcoming conference in Shanghai, and eat some free food (best part).


Exhibiting is hard work
Day one of the actual exhibition was hard work, in the morning we were massed with people checking out our stand asking for product demos. Meeting some amazing people from corporations like Intel, Samsung, Unilever, Sailfish, to VC's and Angels, to Universities and other Startups.

The guys from Visualead modelling for us.


As usual I was pretty nervous for the pitch, walking up and down backstage shadowboxing. But once I put on my magic jacket and got on stage to present, I seemed to be ok.



Feedback and advice
Day two was more relaxed as I had gotten a handle of the demoing structure. I did get to meet some more amazing people and I even managed to interview a few.

Mark van der Maas being awesome.

The best part however was getting everyone's feedback on our pitch and product. I received some great advice from Mark, Eric (LifeBit) and Ben (MNECreations) on how to better introduce our startup. The main problem identified was trying to present the journey from the startup's perspective rather than the end user. Which was taken in and executed at the next pitch at Lion's Cage (blog post coming soon).


The grass is smiling at you
The last day was nice and peaceful, I met up with Dave Cooper who is a local indie games designer, professor, rockstar and comedian (yes, he's super talented). We co-worked at Cafe Zarah which was a really nice experience because I got to hands on test and give feedback on the upcoming game he's working on. Plus, the soup was nice and there was free WIFI.



:)

Friday 17 May 2013

Using web workers to JSON.parse large json files

Previously I had been working on converting FBX 3D animations to JSON to allow for easier loading of 3D animations into WebGL and OpenGL. However, using the standard JSON.parse JavaScript function is slow, and especially noticeable if you're running animations.


However, this noticeable lag can be combatted pretty easily with the use of webworkers. Instead of running the JSON.parse function on the main thread, just pass the unparsed string data over to a web worker and call JSON.parse there.

After implementing this change in the up coming realtime 3d games editor, around 1.8 seconds of unresponsive UI lag per ~4mb of json parsing was avoided.


You can find generalised implementation up on github for your royalty free, do whatever you want with it, and don't blame me for crashes, use.

Download: json.async

Video walkthrough


Sunday 12 May 2013

C++ Threading on Windows Phone 8

I have to admit, the whole multi-thread paradigm for Windows 8 and Windows Phone had me a little lost, so I have been fiercely avoiding it until really needing it for loading FBX animations dynamically.

The problem was that all the examples out there seemed to always call WinRT system operations, which made things confusing at first.

But in the end though, it turned out to be super simple.
 // Get a reference to current thread
 auto currentThread = Concurrency::task_continuation_context::use_current();

 Concurrency::create_task([this]  
 {  
      // This part is run on another thread  
      moveVerticesToOrigin();  
 }).then([this]()  
 {  
      // This part runs back on the original thread  
      movedVerticesToOrigin();  
 },  
 // schedules then() part to run in the current thread  
 currentThread );  

The first part of create_task runs moveVerticesToOrigin on another thread.
The then part runs back on the original thread create_task was called.

Simple!


Here's another example showing you how to pass parameters around
 // Get a reference to current thread
 auto currentThread = Concurrency::task_continuation_context::use_current();

 // I will copy the variable textFileData in the lambda below
  CCText textFileData = fileData;  
   
 // This lambda opens up with this and textFileData  
 // Which means that it'll make a copy of both those variables.  
 Concurrency::create_task([this, textFileData]  
 {  
      // Uses the copied version of textFileData to run this->loadData  
      bool loaded = loadData( textFileData.buffer );  
   
      // Returns a boolean  
      return loaded;  
 }).then([this](bool loaded)  
 {  
      // The loaded boolean is picked up from the first function's return  
   
      // This stuff runs on the original thread.  
      if( loaded )  
      {  
           this->loaded();  
      }  
      else  
      {  
           CCText script = "CCPrimitive3D.Loaded( ";  
           script += primitiveID.buffer;  
           script += " );";  
           CCAppManager::WebJSRunJavaScript( script.buffer, false, false );  
      }  
 }, currentThread );  

In our first function we make a copy of the textFileData parameter from outside the function, then use it on another thread.

We then pass the result loaded, into the then function which is run back on the original thread.

So there! It's actually super easy :)


Saturday 11 May 2013

Disable HTC Syc Manager Autostarting

Hey guys, got the HTC One the other day, and I love the fact that you can actually use ndk-gdb without having to manually root the device!

Things I don't love however is the automatic mount and popup prompting you to install HTC Sync Manager.

To disable HTC Sync Manager auto-mounting
Launch terminal

Type
diskutil info /Volumes/HTC\ Sync\ Manager/

Make a note of the Volume UUID.

Next
sudo vifs

Go to the bottom of the file
tap the i key

And paste the following
UUID=YOURVOLUMEUUID none hfs rw,noauto
Replacing YOURVOLUMEUUID with the one you made a note of earlier

Hit Esc
Then type the following to save.
:wq

Credit: http://www.tannr.com/2009/09/01/preventing-a-volume-from-automatically-mounting-in-os-x/


To disable Android File Transfer auto-starting
Instead of HTC Sync Manager, use Android File Transfer to browse files on the phone.

Note!
Android File Transfer too likes auto-starting.

To disable, go to /Applications/
Right click on Android File Manager -> Show file contents
Inside Contents/Resources
rename Android File Transfer.app to Android File Transfer_DELETED.app

Go to /Users/YOURUSERNAME/Library/Application Support/Google/Android File Transfer.
rename Android File Transfer.app to Android File Transfer_DELETED.app

Credit: http://productforums.google.com/forum/#!topic/mobile/3hPIZjP0rDo