Unity GUI has a great drag and drop interface for calling public functions from your code when certain events are triggered. You can see this when using a UGUI Button script, it has an interface for calling your functions when the button is clicked. I was looking into a way to replicate this kind of drag and drop interface for my own projects and found that Unity has this functionality built in. There’s no need for custom UnityEditor scripts. I figured this out while digging through the source code for the Unity UI system.

unity_button_events
An Example of UGUI Button OnClick events

The beauty of having this drag and drop functionality is that it makes it easier to modify the logic of your project without having to dig into code to make changes. By partnering this with a set of specialized components, you can easily create a system for modifying aspects of your project without having to dig into code.

It’s actually quite easy to setup something like this for your own project. This is great for UI Events but also for game events (collecting items, level complete, etc.). To accomplish this all you need is to make use of the UnityEvent class. Just to be clear, these aren’t the same as the standard C# Event system.

Continue Reading…

So you’re interested in VR development with the Samsung Gear VR. Fortunately, it’s not too difficult to get a build up and running on the Gear VR with Unity. It can, however, be an exercise in patience to figure out the steps to get started. I did some UI development work at Oculus and got accustomed with some of the hoops you need to jump through. I decided to write this guide as an attempt to clarify some of the details.

Please don’t take this guide as the absolute truth. The tools are constantly changing so some stuff may have been correct at some point but wrong at the present. Also, in the future, some things will definitely change. This is only intended as a starting point, a primer. If anything’s wrong, please let me know. There’s a lot to learn!

The Hardware

Here’s a quick rundown of the hardware that you may need and what role they play in development.

Samsung Gear VR

gearvr_consumer
The Samsung Gear VR consumer edition

You probably already know this by now, but the Gear VR is a VR headset in which you plug a specific Samsung phone into and it becomes a standalone VR device. With hardware manufactured by Samsung, and software by Oculus, it was first introduced Fall of 2014 and a few models have been released since then.

There are 3 versions of the Gear VR:

  • First Innovator Edition: Compatible with the Samsung Note 4 phone.
  • Second Innovator Edition: Compatible with the Samsung Galaxy S6 and S6 Edge phones.
  • Gear VR Consumer Edition: Compatible with the Samsung Note 5, the S6, the S6 edge and the S6 edge+ phones.

Continue Reading…

Introducing…

raybeem_ani

Raybeem! The first virtual reality concept from Sokay. It’s a step towards my longtime dream of creating a music visualizer. I spent countless hours gazing at the Milkdrop visualizer in Winamp back in the day. I had no clue how it worked – back when I just starting to dive in Flash ActionScript.

raybeem_user
Here’s my homie giving Raybeem a shot on the Samsung Gear VR.

My concept for Raybeem started with imagining how great it could be if you didn’t need another person to give you a personal lightshow if you were at a rave. And what if you could take all of that great visual and aural stimuli with you anywhere? What if you never had to leave your couch to experience a spectacular show?

raybeem_cap_03

Above is a screen-capture of the playback controls. In the prototype, you can cycle through 5 embedded tracks. I tested using some of my favorite copyrighted tracks. I also got permission from the homies Eezir and Cryptic Circuitry to use their music in the final build. Each track has a different effect on the environment around you. Eventually I’d like the user to be able to load in their own library.

Here is a rough video demonstrating what it looks like on a 2D screen, from within Unity:

Continue Reading…

wp8_donutget
Donut Get! running on Windows Phone 8

Earlier this year I jumped into Windows Phone 8 when I got a Nokia Lumia 920. I’d been using an iPhone 3G for about 4 years and was ready to move on to something a bit more… modern. While Windows Phone has its crappiness (you mean I can’t save image attachments from e-mails???), iOS had its fair share of crappiness early on as well (no copy & paste???).

It was great to have a new fancy phone but I had an empty place in my heart because I couldn’t play my Sokay Games on my phone… 🙁

