Eating Healthy

It seems it is getting harder and harder to eat healthy. As humans learn more about what makes up food and as we make more genetically altered food I find that being able to understand how food affects you becomes impossible. There are some people that believe in all organic foods, others in being a vegetarian but there are people that contradict these beliefs. I think the best solution is just to take things in smaller portions, there is no need to eat a gigantic slab of steak in one sitting.

Salad

Training Season Has Started…

Got a trainer for Christmas (see below) and got my bike setup on it. Man is training instense on this thing! It is quite different than riding on the road, really really different. It is totally intense! If you stop pedaling, the bike just slows done a ton, and it isn’t as if you are going anywhere so why stop pedaling. So I keep pedaling and man does it wear me down quickly. I also have to figure out how to get a breeze flowing through my room so I am not just breathing in stale air. But man the trainer is going to be awesome!

How Did I Miss These?

GRAW2 was a game I was always sort of seeing how it turned out because I was such a huge fan of Ghost Recon 1 and 2. But after the first GRAW came out and playing it I just didn’t feel like giving it the time of day. Well recently I was in Best Buy and saw GRAW2 on sale for mega cheap so I picked it up. WOW! Boy did I miss a lot of fun gaming! It is essentially the same game as Ghost Recon 2 in terms of game modes with the added bonus of cover system, aggressive (albeit stupid) AI, and more explosings. Furthermore, they recreated my favorite map, Embassy, for GRAW2!!!! HORRAY!

FIFA 09 was also a game on my watch list but it soon fell off after the bigger names of the season came out. I have been on an FPS rage for a year or two now, hell even Fallout 3 is an FPS (RPG). Anyways, I was playing my brother in NHL09 and getting my rear end handed to me on a silver platter so we decided to play some FIFA 09. Boy is this game fun! The best part about FIFA is its depth. With hockey I have always felt the action was too mucky and quick to be able to inject any strategy (games, not real hockey) whereas Football games have always been about the passing and setting up that one beautiful lob or pass that gets you in perfect position for striking. Well FIFA is no different. It is fast and somewhate easy to pick up but deep enough that mastering it will take awhile. Unfortunately I only have the demo because the game is still $60. Maybe Santa will be uber nice this year?

Christmas is Coming!

Horray! I love Christmas, but not for its supposed religious background but rather because of what is has morphed in. Of course I am talking about the food! Actually, although the food is good, it is always nice to see everyone in the family. Anyways, I was doing a few shots of the tree tonight, trying to figure out what settings to use and I snapped this. I thought it looked a bit trippy…

Trippy

Context: Part 1

I was watching that show/movie about Britney Spears, the new one where she is looking back over all the crap she has gone through and reflecting on stuff. Before you get on my case about watching it I would like to defend myself by saying I don’t normally watch TV other than for House, Home Improvement and Roseanne. Anyways…

As I was saying, I was watching it and she started talking about how other people misunderstand her sometimes. She goes on to say that people only want to hear what they wish and this got me thinking. I am a huge fan of the idea of context because it is an important concept to know about whether you are a writer, developer, artist, architect, engineer, or anything else. My point here is that people understand things a certain way because their life is different, their mind is different and thus their context for the situation is different.

While it sucks, we have to understand this and rewrite our speaking vocabulary to get past the barrier as much as possible when we want to. When we want someone to understand what we mean exactly we have to get around that barrier. The question is how? How would you write a speach that gets a point across no matter the listener? How do you take a photo in a similar manner? Develop a game’s storyline? Design a building?

Despite context being one of my favorite topics, it never gets easier…

Innovation versus Cheap Tricks

One of the biggest problems I have with the video game industry is the lack of innovation. Time and time again I see games getting awards for something that is a cheap trick, a reinvisioning of an old tactic to fool the player into thinking something deeper is happening. This happens because someone in the company, or perhaps the collective, decides that it would be cheaper and cost effective to go the simple route. Rather than drive innovation, companies employ plays from a 30 year old playbook.

For this rant I need a target to examplify my point and for many reasons I am choosing Left 4 Dead. It urks my nerves the amount of people that think this game is a divine representation of what games could be. They throw so many undeserving awards at the game it is as if it is because Valve had something to do with it. There are many cases being made for the game but I will only focus on two: cooperative play and randomized levels.

People are claiming that Left 4 Dead is the best and most innovative cooperative game to come ever. They are pointing fingers at the situations it imposes on the players which force teammates to come to the aid of others. For instance there is an enemy that can wrangle a player, pull them away from the relative safety of the group and put them in a state where self defense is impossible. This requires the other players to drop what they are doing and help the teammate being attacked. Another example is how the death and revival system is implemented. When “killed” a player is put into a last stand position that allows other players to revive them. If revival fails, the player is put into a closet in the map for retrieval, generally after a group of enemies has been slaughtered.

The problem? This has been done before! Left 4 Dead is forcing situations that would naturally arise if the AI should have. Ever play Ghost Recon (1) coop on the hardest difficulty? Ever been in a situation where you or squadmates are pinned down? I have countless times, after all it is the reason they call it cooperative play. Coming to the assistance of teammates is part of the formula! Forcing the issue through specific enemy abilities is a horribly cheap trick.

