Ben Murden

First Person Camera Lens

by on Apr.27, 2013, under Games

I was recently having a discussion with a friend who found the visual effects applied to the camera in many games to be incongruous with his idea of seeing through one’s eyes, especially in first person games. The idea of treating the view into the game world as a camera seems logical enough, and lens effects had humble beginnings, like the lens flair that featured prominently in games from the late 90s. However, developers have been pushing these effects to even greater extremes lately, with High Dynamic Range (HDR) lighting simulating more how a camera would react to differences in light than the human eye, and heavy lens dust effects in Battlefield 3 and ZombiU. Such effects reduce the visual fidelity of the information available to players, yes, but provide a more cinematic visual experience. This is the argument you would probably hear in favor of lavishing more image-reducing effects onto the screen. However, it still doesn’t address the issue of dissonance when this is supposed to be a person’s eyes.

It occurred to me, while discussing how this all came to be, there are probably a couple of subtle factors at play here: Making games look good is a marketing tool, and the closest mediums that most people would understand are film and photo. Take your screenshots and trailers, make them look as close to professional photos and cinema as possible, and most people will think that game looks impressive and worth investigating further. I believe this type of thinking overtook the idea of representing the world cleanly in first-person, but was also influenced by the fact that first-person games were not as common when camera lens effects were really becoming a thing. It felt relatively natural, when the most popular genre was racing games, that the camera should act like a camera (save for the odd first-person camera, which wasn’t really the focus on consoles). I believe that thinking just eventually became pervasive, since it’s so easy to always think of the view into the world as a camera.

It seems then that these camera lens effects simply had to be applied to every type of game that purported to be even remotely realistic – a real irony when reality, as seen through the eyes, features none of these things.

Leave a Comment :, , , more...

Bioshock Infinite Themes and Social Reflection

by on Apr.13, 2013, under Games

I’m going to write pretty explicitly about some things in Bioshock Infinite for a moment, so consider yourself spoiler warned!

Much discussion has been made of the story in Bioshock Infinite, and it’s certainly a big part of why I love the game, but it’s the themes around the world of Columbia that caused me to think most on the experience after finishing the game. To be clear, I’m aware the game isn’t really about Columbia, but I still think it’s an interesting topic of discussion.

The society of Columbia draws many parallels with Rapture from the first Bioshock, but of course, it is clearly not an objectivist society. For one thing, it is mentioned that the people of Columbia pay huge tithes to the Prophet, and there appears to be a public service in place. However, while Columbia’s citizens didn’t fall into a spiral of abusing vigors, they did find themselves facing the same issues regarding the workforce. After all, nobody wants to do the dirty work, and if they do, they expect to be highly compensated for it. The solution in Columbia was to introduce an already downtrodden underclass, and keep them feeling helpless, but with enough of a promise of a better life that they’d want to come in the first place. It’s easy to look at all of this and say “yes, I know, racism is bad; sweatshop labor is bad,” but we can only say that with the perspective that being in another time grants us. At one time those things were considered the norm–that’s just how things were. How much, then, do we accept as the norm, now, that will be considered barbaric in 50 years time? How about 100 years time?

The way in which we work, or are expected to work, might be drawn into focus in the coming years. Workers might not be treated as badly now as they were at the turn of the century, we might disallow child labor, but I think there are much subtler issues still lining the way we treat work, and its relationship to our lives. Take, for example, the general trend of declining birth rate in economies that become better educated and are more innovation and intellectual property producing. Whether this is to be taken as negative is another matter–I’m interested in why this might be. It seems plausible that a better educated populace better knows the implications and responsibilities, both financially and otherwise, of having children, but also that career competition kills the desire to have children; if one is to remain competitive, flexible, and appear enthusiastic in the workplace, then there is little else one can do but to have few, if any ties to one’s personal and family life. Occasionally with age and experience, professional stock increases to a point where workplace flexibility may be demanded, but it’s not always the case. Indeed, the ruse of workplace flexibility might be easily shattered with the sentiment that if someone else is willing to work longer, for less pay, and do roughly an equivalent job, then why wouldn’t they be chosen? Something always suffers, a sacrifice is always made, between work, family, and life–something we’ve come to call work-life balance.

