Saturday, February 20, 2010

Dice 2010

Being a student I have to study for finals. One of the ways I study is by having something in the background I can concentrate. I've found that if I'm left to my faculties while doing something like math, accounting, etc.. well, my brain goes off on tangents in the background and I can't concentrate.

This time it was finals. So, the task I set myself on doing was basically 3 months worth of math homework in 3 days. A friend had told me this is the way he studied and he didn't have troubles after that, period.

Being a video game guy (I like programming 'em, but as some of you may know, I love doing art for them, too) and having discovered recently that G4 TV's website actually has all of the the goodies on it (things like commentary on the industry and also journalistic opinions on games). G4 TV's cable selection lacks a lot of content. The only two shows that actually have anything are X-Play and Attack of the Show and both appeal to the 12-15 year old demographic; other limitations include the frequency and length of each show, which makes it difficult for serious stuff to happen. Recently G4's website had a display of DICE 2010's presentation in video form. I've listened to some presentations twice, and they are all about 1 hour long.

So, I listened to them in the background, and the three categories that I could put the lectures in:

From Gearbox (Borderlands dev) and NaughtyDog (Uncharted 2 dev) Remedy (Alan Wake):
  • "We had this cool game that recently scored really nicely on the charts; well, you might be curious as to what our company is doing in terms of structure and planning."
NaughtyDog's presentation was amazing. They also did an interview on "Feedback" a a couple of month's ago link. ND explained that while there are limits on things that could be done, they let their departments go wild. One specific example that Iremember was that one scene in "Uncharted 2" was the artists going, "Huh, this scene would be a lot better with some magic done with particles." So, that part of the team was brought in and helped the artist realize what they were thinking of (it was a cross-disciplinary effort). Flexibility was key to the teams success as was communication.

With Gearbox, I hesitate. No, they're DICE presentation wasn't spectacular. Though, it was partially I think because the presenter (either the President or some higher exec) didn't really know what to do when asked to present at DICE. I'm guessing that each company that was asked was asked with the question, "Can you come to DICE and talk about why you are successful?" Now, this is a very open question. Gearbox's rep basically stated the companies history, had small mention of Borderlands and their design process and that was it. What I think the question really wanted to ask was, "What did you do internally that helped Borderlands become what it is?". This question was asked by Game Developer magazine in their latest issue; this ended up being a 2-3 page interview with lots of really good stuff (I'd go so far as to say more than what the Uncharted team revealed technically in both Feedback and at the DICE presentation). Funny how I wrote more on the worse (but by no means bad presentation.

I sat there, and then, from the "corner" of my ear I hear, "We, remedy, developers of Max Payne and Max Payne." I though, wait a tick, you mean the people popularized film-noir + bullet time with a fantastic story made Alan Wake? Damnit, another game I need to play. Remedy's presentation was much more into the nitty gritty of the game mechanic. They were trying to show off what they felt they were good at in this industry: coming up with new game mechanics that add to the game experience such as bullet time (in fact, during the presentation, it was mentioned, "You know, when you tell a reporter what bullet time is, they're response is, "Sounds.. awkward." Well, its hard to explain, but it does actual work to the game's benefit. Same with Alan Wake." At the same time, they kinda also kinda went into the "Excuses" territory stating that, "Oh yeah, umm.. we kinda tripped over ourselves in the pre-production, production, and post-production cycles. Kinda why we've been releasing snippets of stuff. We wanted you guys to know we aren't dead, but at the same time we've got issue and we're seeing a doctor about 'em." Remedy's approach to their internal structure wasn't mentioned but from the few hints of their "culture" I'm going to guess it was a little less lax than ND's or GB's, which might be why they were tripping over themselves for so long (huh, flexibility works?). I don't want to poke too much fun at em for this because I think they are still a great developer I just don't know how long their luck will last with this kind of mindset.

EA's Schappert, Activision's Bobby Kotick, Disney's Stephen Wadsworth.
  • "I'm going to come up here and shoot myself in the foot. Yet again."
EA. Alright, I honestly didn't believe the "Oh, EA is this big power hungry corp that is evil and hates the industry.. yaddah yaddah," thing that seems to hover over that company. Schappert comes onto the stage and says something along the lines of, "I'm not going to brag about about awesome my company is and all that good stuff. I'm not going to brag about how much money I make either." Um. What? Are you kidding me? If Schappert is seriously so incompetent that he can't see how that can't be interpreted from the get go of his presentation then I can see why EA is crumbling. He then went on to giving advice to the industry, "Don't panic guys, we've been through this before. Its tough, but just bite something and it'll be over." So, again, he's either really stupid, or just arrogant. Either could be killing the company. Thirdly, he starts mentioning everything in the industry that is emerging in broad swathes of the brush; as if he knows jack shit about any of it or how it operates. I can't really bash the guy so much. It is somewhat unfair. Like most think, he might just be too high up in the chain to see the raw data (but again, I'm not at the guy's computer I have no idea what he looks at on a day to day basis). I don't think he's malicious and evil. I think it is more that that company hasn't failed enough (like most studios) to be a little bit more modest.
Activision. Well, honestly, Mr. Kotick just tried to explain what was going on with him. He felt the need to explain himself. Up until this point, I haven't really followed what Activision has done, but if he's explaining himself to a personal level (discussing a somewhat addictive/obssessive personality) then he must have done something or his company must have done something that he feels responsible enough to say something about it in front of an audience. That shows some balls. But I think it show's that that company, unless it does something fast may become another EA.

Disney's presentation was more orientated to showing off what they have done and saying that they're going to keep doing what they've been doing. I'm justs going to stop there. I don't want to bash more people. They obviously have a niche market going and I'm just going to leave it at that.

Research
  • "We've got some research to show off that you might find interesting."
I'll be honest. Some of it was rather dry (oceanography applies to gaming somehow o_O what?). Some of it was business related and statistics heavy. If you want to take a look, be my guest. Some of it was interesting, but not worth writing pages about but maybe side-notes.


And with that, back to studying. My break's over :).

Wednesday, February 3, 2010

A-Mazing Labyrinth - An Adventure into the World of AI




Over the past two weeks, I've been programming AI for the dynamic maze/board game you see above for my major (Computer Science). The objective is to collect 6 treasures that are given to you via those cards at the side with color indicators (so the blue card with the book is saying that the blue wizard (bottom left) needs to collect the book). Once 6 treasures are collected, the wizard (player) returns to their respective home base (which is top left for red, bottom left for blue, etc).

The way you play the game is simple. Try to get to the treasure; if there isn't an immediate path you try to find a way to the treasure by inserting that tile you see at the right hanging all by its lonesone into one of the movable columns or rows designated by the yellow arrows. This will shift that row by one tile and may give you a path to the treasure if there wasn't an immediate move.

Our team was tasked with developing an AI algorithm that would select a move depending on the current board state. This is easier said than done.

First we thought about the approaches.

"Easy enough. We can brute-force, try every insert position and rotation within that insert position... but wait, we can do better than that."

This was the weekend before that part of the project was due (and it was the bulk of it). So, we sat down, and started playing the game. We had one giant whiteboard in computer lab that we were in, and we made good use of it. I was at the whiteboard, making notes of the procedure and methods, and my partner in crime was actually playing the game.

Abstraction was key. I told him I could give a damn about the specifics, just give me generally what you are doing (for instance, "The wizard is here and the treasure can be reached but we would need to do a move to get the wizard to a certain location and then pop him to the other side after that turn was made"). The algorithms we were designing were just ideas, methods, of getting to the treasure, any specifics could be dealt with in the code (and in fact, usually what happens is the specifics on paper or in practice are a whole different animal when it comes time to actual coding).

It was funny how at the beginning of the whiteboard, there was this massive chunk of writing, which eventually got compressed into repeating phrases and then to acronyms. Things like "Check Areas Touching", which later become one of the algorithms that were tried before brute-force.

So, in the end, we saw what we were doing. We had abstracted the procedure down to how efficient each algorithm was, when it should be executed, and then we gave it a rough description:

First we always checked if we could just reach the treasure

Second we used CAT to check whether two areas could be connected by shifting one column or row.


So, for CAT, the idea was you get the coordinates or the "area" accessible to the treasure and to the player. The area for the player is black above and the area for the treasure is blue. Then you see if the disconnect between the two areas is less than or equal to 1 tile between them (so they could be touching but one tile on one of the areas has a wall facing the other area). From there, you find the local column or row that could affect that disconnect without harming the path to the treasure (shown here by the yellow line). Then you test out these local columns and rows to see if pushing the extra tile into any one of them would yield a path.

Simply put, the abstract was, if you can find a column or row that connects the where the wizard and treasure can go, then use that.

Third Popping

We used a rule in the game to our advantage.

The rule was, if I push in an extra tile, and the wizard happens to be at the extreme opposite of the tile push (in the same column or row, but on the opposite edge), then game said that the wizard now gets "popped" to the other side (more specifically onto the tile that was just inserted). This was a two move procedure because first we had to move the wizard to the place where he was going to get popped, and then finally "pop" him into the area of the treasure.

Fourth Get closer damnit:

After many sleepless night which I'm sure my roommate wasn't too happy about (thanks for bearing with me Kevin :D!), I realized that the "good" computer that they had made us pit our AI against tried to get as close to the treasure, if there was no valid move it could make to get there immediately. Conviently, Lukas, my teammate, had written a distance function. I modified the brute-force algorithm I had done for the project so that at every possible move it checks whether the farthest reachable position is closer than the furthest it had been able to get (so, it stored the last farthest with a set of variables). This worked out really well, and although I'm not extremely pleased with how this operated (with this function we were able to beat the good computer, albeit by a hair; if we had had more time, I would have spent more time trying to find something that not only beat it, but beat it by a mile) it worked.

Fifth Invalidation - an ideal fantasy:

If only this worked like I had hoped. If it did, it might have actually resulted in that "beating by a mile thing" I talked about. Basically, this was another reincarnation of the brute-force algorithm, with a sinister twist. For each insert, it would test whether the next player would be able to get to the treasure. So, if the next player can't get to the treasure using some insert location, it would return that move. It was more of an "if all else fails do this" type of function, but it was still fun to code. In the end, I put it after get closer because, even with the small quantity of tests I ran on it instead of get closer, it was clear it was doing as much as get closer (which honestly might have been a bug, but I don't know).

