Pages

Saturday, November 9, 2013

da independent life

For the past week, I decided to move into my friend's new apartment right by Thunderbird Stadium, and I'll probably be staying for another week or two (or longer, depending on how things go). Why? The building looks fucking cool. Here's a photo:


Also, my simple life at home was starting to bother me, which is part of the reason why I don't want to be in school at the moment. I'm sick of this 'fantasy' life where I have no responsibilities other than sitting in front of a computer and finishing off assignments/studying. I just want to switch up the rhythm to my life, and I figured this would be a nice way to shake things up. Indeed, it was.

Here's some shots of the interior of the place:



Not too shabby. In the second photo, you can see my air mattress and my sleeping bag to the left, along with my laptop and other study tools on the table.

My roomie is at school most of the time, since he likes studying in the library rather than where he lives, so I have been treating the place like it's my home. It's an incredibly empowering feeling to walk up to a fancy apartment building, whip out your apartment keys, and walk into a classy looking suite. I've always wondered what it feels like to own your own place, and now I know. Is the independent life all that it's cooked up to be?

My schedule looks like this:
- Wake up at 6:30-7:00
- Make breakfast for the next 30 minutes or so
- Eat breakfast, leave some for friend
- Make lunch for the next 30 minutes or so
- Take my morning dump, change, pack
- Yell at my friend to wake up
- Head out for class

