On Friendship

I finished the last week of my summer internship at Facebook last Friday. I can’t help but feel nostalgic and sad that another chapter in my life is coming to a close. My housing complex that up until recently had been full of new friends I had made now seems eerily still. I’m one of the last ones to leave for home. My thoughts drift. How long will it be until I see these friends once more? Which friends will I never get to cross paths with again?

These feelings are all but uncommon to me. In each of my previous internships and school years I’ve felt these pangs of bittersweet. I wish my internship was longer. I wish this small, ephemeral portion of my life could last. I wish these people didn’t have to graduate and move away. Perhaps this is all a lesson in growing up. Maybe it’s to show us that, “Hey, you can find happiness no matter where you go, so don’t be afraid to leave this behind.”

Yesterday evening I went up to the city for a spontaneous picnic and catch-up session with a childhood friend. I tried to toss my apple cider into the trash can but missed, spilling onto our shoes instead. We doubled over in laughter at how ridiculous I looked. While tears came out my eyes and my abs ached, I slowly realized: holy shit, this is awesome. I felt more like an adult every day, but in that moment I knew that some of my friendships would last forever. Here we were 3,000 miles from home yet it felt like nothing had changed. On my ride home I messaged my friend to let him know much I appreciated him. That inspired me to write this post for all my friends.

Regardless of how short I’ve known you, I want to make it known just how greatly I value the kickass friendships I’ve made over the years. You guys brighten my life and challenge me to be a better person every day. I’m happy to have friendships worth missing.

I have no idea how this position came to be

– Michael

Pennapps 2015

(Note: This has been sitting in my drafts for too long, decided releasing it later was better than never doing it at all)

This last weekend I went to UPenn to participate in the 2015 Pennapps hackathon with another friend. Going into the event, we had no idea of what we wanted to build and little experience with the hardware we picked up. After brainstorming for a few hours, we decided to make a virtual reality Fruit Ninja game using the Oculus Rift and a Myo. 48 hours later, while giving a demo of our game to over a thousand people, we ran into one of my most dreaded fears: technical difficulties.

In the end the moment of sheer panic was worth it, we ended up taking third place. Unfortunately, not owning a Myo and Oculus Rift leave me unable to continue working on the game. If you want a copy of the code, shoot me an email @ hello@michaelyliu.com

Creating an online multiplayer web game using Socket.io and Quintus Part 3

Here’s a quick demo of our finished game:

Last post, I showed up how to set up basic Socketio interaction with Quintus to allow for multiple people to join a game of tag. Now, let’s work on the final part of our app, which is adding the code to let our players tag each other.

Player Class

Let’s add some properties and event listeners to our player class

player.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Q.Sprite.extend('Player', {
init: function (p) {
this._super(p, {
sheet: 'player',
tagged: false,
invincible: false,
vyMult: 1
});
this.add('2d, platformerControls, animation');
this.addEventListeners();
},
addEventListeners: function () {
this.on('hit', function (collision) {
if (this.p.tagged && collision.obj.isA('Actor') && !collision.obj.p.tagged && !collision.obj.p.invincible) {
this.p.socket.emit('tag', { playerId: collision.obj.p.playerId });
this.p.tagged = false;
this.p.sheet = 'player';
this.p.invincible = true;
this.p.opacity = 0.5;
this.p.speed = 300;
this.p.vyMult = 1.5;
var temp = this;
setTimeout(function () {
temp.p.invincible = false;
temp.p.opacity = 1;
temp.p.speed = 200;
temp.p.vyMult = 1;
}, 3000);
}
});
this.on('join', function () {
this.p.invincible = true;
this.p.opacity = 0.5;
this.p.speed = 300;
this.p.vyMult = 1.5;
var temp = this;
setTimeout(function () {
temp.p.invincible = false;
temp.p.opacity = 1;
temp.p.speed = 200;
temp.p.vyMult = 1;
}, 3000);
});
},

Read More

Learning Unity

For the past week I’ve been learning the Unity game engine and working on a simple ping pong game. I can see now why there’s so much praise for Unity—the tools are easy to pick up but very powerful, the documentation is thorough, and the potential for what you can make is practically limitless.

I tried experimenting with Unity’s built in physics to achieve the feel I wanted from the ball, but I ended up writing my own physics instead.

I was playing around with letting the player move forward and backwards as well and Unity actually surprised me by doing this!

My goals for this project are to have a local two player game with certain powerups like faster hits, ball spins, etc. More to come!

Developing on a Myo for MHacks

Last week for the hackathon MHacks 2014 I was fortunate enough to snag a Myo by ThalmicLabs to develop some cool hacks on. Check out the youtube videos below!

How I did it:

For Myo scripts you can use C++ or Lua scripts for Windows & Mac applications, and Java for making Android apps. Writing Lua scripts and the android application was straightforward and relatively painless. There are event listeners given to you for each gesture and you have access to all rotational data from the Myo. It’s a very shallow API so the learning curve was very low.

Read More