Bless the gurus at Unity for bringing the Windows Phone 8 exporter to Unity 4, and for free as well!

A couple weeks ago I tested out the WP8 exporter by doing a quick port of Donut Get! I got it working within an hour. I still need to polish it for release, but it was surprising how little extra it required me to get it running. In this post I will cover some of the process and the gotchas I encountered along the way.

Continue Reading…

thecrazyprogram_icon thecrazyprogram_leaderboard
Facebook leaderboard as seen in The Crazy Program on Android.

 I got a lot of feedback from my friends testing our new mobile game The Crazy Program. One thing that came up a few times was a request to have a high scores table to compete with your friends. I created a quick Facebook App version of Donut Get! last Fall and knew it wouldn’t be too much work with Facebook’s built in high scores functionality.

Facebook allows you to save high scores for your app without needing any backend. The caveat is that you can only save one score per user. So this works decently for a global high score for your game, but not so well if you have different levels and different modes. Facebook’s scores API will also return a list of your friends that are playing, in order of rank. This makes it very easy to hit the ground running with some social features.

Prime31 Social Networking Plugins for Unity

I decided to purchase the Prime31 Social Networking plugins to handle the communication between Facebook and Unity. I had a good experience with their in-app purchase plugins and the support was good. There were other options for Facebook plugins but they either weren’t for both Android and iOS or I couldn’t tell whether or not they could handle posting high scores. Some plugins seemed to just handle basic Facebook connect features, or at least this was the impression I got.

prime31social_demo
Prime31 Social Networking demo scene

I started development on Android. The example scene is straightforward and I got connected with my Facebook App fairly quickly.

Continue Reading…

Since using Unity, I’ve been trying to replicate a pipeline that’s similar to Flash. Being able to use Flash’s environment for hand-polished 2d animation just can’t be beat, unless you count custom developed tools. LWF from GREE shows promise in allowing you to bring your Flash animation into Unity, but there is some work involved in getting it to work!

donuts_lwfDemo made with LWF in Unity.

With the mobile version of DONUT GET!, I tried a homemade Sprite Animation approach. This worked reasonably for the requirements of the port but it was more trouble than anticipated given the size of the texture sheets needed for so many frames of animation. Sprite sheets ate up RAM like nobody’s business and easily crashed lower-end devices.

Late last year GREE announced a godsend, LWF. It’s an Open Source tool to export Flash animation from SWF’s into Unity or HTML5. This was around the time I released DONUT GET! on mobile (which was GREE integrated) and I was excited to try it out. Unfortunately, the first release required you to compile it yourself and the only info I could find was in Japanese. Later on I found out that GREE posted more information and a super helpful video walkthrough on the Unity forums.
Continue Reading…

I ported DONUT GET! to OUYA with the hope of it being a OUYA launch title. I anticipated that it would at least help bring a bit more attention to DONUT GET!, especially since it didn’t get as much coverage as expected. Fortunately DONUT GET! was listed as one of the 104 OUYA launch titles, and mentioned on sites like Destructoid.

We’ve made our download stats available for DONUT GET! on OUYA. It’s a totally free game — there’s no in-app purchases.

donutget_ouya_stats
Our DONUT GET! OUYA Download stats are available here: http://www.donutget.com/ouya-stats/

 

A large problem within the OUYA community is that the company is slowly trickling out the ~60,000 Kickstarter units. For developers it’s a bit unsettling with the low download numbers, and the myriad of other software problems we’re dealing with. Continue Reading…

A few weeks ago I attended the Unity LA Meetup OUYA talk. There was a talk and lengthy Q&A with some people from OUYA. The event cleared up a lot of questions I had about the project.

Representing OUYA on stage was Raffi Bagdasarian, who left product development at Sony to join the OUYA team. He explained that OUYA was originally known as Boxer8. He also brought on the Unity plug-in developer Tim over Skype to talk about some technical aspects of the Unity integration.