Having that extra responsibility of feeding myself is actually great. If I starve for whatever reason, I have no-one else to blame except myself (maybe my roommate, if he doesn't go grocery shopping when he should). I must take into account the length of time it takes to make each meal and the quality of the food. Of course, the tough part is learning to cook when you've never really had to make food for yourself for your entire life.

Thankfully, my friend knows a thing or two about cooking, so he showed me the magic of cooking steak. We made some for dinner on Friday, and this was the result:


Not bad. Thanks Jenn for the food prep tips over text!

Another interesting point to make about living in this apartment is that there is no internet.

Wut? No internet?

Yes. No internet. And also possibly never any internet.

But is such a thing even possible?

When I mentioned this to a friend, the first thing he mentioned was, 'but how will you pleasure yourself?', with a genuinely worried face. He's a funny man for having that being the first thing to pop into his head. But that's beside the point. Living without internet for more than one day is an intense experience. You think a lot more about your immediate surroundings. You have more time, which you can use for physical exercise, meditation, or studying/doing homework. Whereas there may be days when hours pass by browsing the web, without that connection you are always aware of the time. It makes you plan ahead. Dare I say, the experience is refreshing. I'm not sure how much longer I can hold it up though, considering the basic connectivity I require from being a computer science student and working on a web app project.

I am typing this from home, which I returned to for the weekend. Back to having food made for me. Back to convenient internet access. All this made me reflect on my experience.

One of my biggest goals in life (which may be modest for some people) is to get a place to live. To be self-sustainable. To be able to earn enough money to pay my own rent as well as give a couple hundred to my mom so she can live without having to worry about whether a certain food is on sale at Safeway, or if her apartment rent will go up. I pretty much got a taste of that life. I returned to my 'own' place after classes, which I could treat as my own, and I could do whatever the fuck I wanted to do.

It made me think: now what?

What do I do, once I reach that theoretical point? I would have to imagine that there could be times when I'm sitting in my fancy apartment on my fancy sofa sipping a glass of wine, being bored and wondering what to do other than waiting for the next workday to show up. What would be the next step in my lifestyle?

Is this even something to think about? I'm probably looking too far ahead. As things are right now, I'm a non-working debt-ridden university student. I will never be able to purchase a full home in Vancouver in the foreseeable future. But I have to say, thank god for my co-op salary next term. I'm definitely looking forward to it.


Monday, August 26, 2013

walking mechs


Here' a video I made to show my partner my progress on my locomotion system. Since it's on Youtube, I might as well post it here.

A brief explanation of the system I am using: Mecanim behaves as a state machine (I wish somebody told me this earlier), jumping from from animation (looping or not) to another depending on certain parameters. In my system, I use 2 parameters: a float for keeping track of the direction and the walking/running state of the character, and a boolean to keep track of the jumping state. The jumping state overrides everything else (obviously), which is the reason why where are so many crazy transition lines in the state machine. The character has to be able to jump whether it's walking, running, or idle. Take into consideration that there are 2 different poses for the jumping, and it adds a lot more complexity to the states.

What I am working on implementing:

- When idle, the body should turn without the legs turning along with it. I'll probably implement this by storing the rotation in a temporary variable when the character is idle, and carrying out the rotation once it is out of that state.

- Sideways dodging. Pretty straightforward, should be easy to implement.

- Inverse kinematics for advanced animation functions such as foot - slope recognition. I do not know if such a thing is possible with a non-humanoid bone structure. If it is not possible, I will try to develop my own system with raycasts and such so that the mech can run up slopes with proper ground detection per foot.

Wednesday, August 21, 2013

long overdue update

Yes, I haven't posted in a month(s?), but I didn't want to write a post without a whole lot to talk about. Now there are a couple things I'd like to talk about, complete with pictures.

First off, I was pretty sick for a good week and a half. It started when I slept on the bus wearing only a T-shirt. In case you haven't checked them out, Richmond seems to have new buses which would be awesome if it weren't for the fact that they are fucking air conditioned to -10 C at all times. I wake up feeling a bit whoozy. Of course, the next day I wake up with a headache. The next day, I wake up with violent chills, and the day after my lower right stomach begins to hurt so much I can't straighten my back.


Off to the ER it was. It was probably the sane thing to do - one doesn't simply play around with the possibility of appendicitis. After staring at ultrasound images for a while, he told me that it appeared to be a crazy lymph node viral infection that replicated almost all of the symptoms of appendicitis. Whew. I was able to go home without getting my belly cut open, and although the pain didn't disappear for the next 4 days, I was able to sleep well knowing that it would eventually go away. That is story no. 1.

I've also been dabbling around with Android over summer. It sucks that I don't have a mentor for a close friend who knows this shit though, since when certain types of problems occur, I have no way of knowing what the problem is even after hours and hours of Googling and searching Stack Overflow. After several days, I may come across an obscure post that tells me that I was making this tiny mistake, but until then I'm stuck at a roadblock.

For example, I was trying to make a simple news reader for my android project. I decided to use Google News as the news source, as they made it convenient for me to make a keyword search and pull an RSS feed just for the searched news. However, when I clicked my news links, an incomplete url was being sent to the browser, resulting in invalid webpages showing up every time. After a while of debugging and trying to get to the bottom of the issue, I discovered that the symbol '&' was not registering properly for the parser, resulting in the link cutting off whenever & showed up. Some follow-up reading revealed that, yes, RSS parsers could not handle ampersands without a '&amp' replacement. I don't know how in the world I was supposed to know that, but ok.

Being the stubborn man that I am, I decided to try to keep working with this crazy RSS feed instead of trying other feeds. I learned how InputStreams worked in Java, and I tried to feed in the RSS feed from Google News in the form of a String, stick the whole thing in a buffer, and replace all instances of '&' with '&amp' (except for cases where that has already been done, wtf Google...), and feed the result into an RSS creater and parse it. As expected with such a strange method of handling RSS, I ended up with all sorts of problems, and ended up giving up. I just didn't know enough about RSS and the parser I was using in order to know exactly what was going on.

This whole process must have taken a good week or so, with me working on and off, due to summer courses. At the end, I picked another site's RSS feed (which gave properly formatted feeds, thank fucking god) and everything worked smooth as silk. Someday, I will re-tackle this problem, and figure out what went wrong.

Ok, that's enough talking. I'll show a couple pictures of the app.


Being the ass that I am, I decided to work on this whole thing inside of a friggin canvas. This means playing around with draw methods, figuring out all the coordinates (and all the problems that come with them), and figuring out strange ways to show movements and animations with awkward out-of-place variables.

The above is supposed to be my main screen, the first thing I worked on. It initially only shows the UBC button, which when tapped, expands out to show the other 3 buttons. I see occasional glitches with the way I've currently coded it, but due to how convoluted the code looks for this Activity, I've been afraid to touch it. Someday, I will re-design the whole thing from scratch, knowing all the problems I know I have to tackle directly in the design of it. I faced a lot of problems I had no idea would be coming.


This is the second component of the app I completed, which is evident from the more refined look I designed. As you can probably tell, it's a UBC-based news reader, pulling news straight from the UBC News website (whose existence I didn't event now about until last week). I intent to play around a bit more with the xml layout to make it more visually appealing and more feature packed.