Choose algorithm function, or as I like to call it, the Overseer function:

This was a list of functions in the order we deemed most to least efficient. So, at the very top was just trying to get to the treasure immediately, and, at the very bottom, was the get closer function (because at that point, we would have already figured out there was no possible way to get to the treasure in one or two moves, so might as well just try to get closer to it).



Sunday, December 13, 2009

Mario Bros.

My first game-console was an SNES. I had three games that I played on it constantly: a collection of Mario Bros. games (all on one cartridge), a copy of Aladdin, and maybe one other game that I can't think of right now.. oh that's right, killer instinct.

People tell me if I want to call myself a nerd I need to play Mario to hell and back. These are the same people, usually, that tell me that MS is milking the fat cow that is Halo or whatever. Yahtzee recently reviewed the latest Mario Bros. game, and said what I've been thinking for a long time (like it hasn't already been stated 30, 000 times though). Mario is the most milked cow in this industry. It has been milked more than any other game I can think of.

Its not that I'm not going to play Mario because its milked. I don't ignore games because somehow some company is trying to pump money out of it (that's business woopdee-do). I just don't like when companies milk simple concepts and don't add anything to them. Mario was a simple concept. It took the hardware of the generation and did something awesome with it. Now, 10 years later, that same concept that worked on a machine that can be emulated on a handheld now is being put onto next-gen consoles..

I've grown up. I'm not going to go out each year and buy the same goddamned game every time. I like my awesome memories of Saturday mornings playing Mario. I loved that game.

Crtl Alt Del had a very good way of putting it with one of their cartoons:


Only since I know more people that play revamped Mario games, replace Madden with Mario .

Mario was a kids game for me. Its an awesome kids game. My little brother still plays it. But the first time I played Quake II, which, get this, was what Half-life's engine was originally based off of, I was hooked on FPSs. Boo-yah!

Friday, December 11, 2009

Candy for the Left and Right Brains

The people that know me well know that I am both an artist and a programmer.

The interpretation of art can vary along with a persons lifelong experiences. Liking art is a huge part of it being accepted. Given talent and experience, whatever I produce will be judged based upon art theory principles.

To the inexperienced, they are still judging by these principles, but for them it is a lot more abstract; people that work on art in the industry have to know these principles in order to "debug" or criticize their artwork to make it appealing to a larger audience.

So, because art doesn't follow logic strictly, there is room for interpretation. Now, I'm not talking about studio art, which has its trademark as being so abstract that you must interpret it to get anything from it; I'm talking about the entertainment industry (not just the gaming sphere, but also movies).

Whenever I go onto a forum for art critique, I will inevitably find a post that either says, "This is fun, which is why I do it," or "I do this to see the reactions of other people." Those reactions (ie: liking/disliking) are what drive a lot of artists.

These people are happy to see other people happy.


As for programming, there is still a fair bit of showing off to do, but programming revolves around logic and how far one can push themselves in terms of doing trickery with if/then statements, while/for loops, functions, classes, etc. So, while there is a lot of showing off its either, "Don't you think this is cool what I did here?", which, to be honest, even if there is a negative response to it, the euphoria of making something complex and having it work is enough, or the program is shown off because it solves a problem and isn't just, as a friend puts it, "for the lulz."

I've experienced this with my own PhysEx program; I'll continually show off the progress because approval of friends is always awesome, but I will not stop just because somebody told me to. The underlining reason is that there is a purpose to building the program. I see a problem that could be solved with automation or it may just be a supplement to another process (my program is a supplementary program for physics students in high school).

My dad built a rocket guidance system, for hobby rockets, because he was annoyed his rockets, which he spent weeks building, would fall into the trees. So, he spent many years designing and programming a system that has GPS tracking, gyros, and some other gizmos I'm sure. For him, some of it is solving a practical problem (and I'm sure that's what it originally came to be), but after a while it was, "hmm, I could do this and make it even cooler *read: interesting, more functionality, complex but clever*".


In the end, this may be why artists are so extraverted and engineers so introverted.

Monday, December 7, 2009

TV is healthy for me books aren't

Last holiday, turkey day for Americans, nothing for everybody else; except for Canada, but they already had their own *cough* copycat *cough* turkey day, my mom told me that I need to relax. That video games and staring at the computer do me no good day in and day out.

She told me, "Read a book. It'll let you relax."

I've found over the past couple of months that either I had extreme ADD or that I can't stop thinking (not about like math or anything useful) sometimes. But the tangents at which I think lead no where usually and frustrate me to hell and back.

So, why bring this up? Throughout high school and grade school we were told that analyzing every facet of a novel would give us a new appreciation, a new understanding of the story and characters. While most novels were absolute garbage in my opinion, some in fact did have some merit to them. We analyzed them all. To their core. Our English teachers were happy, and when they were happy, we got good grades. That's all we cared about. We wrote essay upon essay on stupid meaningless symbolism, metaphors, archetypes, and cliches. I will admit, it made me a better writer, albeit not much better.

And while we analyzed we slowly but surely found patterns in the text. Good vs. Evil, Emotional Struggle, Conflict over doing the better of two evils, and true happiness (to name a few).

I cannot read a book now without knowing the ending instinctively or roughly what will happen. I don't like that. Its like my education ruined the ending to every good book out there. I'm not saying to the caliber of something like Ender's game or maybe LOTR. I thought the fomer was really good but never read the latter. I'm saying any old book that you pick up to relax. Now, I could go online and read reviews all day on this book and this book, but I'm a student; I don't have time for that (yet I have time to write this blog post, how ironic). Now, maybe since I like to know things like most people, I would have learned this skill eventually anyway (prediction of the plot), but I think it would have become later in life not in college.

In the end, I can go in front of a TV and somehow I can turn off my brain. This is nice; I can relax. I don't have to think about the 300+ issues facing our world today (that's another blog post). I don't have to think about work. I don't have to think about anything really.

