Monday, November 19, 2012

blog has moved

I moved my blog over to my site a while ago, but I forgot to inform anyone who might be getting the feed from here. All 3 of you. Hi mom.

Anyway the blog can now be found here and I am updating it weekly.

http://www.eturnip.com/

If you want the rss feed for your reader, you can get it from the link here.

http://www.eturnip.com/1/feed


Tuesday, June 19, 2012

Game Characters are Assholes

Mal Reynolds: It's my estimation that every man ever got a statue made of him was one kind of a son of a bitch or another.



Think about some of your favorite game protagonists. Quite probably, they are an asshole.
I’ve been thinking about this for quite a while, but the thing that really drove it home was playing the Uncharted series. The protagonist, Nathan Drake, is presented as a likable Indiana Jones type, affable,  replete with foibles and failings, but ready to dust it up when he needs to. As written, he is layered and interesting, in an adventure serial sort of way. And then you play the game. As the player it is your job to direct “Nate” through all his trials. All indications are, that this will mean hair raising adventure, narrowly avoiding disaster, and dodging death with a joke and a rakish smile. What really happens is that you repeatedly murder scores of dudes. Seriously. Angry, armed men spew forth from the masonry, and you direct "Nate" to gun down, or beat to death, every last one of them. The titular assassin in the Assassins Creed series could not hope to compete with the raw dude killing prowess of Nathan Drake, and dude killing is sort of in his job description.

I enjoyed the Uncharted games quite a bit. I enjoyed the pulp serial characters and story, and I enjoyed the cover based action combat. But never both together. The disconnect I felt was due to the story constantly insisting that this character is a decent and likeable human being, when the guy I'm controlling is clearly sociopathic, and borderline psychotic. A lot of games put you in the position of the one man army punching a hole through evil. That player character is either an empty cipher with no personality but what the player assigns to it, or they are presented as an emotionally broken person, worn down by war and struggles for survival. Were you to meet them in a civil setting, they would most likely be an asshole.

How do we tell if someone we meet is an asshole? Typically they express it through their interaction with the world. They tend to be blunt, disruptive, destructive, or all three. The koopas and goombas in Mario games rarely go out of their way to intercept and harass Mario. They just walk diligently along until you direct Mario to stomp on their heads. The enemies in most FPS games are slightly more in control of their own fate, and they do actively assail your avatar, but seriously what was your guy doing, staring them down in the first place. Wouldn't most normal people give the violent gang ahead of them a wide berth. Didn't Nathan Drake venture into these caves, to find treasure. I would think that armed conflict would be detrimental to that goal. Unless of course he's sort of an asshole, then by all means, march right in and start killing dudes.

Now, To be sure, I've killed my fair share of digital baddies. Probably a few other people's share as well. I've enjoyed it too. Almost always I was at least peripherally aware that my character was sort of an asshole. Games are usually a no options environment. I had to kill all the nazis to escape from castle wolfenstein. Had to. All of them. “But Owen” you say “all those soldiers/pirates/aliens/molemen were evil, you had to kill them to save the world, your character is not an asshole, he’s a hero”

Me: hey (insert game hero here) the way you escaped from that (pow camp/spaceship/hell dimension) was amazing, and thanks for saving the world.

Hero: Not a problem. Just part of the job.

Me: So, tell me what happened in there.

Hero: Well I had to fight the first few guards hand to hand until I got ahold of one of their weapons.

Me: Oh wow! So then you busted out?

Hero: Nope. First I had to deactivate the doomsday weapon, and shoot all the guards in the head.

Me: Holy Crap! Thanks for doing that. It sounds terrible.

Hero: Don’t mention it. Like I said, just part of the job. So then I doubled back to loot the armoury, shooting guys in the head the whole time.

Me: Okay. Looting the armoury? That was really important?

Hero: Oh yeah. Very important part of the mission. I needed the bigger weapons to shoot all the minibosses, and then the main boss.

Me: Really? I mean, you deactivated the doomsday weapon right?