There are those who genuinely have a choice. At one time called aristocracy, at another called the 1%, but the constant is that it remains a small slice of society for whom survival plays no part in their decisions over work-life balance. It is through this that it becomes apparent survival is key to understanding the relationship to work for the majority of the populace, it is the means of continuing to live at one’s current living level. However, because of the emphasis on balancing a life toward work, we may well be sacrificing so much else of ourselves in the process. The subtle forces at work that make this the status-quo mean that it becomes perfectly acceptable for a parent to boast that they spend a “solid hour” with their child in the evening, while another demonstrates how dedicated they are by lamenting that they hardly even know their children. Furthermore, not every pursuit is productive in a way that is demanded by the market, but is no less good for the mind and body, or the collective culture; in many cases they are better. Would it be so bad for a parent to just be a parent? What a bout a 4 hour work day? Parkinson’s law might suggest that if we were only given 4 hours a day to get everything done, we’d probably still manage it. For now, though, presence remains the the most valuable aspect of an employee, and this will probably remain without increased social awareness.

I like to think we will see some improvement in these areas, and there has certainly been a sense of ground-swell, but for now I can only look forward to new thinking and hope it encourages others to consider another possibility, too.

Leave a Comment :, , more...

Evolutionary Diet

by on Mar.29, 2013, under Uncategorized

Our problem with eating a healthy diet typically stems from not ever needing to evolve the ability to know when to stop eating the things that appeal to out tastes the most. Sugar and fat are probably highest on the list of things that are bad for our health in large quantities, so why do they taste so darned good? As our tastes evolved over millennia, those were the most scarce of foods. However, now that we have the ability to manipulate the world around us, our tastes and digestive systems haven’t caught up–we still crave fats and sugars, except we’re not programmed to stop eating them when we probably should.

While watching a show about an attempt to overcome the desire for sugar in almost everything, it occurred to me that there are almost no natural examples of fat and sugar in the same food. An orange has sugars, but no fat, while an avocado has fat, but no sugars. The only naturally occurring example I can think of is milk, which makes some sense, given its role as nutrition for infants. Given this, and the earlier observation that our digestive systems were designed around whatever was available in the natural world, would it not therefore make sense to devise a diet that allowed for all foods, but not high-fat and high-sugar foods in the same meal? Granted, this would probably eliminate almost all deserts, but maybe that’s evidential in itself.

Who knows, it could end up becoming the next Hay Diet!

Leave a Comment :, , more...

Giant Bomb Video Commander

by on Mar.08, 2013, under Development

I recently wrote a Chrome Extension, partially because I wanted to learn how one can be used to inject functionality into an existing website, and partially because I really wanted some functionality that wasn’t already on Giant Bomb. From this was born the Giant Bomb Video Commander! It’s a simple extension that injects some Javascript when there’s a video present, and adds keyboard controls for HTML5 video objects.

I’ve posted a GitHub repository of the source as well.

Leave a Comment :, , , more...

Business Objects: Room Occupancy

by on Mar.06, 2012, under Development

Sometimes Business Objects can make the simplest thing super difficult—if you’re used to using SQL. In this particular case, I just needed an outer join in which I can count the number of rows that have something on the left of the join, and those that don’t.

Scenario

We have data about rooms in a hotel, and we have data about bookings. Bookings are associated to a room by the room ID, and they have a begin and end date, so we know who is in what room at any given time. We have a data cube in which all rooms are shown with booking details if there’s a booking, and a blank space if there isn’t. We want to show a count of occupied and unoccupied rooms off to the side with a single dimension and single measure, so we can do some nice charting.

Setup

We need a variable that shows whether a room is occupied or vacant. This can be achieved simply enough with a dimension that has the following code.

=If IsNull([Booking ID]) Then "Vacant" Else "Occupied"