What about the randomization? Surely it is a innovative feature that hasn’t been done before! After all, both enemy locations and guns are randomized. Hell, even what enemies appear is randomized! Sadly, this has been done before and the randomization has a very low upper bound. What I mean by this is that with any sort of randomization like this has specific locations or enemies that may or may not exist. You know going into a level that a certain amount of objects in the game may or may not exist.

It quickly turns into a game of asking “will object A be there?” rather than “what will be next?” This “innovative mechanism” has been used many times in the past, such as in Diablo II: Lord of Destruction. When you dive into the Worldstone Level 2, and 3 in Hell difficulty of D2:LoD, the enemy locations and types are randomized. The problem is the same though: there is a known set of enemy types that can or cannot exist. You will quickly run out of new, unexpected types very quickly. This isn’t innovation! This is faked non-repetitiveness, a cheap trick to make you, the player, think that the game is more than just a set of pre-defined levels.

So what is my point? Innovation should be driving new game development, not the idea of making money. Instead of the pathetic implementation of randomized objects, L4D could employ algorithms that teach the zombies to use portions of the environment as weapons. For example a tank that is spawned near metal piping learns it can use the piping as a weapon after a player accidently blows it up. It then knows that piping is a weapon and learns to rip the piping off the wall. If this is extended to a majority of the objects in the world you quickly create an environment that is completely open. Yes, the developers should be afraid of the game breaking itself but it is a risk, a necessary learning step in the name of innovation. Gamers aren’t going to care if the game originally breaks itself because they will be too frightened of what the enemies will learn next! Imagine facing a large enemy that all of a sudden sees a pile of enemies it previously disposed of, picks them up and starts chucking them at you. Now imagine facing him again; you are expecting the same thing to happen right? Except this time instead of throwing them he swings them at you because he saw you wield a bat. He has learned through example and now you are screwed. Using a gun could mean him using a gun, each tactic you use will be used against you. The world now becomes almost real…

So if you are a game developer remember immersive gameplay is created by creating deep and rich worlds, not by faking them with cheap tricks. Also remember Left 4 Dead isn’t the only case of this, I am just using it as an example because it is the perfect example. Almost every game suffers from this to a certain degree.

Managing Focus Across Different Platforms

With the upcoming release of FGF/Thrust comes the return of a more traditional GUI. One of the most problematic requirements of a large GUI system is the notion of focus. The question remains how do you efficiently determine who has focus and how do you pass focus between controls? On Windows this is incredibly easy because we have the mouse pointer. Focus is changed whenever your mouse acts on a control. What about on the Zune or the Xbox 360 though? On both of these systems their is no mouse (although Thrust supports a virtual mouse).

The answer is to look at what Thrust currently supports. What built in system supports all three systems seamlessly? (~ means some support, X means full support)

Event Zune Windows Xbox 360
Mouse   X  
Keyboard   X X
GamePad ~ X X
UniversalButton X X X

The problem is we can’t rely on each individual hardware controller being present and useable. For example we can’t rely on a keyboard being a focusing mechanism on the Xbox 360 because it isn’t a guarantee it exists. Likewise, we cannot rely on the GamePad on the Zune because of the lack of buttons.

To get to the point, the UniversalButton system was meant as a virtualization of the various hardware supported for each platform. It turns GamePad, Mouse, and Keyboard events into simple events like Up, Left, Down, Right, Select and Cancel. Because of this we can rely on it and implement a few more events.

  • TabPreviousLocal
  • TabNextLocal
  • TabPreviousGlobal
  • TabNextGlobal

You can consider local tabbing to be much like you would on a Windows form: hitting the tab key (or shift-tab) will move you from one control to another based on some order and only in the context of the global focus point (you never tab to a control in another window). The global tabbing can be considered like an Alt-Tab (or shift-alt-tab) where you can switch between windows.

So how do we implement this? We need a managing class (sorry Bjoern) to produce a bottleneck for the input events. As events are channeled through this class, it massages the data and figures out what to do. For instance if a global tab next event is received it has to switch focus to the next window in the system on the same level as the current window. If it receives a local tab event it will pass a message to the current focal point to tab to the next control.

What does this do for us? For one, it unifies the approach to focusing across all the UI subsystems. This means that a Window/Form implementation will focus in much the same way a simple screen will. Unfortunately it also means a complexity requirement for implementation developers. The age of the simple StateManager class is coming to an end. Elements on the screen now need to have a basic state for animation as well as a state for focus (or lack thereof). While it may still be possible to simply unload an element through the StateManager, the reality is that UI elements will have to do a little more management under the hood. Whether this is exposed to the user / developer is still to be decided.

A Spark of Genius?

Knowing how frameworks are designed and developed definately has its benefits. Awhile ago I spent some time looking into how DependencyObject and DependencyProperty work in WPF. Essentially, many of the properties are not simple properties but rather facades for method invocations.

