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).

No comments:

Post a Comment