If you put this next to your list of rooms and bookings, it should show when a room is occupied or vacant. That’s not very interesting by itself, so let’s  start counting how many there are.

You can create multiple measures counting all rooms, occupied rooms, then available rooms by subtracting one from the other, but this leaves you with multiple measures and isn’t suitable for certain charts.

To have a block with the two possible dimensions counted, I started with the following.

=Count([All Rooms].[Room ID])

Create a block that has the room occupancy variable dimension and the count. Make sure it is also set to Show rows with empty dimension values, and what do you get? A count of one for both? Yeah, I had that problem too.

Solution

It isn’t enough just to count, you have to count without row aggregation. That means we need to count every row in which “Occupied” or “Vacant” occurs, even if they are the same (which is kind of the point).

The mistake I made was in the counting variable, so let’s fix that.

=Count([All Rooms].[Room ID]; All)

That little “All” as the second argument makes all the difference! Ugh…

You should now see a count of all room states as expected, and can now make fancy charts all you like.

Caution

One thing to watch out for is if you are actually getting some duplicate rows for another reason, you’ll be counting those, too.

2 Comments : more...

CakePHP ACL and Groups

by on Sep.23, 2011, under Development

There are many great tutorials out there to help you get started with the arcane ACL features of CakePHP, but none of them seemed to cover a specific problem that occurs with reassignment of a parent_id on a save operation.

The parent_id would revert to being null on some save operations on the User model, so if, for example, the user changed their password, they’d end up with no group and an infinite redirect; the redirect loop occurring because everyone should be in a group. Upon investigation with a debugger on task, I discovered the problem resides with the parentNode function, and that all other examples out there are written with the expectation that a group_id will be present in every save operation.

Since parentNode is always called on a save operation performed on a model acting as an ARO, some modification of the typical example is necessary to ensure that you’ll always have the group_id available for finding the parent node ID.

function parentNode() {
  if (!$this->id && empty($this->data)) {
    return null;
  }
  $data = $this->data;
  if (empty($this->data)) {
    $data = $this->read();
  }
  if (empty($data['User']['group_id'])) {
    $groupId = $this->field('group_id', array(
      'id' => $this->id,
    ));
    if (empty($groupId)) {
      return null;
    } else {
      $node = array('model' => 'Group', 'foreign_key' => $groupId);
    }
  } else {
    $node = array('model' => 'Group', 'foreign_key' => $data['User']['group_id']);
  }
  return $node;
}

Like in the Change Password example, on pages where user data is changed, but the group_id is not needed, the parent_id can now be found for the User ARO. On the other hand, you won’t overwrite the group_id if the data indicated it should be changed.

Hope people find this useful, and if you have any suggestions for improvements, let me know!

Leave a Comment :, , more...

Chrome CSS3 Transform Crash

by on Sep.12, 2011, under Development, Web

This crash only seems to occur on some graphics cards, and as far as I know, only on Windows, so I believe it has something to do with Chrome’s implementation of graphics acceleration.

Here’s a test page:

http://benmurden.com/css3test/css3test.html

You should see a zooming, fading effect there. If you don’t see zooming, but you do see fading, then your browser doesn’t support CSS3 transform, transitions or both.

Safari doesn’t seem to have this problem.

If you experience a crash, it might be helpful for development folks to know which graphics card you’re using.

Leave a Comment :, , more...

Portal 2 Blobulator Fix

by on May.05, 2011, under Games

It’s been in trailers, so it’s no spoiler to say that Portal 2 has some pretty cool new mechanics; a lot of them are related to various gels that can be spread across surfaces in order to convey a number of interesting properties.

While I thought all the gel effects looked great, I had a weird hitching performance issue whenever there was a lot of the stuff flying around. To be clear, the rest of the game was running smooth as butter, the hitching only occurred when the gel presence was thick.

Cores