Hero: Oh yes, of course. Then I was trapped in a checkpoint room where I shot every bad guy in the head so that the door would open.

Me: What!? Why!? How does that work? What was keeping the door closed?

Hero: Not sure really. I just shot everyone, and then the door opened. That wasn’t the only time that happened either. One time I had to search around for one of the little grunts and shoot him in the head before the door would open. He must have clipped through a catwalk, and got caught up in some geometry. I had to use an entire clip trying to hit him in the head. Ha.

Me: Jesus!? Why didn’t you just leave him there?

Hero: Had to open the door. If you can think of a better way of opening doors than shooting heads, I’d like to hear it. Anyway, I should tell you how I tracked down the final boss, destroyed his armour, and shot him repeatedly in his exposed brain!

Me: What. The. Fuck. (scooch away silently and exit room, close door slowly)

See what I mean. That guy was a bit frightening. Also, probably an asshole. Not that it was entirely his fault. The problem wasn’t really with that character's intentions. He was trying to save the world after all. He is very definitely ‘the good guy’. The only way this guy could interact with the world around him was to shoot it, punch it, or set it on fire. Possibly with a flaming fist gun. Almost every Slam bang action movie hero kills a few baddies along the way, but they also outthink, outtalk, and outrun their opponents. One of the best, thrill ride, action movies of all time, The Fugitive, has the hero constantly making choices, and interacting with the world around him, in as non-violent a fashion as he can, considering the situation he finds himself in. In that movie, Richard Kimble’s interactions with the world define his character. He is most certainly not an asshole.

There are quite a few character action games that eschew this asshole norm. The Deus Ex series is lauded for offering so many ways for the player to interact with the world that it is possible for the player to have an almost completely non-violent experience moving through what is otherwise a shadowy, violent world. Some games, like Journey, furnish the player with no violent interactive options at all. Not only are these interactive options available to game creators, but simply including them as possibilities in a game can create a richer experience.

When press and game players are introduced to a new character action game, one of the boilerplate questions is always ‘how is the combat?’. Maybe we should strive for better than that. We interact with the the world around us every moment of our existence. My hunch is that very little of our life experience is violent, disruptive, or otherwise assholish. A game like Mirrors Edge would arguably be better had they just dropped the option for combat entirely.

After saying all this, I’ll likely want to play, or even make, a game where you shoot things in the face. In the realm of action power fantasy there is a place for that kind of game. The interactive palette is broader than that though. Where are the action games about swimming, or fire fighting, or more abstract fare, like navigating hyperspace, or living the life of a bee. Some exist, Even more are being made, now that the tools to create them are widely, and cheaply available. Someday, very soon, a game character will evoke real empathy, from a wide, and diverse audience. That characters interactions with the world will define them. They will not be an asshole.

Monday, October 24, 2011

Sculpting

Sculptris has been around for a little bit, but I decided to be all late to the game and whatnot, so I just tried it a couple days ago. About a half hour after downloading it I made this.

15 minutes later it looked like this.



Then I did this in 40 minutes. The video is only about 2 minutes. I just sped up the recording to tolerable levels.


Sure, they aren't stellar sculptures. Unfinished sketches really. I had no plan when I started each of these, I was just messing around with the tools, trying to see what I could do with them. My experience was absolutely frictionless.

I love discovering new tools. There is always that crusty old man voice in my head remembering how hard all this used to be. How I had to build up models a polygon at a time, or animate without IK. The voice is still there, but it has been getting quieter and quieter. With Unity3D, Blender (now that they have a sensible UI), Silo, Gimp, etc. the tools have never been better or easier to use, and now a lot of them are affordable, or even free. Did I mention that Sculptris is free. Sometimes I feel like I could just mash my hand on the keyboad and, something cool will pop up on screen. The crusty old man voice wants to hate that, but honestly, tools like these, are just to awesome to hate.




Sunday, July 17, 2011

Level editor ?


I've been toying with the idea of building a level editor for TurboGarbageTruck. Going over the advantages versus work required, I think I have to give it a try.

