Pages

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.

removing the middleman

(Not really a blog post per say, but I can write whatever I want on here. That means no proofreading, hell yeah.)

I've been thinking about the removal of the middleman in business services, and how it's becoming a fairly common thing. What do I mean my that? I'm referring to when there is a person who wants a service, and there's another who can provide that service, the transaction between them is done directly with absolutely no mediator. The big middlemen I've been thinking about are publishers, and even banks.

Bitcoins are getting some serious attention nowadays, and in case you don't know what they are, you should go read up on it. It took me a few hours of reading and research to fully grasp the idea of a peer-to-peer currency system, but once I caught on, I realized that the creators of this currency algorithm were onto something big here. The significance of this really shows, with the current value of a bitcoin estimated to be at $75 CAD.

What Bitcoin sets out to accomplish is to remove banks from transactions. Crazy? Yep, but it's been proven to work so far with the thousands of drug deals that are done through the currency with government agencies having no way to track the transactions. Each transaction is stored as a bitcoin block, which is added to the previously existing blocks that are distributed on the peer-to-peer network that powers bitcoin (which requires bitcoin miners, but that's a whole other topic). Anonymously. Money can go in and out of accounts, and the people behind them can never be tracked.

In a world dominated by bitcoins, there will be no banks. Also no taxes, since the government can't track the money - which would result in all sorts of nation-breaking problems. Plus probably a massive surge in hackers who want to take over other computers to gain access to either the bitcoin wallets or their untapped GPU power for extra bitcoin mining. This will never happen, but the important thing is that this is allowing for money transfers through the internet with nobody needing to regulate the exchange.

Publishers, like banks, are not going away anytime soon, but there are instances popping up where they seem to have less control over their own domain. In the video game industry, Kickstarter is gaining some serious momentum and allowing for AAA titles to be developed with money straight from gamers who want the game in the future. The biggest project I can think of at the moment is Project Cars, an incredibly ambitious racing simulation that's schedules to release on PC, Xbox 360, and PS3. Without the aid of a gaming publisher, they have been able to raise almost $5 million directly from fans. The developers will earn 100% of the revenue without having to fork over a chunk to publishers, who would probably blow a couple million on things like marketing and focus testing. It's a huge win for both sides.

Even without Kickstarter, games are adopting models where fans can pay to support development and gain early access to games to provide feedback to developers. A lot of people refer to it as the Minecraft model, since Minecraft was the first major game to allow early purchases at a cheaper cost (less than $10 at the pre-alpha stage, I believe). Games like Arma 3 are getting massive sums of money from fans even before the game's even coming out.

In the book industry, big shot book publishers are starting to feel the early pinches of the ebook model, which allow for self-published authors to succeed in the online marketplace. The Wool ebook series has been selling like hotcakes through Amazon's direct publishing system, and the author Hugh Howey has been making bucketloads of money. He started off with modest earnings in the couple thousands per month, which soon skyrocketed to hundreds of thousands per month. The guy even sold movie rights to Ridley Scott!

Naturally, book publishers wanted a chunk of the pie, so they offered him million dollars deals. Howey refused them all. Sensing how big this was going to be, they started offering deals in the tens of millions, but they couldn't get appealing enough offers for Howey, considering that he was making serious bucks without any corporation aiding him.

As of right now, he's one of the very few successful self-published authors. I believe the reason they're not prevalent yet is due to the marketing. When people walk into a bookstore and see a cool cover of a book, they want it - or at least want to check it out. With ebooks, especially the ones that never hit the physical market, it's difficult to get that level of exposure. But considering everything that is going on, it's not unreasonable to believe that consumer behavior will change to be online-focused, and more authors can make it big without taking a gamble on publishers.

With all this going on, it's probably safe to predict the direction of these industries. Big corporations cannot change fast enough to always keep up with changing consumer demand. Smaller groups of people who actually develop the service can. These groups of people do not want to be constrained by the corporations. Once effective lines of communications can form between the providers and the buyers, we'll start to see some serious overhauls in the industry.

Sunday, March 10, 2013