I heard a developer commentary on the gels and the challenges faced when trying to optimize the code to work on the Xbox 360, and how it was easier on the PS3, because the blobulator threads could be passed off onto the SPU. This had me thinking that maybe my ageing Core 2 duo just didn’t have the cores required to process the calculations effectively. I also read from others experiencing this issue that dropping effects to medium fixed the hitching, and while this was true for me, that also reduces other areas of detail I was having no trouble with. I needed to just optimize the Blobulator, so off to the developer console I went.

The two most important commands I discovered were

“r_paintblob_max_number_of_threads” = “4″ ( def. “4″ ) client                    - Indicates the maximum number of threads that will be spawn [sic] for the blob.

“r_paintblob_highres_cube” = “0.800000″ ( def. “0.8″ ) client                    - Set cubewidth (coarseness of the mesh)

It’s worth noting that there were a ton of Blobulator related errors filling up the console as I stood in front of a glorious gel stream.

Threads and Meshes

I thought dropping the threads to 2 would be sensible, given that’s the number of cores I have, but no dice. The way threads are handled must be more complex than that, or it simply expects to be able to use 4 threads if it’s going to do any threading. Anyway, dropping the max number of threads to 1 totally worked! Yay! No more hitching! Except now the framerate was bad when looking at gel. Boo!

Because I had taken out threading, the calculations were simply too much for the CPU to bare, so by increasing the highres_cube value, I was able to achieve 60FPS no matter what. In fact, I only had to increase this value to 0.9 in order to get a stable framerate at all times, and the impact on blob quality was negligible (as a side note, the medium effects setting increases this value to 1.4, which is much more noticeable).

Conclusion

So there you have it. I’ll list my PC spec and the commands used here for reference.

  • E6750 Core2 Duo 2.66GHz
  • 8GB 1066MHz OCZ RAM
  • Radeon HD5870 1GB
  • Seagate 7200.12 1TB HDD

That’s all the important stuff, right? Now the commands.

r_paintblob_max_number_of_threads 1

r_paintblob_highres_cube 0.9

It seems as though the config file used is packaged into the Portal 2 executable, and I haven’t seen a way to get the game to boot with an alternate configuration, so it looks as though you would have to enter these commands every time you start the game. I find it’s a pretty good tradeoff for the ultra smooth and optimized experience. Also, just have a play with the commands in the console while you’re there and experiment with the other crazy hidden-away features.

6 Comments :, , more...

Support IE6 With the Back of Your Hand

by on Apr.13, 2011, under Development, Web

I’ve been doing a bunch of development work with CakePHP lately and have gotten to the point where I’m in a position to submit a few bug fixes and improvements back to the project. One small improvement has already been accepted, so that’s a great start! Working with Oracle, PHP, CentOS, and CakePHP has been an… interesting experience, so I’m hoping to get some information together about that process and make it a little easier for others in the future.

In other areas, I’ve been trying out Sass, Compass, and blueprint, with exciting results. If you wish for CSS to be more pragmatic and structured, these tools are for you. I’m particularly interested in the potential of very experimental CSS3 implementations, like transform and transition. Makes the web feel modern all over again.

When asked to support IE6, I would do it, but I’d do it like this. I actually rather like the idea behind the Universal IE6 CSS project, in that it still aims to provide a usable and clearly presented version of your site, substituting only CSS, but lets those users know they’re getting a much reduced experience. If they’re on the Internet, why haven’t they hopped on the future train yet? Come on people, get with the program. The fact that projects like this have to exist is pretty crazy, but now that we’re in this mess, I’m glad it does.

Leave a Comment :, , , , , , more...

Not a Review: God of War III

by on Feb.03, 2011, under Games

On the back of hearing that God of War III is one of the best PS3 games of 2010, plus having played the previous two games, I felt I should finally give this game a go.

First of all, God of War III is clearly a game about spectacle. The sense of scale imposed in so many of the game’s scenes is really something to behold. It feels pretty satisfying to see Kratos climbing over giant Titans, literally messing them up inside and out, but this kind of thing brings its greatest strengths and weaknesses into stark relief. It’s kind of the same with every God of War game; the best things it has to show you require very little interaction from the player, and any player interaction feels pretty disconnected from what’s happening on screen.