I've been pretty much just conducting experiments in the game so far. Very surprisingly, almost all of the experiments have been successful. While the game is not terribly ambitious, there were a few slightly uncommon elements that I took on right up front. The idea of a continuous, looping play field is likely as old as Pac-Man warp tunnels or Combat on the 2600. Maybe Defender or Asteroids... okay, the fact that I'm pulling this stuff out of my head really dates me. I'm old, nuff said. Moving on.

So anyway, continuous scrolling, or wrapping game levels have one major advantage over *standard* levels. They can feel free and open while still being very small and contained. You know that feeling when you walk really far in one direction knowing every step you take is one more added to the return trip. Continuous levels eliminate that. Exploration is simple and fun. Like a game.

This another one of those times that a technical limitation created interesting mechanics. In Combat for the Atari 2600, lining up a shot that passed through the bottom corner of one side of the screen to hit your opponent in the top corner of the other side, was a carefully honed skill. The headshot of its time. I'm working with Unity3D, a modern 3D game engine with all the appropriate dingers and tweeters. Technical limitation isn't really a problem I'm faced with. Sure, there are limits, but nothing I have come up with just flat out can't be done with this engine. With a small amount of ingenuity, you can create whatever you can dream up.

The problem I have run into is that the built in tools for level building in Unity3D are just not well suited to creating spherical levels. I mean really, outside of Mario Galaxy, how many games are built on a ball. Not too many. I could simply build all my levels in Maya or Silo and import them into Unity. While that would take pretty much no upfront work, it would also give me almost no flexibility. The best option seems to be to create some more appropriate tools.

The first tool I will have to create is a way of placing objects on the surface of the sphere that doesn't require manually rotating them around a point at the center of the planet. The second will be setting up a way to save out the level into either a serialized format or an xml file. There are ups and downs to both, so I'll have to research it a bit more. The positive offshoot of a save system is that I will have also created the basis for a game  save system, or even a way to save the state of levels, If I go that route.

 Before either of those though, I will go through and just manually assemble one level. While building it I will take notes on all the things that the tools will need to handle. What things will I need to include in the base object class, and what will I need to set up for the save system. These are things you could paper prototype for days, but until they are placed in a running game environment, they will only ever be educated guesses. I have no one to answer too and no reports to prepare, so fuck it, I'll build it and see what happens.

So thats the road map. That is what I'll be working on for the next while, and since I work for an hour or two a day I should be done in the next couple years. I will still be posting up builds though, and depending how deep I go with the editing tools, I'll post that up too. If you like playing with broken toys, follow me on twitter (over on the right there) and I'll spew forth a tweet every time an new build gets uploaded.

Tuesday, June 28, 2011

In the Lab


I've been working on a lot of experimental things. Many of them have been in the builds, and you might have seen some of them. Some others, I have been working on in other scenes and tests. Since I haven't set up the ability to play with previous builds (still coming), I figured I should give a quick run down of some of these experiments.

On the ball


Probably the most difficult challenge so far has been to get the endless spherical world working. I started by creating the obvious. I made a sphere and the built in sphere physics collider, and put the truck on it. That was an absolutely spectacular failure. The truck would go shooting off in random directions, jiggle violently in place, or fall trough the planet (sphere). Often it would do all three. I figured that this wouldn't be adequate to the task, but it never hurts to try for very simple straightforward solutions.

Next I tried setting up a sort of artificial gravity. The physics engine has a built in gravity that applies a force of 9.8 newtons along the negative y vector. Simply put, stuff falls down. I needed stuff to fall toward the center of the planet. Lucky for me a lot of other people over at the unity forums had done a bunch of that work, so I only needed to modify it. Once I adapted some of the other artificial gravity systems and simplified them for my needs, it actually wound up being one line of code. The object with gravity applied to it simply looks for the center of the planet and then moves toward that with 9.8 newtons of force. Done.