Come to think of it, its kind of like my own high, but again, I don't want to think about it.

Friday, December 4, 2009

My thoughts on Linux

Most of the time, whenever somebody says, "Linux is better!" I feel that either they are academics looking for the performance quirks that Linux provides in clusters, open-source fans that want to use Linux as a way to combat Microsoft's influence, the guy that's in it for the shits and giggles, and then the guy that uses it for software development or a sys admin.

Today I went to a lecture with Bjarne Stroustrup, and he mentioned that somebody had told him that nobody uses legacy programming languages, that they simply don't work. His response was, "Legacy languages are the only ones that work." Later on in the QA session he said what he meant was that languages like C and C++ are scalable.

Alright, so if I butchered that joke, I apologize. I'm not the greatest at punchlines.

C++ is a very portable, efficient, and fast. Do you know why? Because it doesn't try to do EVERYTHING. Bjarne actually commented on this (he took a lot of time actually selling his new C++0x language) and said that extra functionality could always be added with libraries to cater to specific needs, but the language's features should be thing that the majority would find beneficial to the way they program. For example, classes are something that are used generally from applications (think buttons, textfields, etc) to enemies in games. So, this is a way to keep it compact.

I feel that Linux is to OSs what C++ is to programming languages.

Linux is exactly what an OS should be: lightweight, no bells and whistles, just barebones, but you can add your own stuff to it.