I think enough has been said about the exceptional polish on God  of War III, so I’ll just jump into some of the glaring oversights I noticed during my time with the game.

UI

You know how it is. When you’re sitting down to continue your game, you just want to boot right up and get in there as fast as possible. I’m a busy guy, OK? Sure I hammer on the go button during those logo builds, because I just want to get into the game. How annoying is it, then, when the game disregards any saves you may have on your console and always makes “New Game” the default option? It’s especially bad when that launches you into an unstoppable, unescapable opening cutscene, which was pretty cool first time around, but now only makes more apparent the need for better UI design on the front end.

Always check if the player has saves, and make Resume or Load the default menu option. If you can’t check for saves, make it the default option anyway; the only people you’re going to piss off otherwise are those wanting to quickly jump in and continue a game, which will happen more often than the guy jumping in for the first time and accidentally hitting Load.

I admit it’s a weird thing to notice, but it became a problem enough for it to really stick out. Just bad UI.

Combat and Control

It’s hard not to let my experiences with other character action games like Bayonetta inform some opinions about the combat in God of War III. So rather than fight it, I’ll just run with it.

I feel like the combat in God of War III is starting to show its age. Maybe I was never that into it in the first place, but when compared to Bayonetta, I just don’t feel like I have as much control in God of War. Having spent a crazy amount of time thinking about it, I believe a lot of it comes down to evasive maneuvers and blocking. Too many times in God of War did I feel like I got hit because I couldn’t break the animation of some protracted attack, while I don’t remember having that problem at all in Bayonetta. Sure Bayonetta’s evasive flip is a little fudged in the way it can be used to avoid damage from any earth-shattering attack, but at least I felt in control. When I hit that evade button, I got the expected result and it felt super satisfying; sadly the same can’t be said for blocking in God of War. There I just felt like some of the attacks would take longer to complete than some enemy’s attack animations, meaning I had no way of hitting block in time. Am I supposed to avoid using half the repertoire of attacks because they’re too slow? I think it’s better to give the player a greater sense of control and balance around that, rather than punish the player for using anything but quick light attacks.

I felt like Bayonetta was weighted more toward rewarding the player, with an evasive move that avoids damage by itself, but also grants additional bonuses if timed well.

Gorgons

An enemy that can perform an attack that, if it hits under certain frequently occurring conditions, will kill you instantly. Yeah, that’s pretty messed up. The game has a lot of places in which you can instantly die (and I’ll talk about that later), but none are more infuriating than this, because this one always means having to start an entire encounter again. I hated them in the last games, and was sure that Sony’s Santa Monica Studio would balance them appropriately in this game, maybe making you take a few hits before crumbling to pieces (you know, like the other guys when they’re turned to stone), but sadly no. Fortunately there is not a litany of them in this game, but I wouldn’t have been sad to see them gone completely.

Puzzling Traversal

The single greatest cause of death among Gods, it would seem, is stepping off the edge of a cliff. There’s a terrible inconsistency with invisible walls that prevent you falling to your death in God of War III. Sometimes you’ll be trying to jump down off a platform, only to be foiled by the God stopping power of an invisible barrier, then you’ll be sauntering off the edge of a cliff because the same courtesy was not afforded at this particular spot. It’s an inconsistency that really stood out.

The second greatest cause of death is probably the Icarus wings choosing to take a day off at the most inconvenient of times. I could seriously be holding that jump button for dear life and have absolutely nothing happen. I tested the button for responsiveness and even used a different pad – same problem, sometimes they just wouldn’t go.

The most hilarious thing about all these traversal related deaths is the message asking if you’d like to switch to easy, adding that this only affects combat. Thanks, game, but I just want jumping to work, cool?

You Should Still Check it Out

Despite my grievances on the oversights, I still think God of War III is at least a 3 star game and worth checking out. I’ve probably been too affected by Bayonetta at this point when it comes to the combat, but nothing quite compares to the sheer epic scale on offer here.

Leave a Comment :, , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!