This is supposed to be a list of faculties (accessed through the 'About' button from the main Activity) that can be expanded into it's majors/specializations when tapped on. When I was planning this out, I could not find a built-in layout in Android that could do what I wanted (at the time - now I know that I should've used ExpandableList). I build the whole thing, again, in Canvas. This meant implementing my own scrolling mechanic (which was ridiculously difficult), and my own selection mechanic (which must take into account that the finger may move slightly when the user still intends to make a tap), but everything worked out after I had those set up.


And for the heck of it, I added a menu option that sorted every single major in alphabetical order.

What I'm currently working on is another Activity that implements Google's new Maps v2 API, that will search for locations restricted to only within the campus along with listing out particular points of interest (callback to CPSC 210, fun course!). As for the design of this Activity, I plan to use Android's built in side-swiping layout, which I need to use ViewPager and FragmentPagerAdapter for.

Afterwards, I'd like to create something that would automatically log me into SSC or Connect when I open up the corresponding links through this app, but from my early attempts this is going to be incredibly difficult. Not only are there all sorts of issues with security doing that sort of thing, but the website seems well designed to prevent such things from happening. For example, I can't even link to the 2nd login page where the textfields are - the server fucks me up and tells me that I must enter from the original login page. There may be a way to brute-force username and password entry, but I'll have to do plenty more research for that. In the end, it will be worth it though. I hate typing in my user and pass on my smartphone EVERY time.




No, that's not all, there's more to this damn blog post, keep reading. I have joined a compsci friend of mine in creating a game. The idea is that it's a modernization of a 2001 mech game called Phantom Crash, built in Unity (of course it's in Unity, everybody and their grandmas use Unity). What I found fascinating about this is that it's really unique. It's not a generic first/third person shooter. It's not a platformer (again, everybody and their grandmas make platformers), and it's not even a type of mech game that's currently out in the market right now. Games with Hawken and MechWarrior focus on heavy, slow-moving robot tanks, while this game emphasizes speed and agility.


(Above is one of the placeholder(?) mechs I modelled and rigged. Total time: 10 hours)

Following my strengths, I'm in charge of creating the entire animation system, along with creating all the animations too. This could be an easy job if I was aiming for a mediocre game, but I have a keen eye for movements, and I do not intend to have clunky movements in this game. All blending will be perfect, there will be left-foot-forward/right-foot-forward idle states, there will be torso/leg animation independence, there will we weighted movements, there will be movement momentum/environmental interaction... and the list goes on. This also means that a lot of the gameplay mechanics will be determined and created by me, since the animations systems will dictate how the mechs play out.

The great thing about this project is, my partner is no scrub. Absolutely not. He is the master programmer. He is 2 years younger than I am and has won numerous programming awards. He plans to graduate within 3 years of starting school and get into the real world as fast as possible. He has been developing a GUI system within Unity that can handle all resources in the game, browse them, edit them, view them, etc for easy resource access in the future my ourselves and potential modders alike. He is currently developing a mapping system for storing all the data on maps/events. He has planned all the data/classes for holding the information about the GameState in one massive game design document. He seems pretty serious about getting this thing working.


(Above: a typical day in 3ds Max)

Due to my inexperience with a lot of the hard coding elements my partner is working on, I will be working with a lot of the systems he designs, along with modifying them for easier use if necessary. Scripting for the game though, is certainly a little bit easier, and that's how my animation system will come into play. After I get some basic animations completed, I will develop a simple version of my character animation handler and see how that goes, hopefully by the end of this week.



And that's it for my crazy long post. I hope you enjoyed reading (or at least thought the pictures were cool).

Sunday, June 2, 2013

你好,好久不见!

Taking an intensive language course is definitely an interesting change of pace from my usual computer science stuff - especially after a whole semester of nothing but numbers and lines of java code.

Thinking quickly on the spot is not something I'm been used to. When the professor asks a question in Chinese class, in a split second you're expected to put together all the relevant vocabulary, arrange them in the correct grammatical format, and then pronounce them as accurately as possible following their tone marks. I still speak sentences in a choppy manner, but I'm getting there.