Fast forward to today when I was working on Versionator, an application I am writing to help me manage my many projects’ versions. The problem is that project information files (AssemblyInfo.cs) are not straight forward in terms of parsing. They are merely text files, awkward and malformed code files in fact. To be able to support many properties so easily, I came up with a scheme to parse, manage and save the projects’ properties in the file.

What I do is parse the properties, extracting the data and storing it in a dictionary as “old values.” At the same time I create a copy of the values in a “current values” dictionary. As new values come in, I channel them through properties, then Get and Set methods which access the “current values” dictionary. When it comes time to save I have to do some management of the data based on whether or not the property was empty, non-existant or is being changed to empty. It is simple to say that it would have taken me a lot longer if I had not taken a look at WPF. So was it a spark of genius? Or just plain old learnedness?

The Code (Beware of its massive length):

P.S. The code is not done, is not even close to being efficient or functionally complete. But it works!

The H in HDR

I have a bone to pick with game developers and graphics artists out there using the term HDR incorrectly. I understand the notion that a word can mean something different under two different contexts. For HDR, however, the idea and term are rooted in how a scene is lit. Whether you are using it to describe a scene in a game or a photograph the term means the same thing. The H in HDR stands for High, not Low.

I am sick of seeing articles that explain how a developer can equalize tones in a scene by increasing or decreasing the exposure for each rendered object only to end up with the addition of glowing and blurring the scene. Bloom has nothing to do with HDR, it is an entirely different concept used to simulate the effect of an object appearing overly shiny. This is commonly done by downsizing the scene, blurring it and then pushing each pixel towards dark or bright. This effect works great if you are attempting to render a lightsaber, but not if you are attempting to use HDR.

The point of HDR, or High Dynamic Range, is to equally expose different parts of a scene. For example let’s say you had a dark room with a desk. On the desk is a lamp that is lighting the top of the desk. To the right of the desk is a chair that is dimly lit by the ambient light. Using HDR in this case would allow an artist (game developer, photographer, etc) to brighten the chair while darkening the desk (or leaving it alone). You can think of HDR as corrective lighting surgery for an image of a scene.

Even Wikipedia contradicts itself on this topic:

One of the primary features of HDR is that details in a scene with a large contrast ratio are preserved. Without HDR (for the purpose of this article, low dynamic range or LDR) areas that are too dark are clipped to black and areas that are too bright are clipped to white. These are represented by the hardware as a floating point value of 0.0 and 1.0 for pure black and pure white, respectively. Graphics processor company nVIDIA summarizes one of HDRR’s features in three points[4]:

The Wiki page is stating that HDR scenes provide a mechanism for preserving the details over the entire scene regardless of current exposure. It goes on to say that without HDR, you get over and under exposure problems. The contradiction occurs in the sample image (below) which depicts HDR incorrectly. On the side that is supposedly HDR, the scene contains hot spots of over exposure, a component of a LDR (low dynamic range) scene. Fortunately the right side of the image isn’t HDR either but simply the left side without the bloom applied.

Wikipedia - HDR Comparison

It doesn’t stop there: one of the most commonly used examples is a person coming out of a tunnel. We all know the effect as we come out into the sun from being in the dark. Because our eyes adjusted to the relative darkness of the tunnel they are over compensating when they come out of the tunnel and thus it seems bright for a fraction of time. The problem is that people are attempting to use this as an example of HDR. Rather the desired effect is done through blooming (over exposing) the entire scene for a fraction of a second and then turning the exposure back down.

I am open to discussion (you will have to register to comment) to whether or not HDR means something different in terms of gaming but I will tell you right now that the term must be based on some idea. It isn’t valid for us to just use a term that has a meaning and change it because we need a word for that meaning. I am a firm believer that the term is rooted in how a scene is lit, as demonstrated by this other Wikipedia entry which actually uses 3D graphics to get the point across.

Chinese Democracy

The first time I heard the song Chinese Democracy from the album titled the same I thought it was just noise. I felt that there was no flow between the different parts. It felt as if Axl just slapped together random bits and pieces and then stuck in some lyrics. Last night I was listening to the radio and sure enough the song came on. The DJ was explaining that the record sales have been bad, no one really likes the album and people prefer AC/DC to both Metallica and Guns. I found this funny since I hated the new AC/DC tracks for sounding so standard. I think people were liking the fact that the new AC/DC sounds a lot like the old AC/DC but I can’t stand that. I like the new Metallica because it takes old Metallica and changes it just enough.

Anyways, fast forward to this morning where I decided I would search youtube for some of the new songs. Sure enough I have found the whole album and can say that Chinese Democracy sounds a lot better but is no where near the awesomeness of some of the other songs. I would now say that C.D. is my favorite out of all the new albums with Metallica in second and will be going out to buy the CD later today. Which brings me to the next point. The RIAA is smoking crack. Listening to 30 second previews of songs is nice and all, but being able to listen to the full album on youtube has made me want to buy the CD.

WordPress Themes