Last year, I installed Ubuntu on my laptop. It stayed on my laptop for 6 months.

Why did I install it? Ubuntu felt like it had taken care of all of the low level stuff you usually would have needed to take care of via a command prompt. I had used openSUSE before, and it just needed command after command to get even the most basic stuff setup. If you have a lot of free time, more power to you, but for most, even Vista would be a better alternative, albeit not a whole lot better.

Ubuntu had to have more bloat in order get more in-line with the average PC user: I want to get on facebook, twitter, slashdot/digg/arstechnica, or do work. So, because it did cater to the average user, it was able to reach more people (as in its marketshare went up).

Perfect excuse for the open-source guys to go, "Hey look average consumer! Here is a way to boycott MS! I'll just reformat your computer.... install Ubuntu... and OpenOffice."

That's what Ubuntu did, it increased its marketshare, and, according to my dad, this was one of the reason's why Microsoft did such a great job with Windows 7. According to him, Apple creating those PC bashing commercials wasn't really why; but, from a students standpoint, I can say that Microsoft lost a lot of people to Mac because most kids didn't even know about Linux, and if they did they either thought is was this strange complex thing to setup or simply too geeky. So, they switched to Mac because it was simpler.

For 6 months, I used my Ubuntu machine to program, and program I did. I did try to get some games running with Steam and Wine and got pretty successful. I'm still kinda ticked that Epic never released a UT3 client for linux, meh, whatcha gonna do?