Developers can sign up for the OUYA developer program for free at http://devs.ouya.tv . There you can download the SDK, view the actively updating documentation, and lurk in the forums. They’re still ironing out the upload process so you’re not able to upload to the OUYA online store yet.

Ouya Unity LA Meetup
Unity LA Meetup (photo courtesy of the Meetup page!)

And now some bullet points:

  • The console will be running Android 4.1 Jellybean.
  • The SDK consists of in-app purchase and controller APIs.
  • Games are required to be free to play, but features can be unlocked with in-app purchases. This apparently is also a method to curb piracy.
  • There’s the typical 70% (developer) / 30% (provider) split.
  • They’re focusing on app discovery for the OUYA store, aiming to organize the shops by more detailed metrics than “highest grossing” or “most downloads.” Using metrics such as most played, longest played, etc.
  • Approval process will have guidelines — not total free for all. Initially they’ll be reviewing every game manually. Eventually they’ll work peer review into the process, similar to Xbox Indie Games.
  • As far as the style guide, they were working on prepping an official one. But in the meantime, feel free to use OUYA name and branding as long as you’re not presenting yourself as sanctioned officially by OUYA. Also, it’s supposed to be spelled in all caps! haha 🙂
  • There won’t be a content rating system like ESRB, but they’re planning something similar to Google Play.
  • Online matchmaking, achievements, Xbox Live features, etc. Not at launch, but planned for eventual release. Until then, feel free to roll your own systems.

More Stuff, Etc…

  • With only 8 gigs of built in storage, game sizes should be developed with that in mind. They’re working out what the hard limits should be as some games currently in development are a few gigs.
  • They recommended tools like the Unity asset store’s APK Splitter, to give a quick initial download from the store and load in assets as needed during the game.
  • They’re looking into cloud storage. At the time they were apparently debating it.
  • Looking into system level integration of Facebook and Twitter. I’m assuming for viral sharing games, and another metric for surfacing content.
  • Developers won’t be restricted from accessing websites from within games, should be able to pull any kind of data.
  • No access to Android Google Play store from within OUYA.
  • They’re open to accepting apps that are outside of games, like video players, etc.
  • No vibration with controller, mouse + keyboard are allowed.
  • They’ll have store analytics available to developers at launch, supposed to be better than Apple’s minimal dataset.
  • Piracy – since every game is free to play, they’re relying on in-app purchases API calls to unlock things.

Continue Reading…



 

We recently released Donut Get! on iPhone and Android. It was originally developed in Flash and we made the mobile ports in Unity. One of the challenges of porting was figuring out how to bring the game’s Flash animation into Unity. Here’s the “quick ‘n dirty” solution I came up with.
Continue Reading…

Ok, I had a hell of a time figuring out how to load in XML for a Unity project I’m working on and use it to build a level. Fortunately the Unity Community is vibrant and helpful, even though you may have to do digging to find what you’re looking for. It can be difficult getting started, especially when working in C# as many of the examples are coded in Javascript.

Here’s an example of some game xml:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<stageData>

<stage>

<map>1, 2, 3, A, B, C</map>

<map>4, 5, 6, 7, 8, 9</map>

<map>2, 1, 3, 5, 6, 2</map>

</stage>

<map>0, 0, 0, 0, 0, 0</map>

<map>1, 1, 1, 1, 1, 1</map>

<map>A, A, A, A, A, A</map>

<map>3, 3, 3, 3, 3, 3</map>

<map>C, C, C, C, C, C</map>

</stage>

</stageData>

Keep in mind that there’s a million ways to go about doing this. I tried to justify why I did it this way, and the best I can say is “I just felt like it.” Haha!

I ended up using a C# port of this Lightweight XML parser. The benefit of it supposedly is that it’s only 8k compared to a megabyte or so that would be added if you used the native C# class, System.XML. I used the C# port by chirhotec in this post. I had to make a small change, commenting out the “string nodeContents” line because the variable wasn’t used.
Continue Reading…