So the artificial gravity worked fine, but stuff would still keep flying off the sphere collider, and would occasionally end up in orbit around the planet. Literally. I could hit a garbage can with enough force that it would fly off the planet ending up in a perpetual free fall. It was really funny, and I might use it for something later on, but it meant that, given enough speed, the truck would also leave the surface of the planet, and that was pretty much the end of the fun. The truck would also freak out pretty regularly and usually fall through the planet The main culprit turned out to be the sphere collider. For any math nerds out there, this is probably pretty obvious. A sphere is not a really a stable shape to set things down on. So I ditched the sphere.

The next obvious road was to create a mesh collider. The physics engine and the graphics work off of separate models. The physics engine really only works with very simple objects. The graphics on the other hand can be very complex with little to no slowdown on most devices. For every object that you want to react to gravity or collisions, you will need both a physics and a display model. Using a mesh collider, you can effectively, use the same mesh for both, if the display model is simple enough. Making a decent looking sphere requires a pretty dense and complicated mesh. So that was a no go.

The best collision objects in the engine tend to be cubes or boxes. So I hit on an idea that worked out really well. I figured, why not have the truck just bring the ground along with it. I made a box that's a little larger than the truck and placed it just under the wheels. Then I made a script that told the box to follow the truck around  so no matter where the truck drove in the world, it would bring its piece of ground with it. On a flat surface it worked fantastically. I went about adapting my artificial gravity code to make the collider rest on the surface of the planet sphere and rotate smoothly around the center of the planet to stay positioned under the truck. That also worked very well, but caused some other problems with the camera flipping over and the the controls would sometimes jank out when the truck passed over the poles due to an unfortunate side effect of Euler angle math called gimbal lock. Here is one of the best explanations I've ever seen of gimbal lock.


So I could go back and change all the code I had in place for making the truck move around, or I could change the rules of the game world. So I did that. Instead of driving the truck around a ball that sits stationary in space, the truck drives around on a flat XZ plane and the planet follows around underneath it rotating in the opposite direction. And the rotations are all using quaternion math, so gimbal lock won't be a problem. Any object that doesn't require player input, like the garbage cans and blocks aren't affected by gimbal lock, so they just roll around on their own little ground colliders and everything looks like it is resting on a sphere.

So that is how I went from driving around on a flat plane to driving around on a ball. That's pretty much the stuff I think about day to day working on TurboGarbageTruck. I'm certain that there are better ways to do all the things I'm doing, but development is an iterative process and I should gradually figure out what works best for this game.

I've set up a twitter account so you can follow development over on the right there. I'll tweet any time a new build goes up or I do anything significant with the development, like posting up concept art, videos, or blog posts. You can also follow me @Owen_McManus for dev and non dev related tweeting.

Wednesday, June 22, 2011

The Brokenest Build

I  just put up a new build of TurboGarbageTruck. This is easily the most broken build I've put out since the very first tests. It's also one of the most interesting, as far as I'm concerned. There are a few things that I've been working on in different experiments that have gelled together in this build. That it functions, on even the most basic level, is enough for me to call this a success.

Forward we go.

Thursday, June 2, 2011

Truck sketch

I did up a new Truck design sketch. I think I'm getting closer to capturing the character of Truck. Seriously, this an anthropomorphic garbage truck who's sole purpose is to alternatively smash and gather things in his world, to make a larger and larger garbage pile. I'm really just designing him as a character because I find it entertaining.

I compressed about 45 minutes of sketching down to 3 for the video. Much longer than that and some of the slower bits really get pretty boring to watch.



I have never recorded myself sketching. It's weirdly intimidating. Most of that self conscious feeling I use to have when someone would watch me draw or paint has faded with practice and time. Now, if someone comes to peek over my shoulder while I'm drawing, or modelling, I don't really worry about what they think of my doodles. I'm usually much more concerned that they will just get bored. Recording myself sketching, I'm just worried that the screen capture will break or the computer will crash. It felt like I was drawing to beat the clock. After a few minutes I sort of relaxed into it a bit, but this is definately a new process, and it will take me a while to get comfortable. Modelling with the screen capture running will be... interesting.