Ubuntu was really great. It let me run NetBeans and Firefox. That's all I needed it to do. No crashing, and I didn't notice it other than the GUI. But I uninstalled it because I needed to do artwork for a summer job. Unfortunately, the Adobe suite doesn't run so smoothely in wine; when it does, it runs haphazardly (according to a family friend who happens to be a Microsoft MVP).

There are so many people that I've seen switch to Ubuntu or for that matter Linux because they hate Microsoft, then, one month into it slowly admit defeat when "X" piece of hardware on their machine isn't supported, Team Fortress or Counter strike isn't working, or they can't get some other random thing to work. If you are thinking of switching just to give Microsoft the finger, well, good luck.

In short, I think it takes more motivation to install Linux than just a simple middle finger gesture because doing on it what you can do on the PC is much harder, and, if it wasn't, more people would be using it because it is free.

Monday, August 17, 2009

Busy busy busy

Over the past two months I've been busy to say the least. When my part/full-time job isn't keeping me busy, my vacation has (strange how, when I'm supposed to relax, everybody keeps bugging me if I am relaxed).

So, I've started contract work for a People Operating Technology, which is a company devoted to the purpose of making kickass iPhone apps. If you've got an iPhone or iTouch and use facebook, I would 100% recommend AudioPeople. Think of it is your personal sound byte sender (so, you can send voicemail, but I've also tinkered and used it to send stuff I've done on the guitar).

I am working on the next Animal Fun Time a little game for kids, but also on other stuff (I'm all giddy inside because now I can practice Bungie-like secrecy). The stuff promises to be good, so look out for it in iTunes.

Also, I recently got thunderbird to update with my college e-mail address, and lo-and-behold, I had 281 unread messages, and while a lot of it is spam, some of it was stuff like "Register your car" or "Your password is about to expire". So, good thing I caught it in time.

To those that don't have a wacom tablet and are artist, I *highly* recommend you get one. I've got an old Intuos2 12x12 that I use. 80 bucks on ebay, and I use it every day for everything. You may be different, you may not need all that space, but for me it has been the best piece of mobile real estate I've purchased since my laptop.

Other than my tech stuffs I am proud to say I'm getting out a lot more thanks to my cousin's dog (one of those dog/poodle things with long white hair but is quite small).

Till next time folks :P, I'm going out to meet some old friends o' mine.