Speaking of tone marks, holy crap Chinese people are super sensitive about that stuff. I tried speaking the little bit that I knew to some of my friends, and they ripped my pronunciation apart over the smallest things. Tone marks are some hard shit, I don't think I'll ever get them right in my life.

It's nice and all that I'm finishing off my arts credits in a month, but it not any good that I hardly have time to work on my Android project. The thing about languages is that you're never done studying. There's always something more to work on, there's always some aspect of the language, whether it's speaking, writing, character memorization, etc. that you're not quite up to speed on. My little Android apk remains an app that only displays a white page, with no functionality yet. I thought I'd be able to take on both Chinese and computer science at the same time like a champ, but it doesn't seem to be the case.

The very least I can do is work out the preliminary planning for my app and think up possible problems I'll run into beforehand to make the actual coding part as smooth as possible.

In other news, my mom will be going to Korea for a week or two. Her dad has been diagnosed with Alzheimer's, so she wants to see him before he is unable to recognize her. Nothing's stopping her, not even the $1200 + tax round trip ticket price and living expenses - understandable, as she wasn't able to see her mom before the passed away.

And also in other news, my sister has decided to go to UBC Okanagan and become a nurse. Not bad, not bad. The Okanagan nursing program has been pretty competitive over the past year or so, so it's nice that she got in. She's not the most academically driven girl I've seen, but she's some strong drive. She took over her high school's MUN club and turned it into something with reputation, as opposed to the shitty, poorly-managed club that I attended when I was in grade 12. It's always fun to see her kick out a member who hasn't been regularly attending meetings.

That's it for today's blog post. 再见。I'll finish it off with a link to one of the most magical songs I've ever listened to in recent memory. Brought to you my the one and only Daft Punk.


Tuesday, May 14, 2013

ni hao

I'm chugging away full steam ahead on my 6-credits-in-one-month intensive Mandarin course for the summer. I'm not sure if I should shoot myself, since we didn't hit the meat of the course content yet, but I'm enjoying it so far.

This post is only going to be a short vent. A goals post is coming up soon - it's kinda late right now and I'm getting sleepy.

First off, I'll mention a failure I went through. I went for an interview at some corporation. I went home. I sat by my computer for days. I worried. Then I got a call that they gave the job to somebody else.

Now, my job hunting experience is hardly extensive. I've worked here and there, volunteered a bit, but never worked what would be considered a 'real' job. This could've been my first - sitting at an office dressed slightly fancier than usual plugging away at a computer making $15 an hour. My friend who worked there said that it bored him out of his mind, but I don't care about that right now. This job could've helped me pay off a full years worth of tuition and more. Damn, it hurts thinking about it.

I guess the only positive thing that came out of this experience was that the HR rep decided to call me to inform me of the decision, even though she was e-mailing all the other candidates their rejections. As I looked sad on the phone, she said that I did ace the interview, and that she wouldn't have me change anything on that. But someone else had SQL experience, and although it was not required to apply for the position, it was definitely an asset. She told me that she'd keep my application on the file and consider me for any upcoming positions. At least it softened the blow.

Now what? Now I gotta spend some $1600 on my summer courses.

:(

On the side, I've been practicing Android app development. There are a hell of a lot of things to remember when setting up an app, but things seem to be simple enough once the basic framework is set up and you understand the flow of things, from XML layouts to the Android manifest to the Activity classes. The only thing I'm stuck on right now is with the illustrations. I've had Paint.NET open for a day now, and I've been struggling to figure out how to draw a colored circle out of all things. My sister laughed at my incompetence with digital art (she just finished up her Art AP submission).

Well, I'm going to play a round of Dota 2 now, and go to sleep. Another post coming soon.

Friday, May 10, 2013

mid-life crisis

I don't know if I can call this a mid-life crisis. I'm not even 20 yet, but heck, I can't think of another term for it.

I don't really feel like typing out the specifics, other then that I am questioning a lot of things about my life, not not feeling too good about them. It's definitely preventing my short summer break from being the cheerful one I was expecting. Not being able to land 2 jobs that I got interviewed for was probably a catalyst for this, but it has existed in my head for a while now.

I think I'll sit at my table for the next few days and just think this through.




:(

Sunday, March 24, 2013

and some Skrillex



Damn if this doesn't get me moving with the volume cranked up to 11.
Skrillex and Nero at their A game.