01 August 2010

Consequences

What happens at the end? What happens after that? What happens when we give up half way through? Should we even continue? Is it better to save one, or maybe the other?

Games are mostly linear. It's hard to be something other than a straight line. It's hard to change direction due to the virtually infinite choice that presents itself after a single choice is made. However, since much of this game is about experimenting with ideas for me, I'd like to add another tricky, complex puzzle to it all. I don't want a game with a specific line of sight. I want players to play the game knowing what they want to do in it, but as much as possible, I want to prevent myself from telling what it is that they want.

So many games have grand stories, arching through various sub-plots, sometimes splitting directions. It feels powerful to be able to make a choice somewhere. But many times the power of the choice is muddied and ultimately feels weak, pointless, slight loss or gain, or worse, no change at all.

Mass Effect had a big choice in it one of your party members would die, and you had to choose who. But in the end it felt contrived somehow, as though there was a third choice that could save both. In the end I chose to save the character who annoyed me the least. I killed off the person I never spoke to much anyway - all you really lost by the choice was later conversations, so I didn't have any attachment to the character as it was. Perhaps that's why it meant little to me besides some stats in my save file. 


It's certainly not easy to create attachment to a character and that is key for any decision to make an impact. Even if the only character involved is the protagonist. You need the player to be able to empathise with that entity (I would say person, but many games get you to play as a fox, or a monkey, or amorphous blob, so let's not categorise too much here). If there is no empathy, there is no point to any decision. 


So, here's what I'd like to do. I want as much decision as possible. I don't want to limit the player too much. Obviously the programming time behind this could become increasingly exponential, so I'll certainly have to cut off a number of choices. However, many choices are tied in to how you react towards people. A lot of the AI will be dealing with the mood and trust of all other characters. There will always be multiple ways to respond to characters and much in the vein of the original Fallout this could lead to closing off a lot of possible conversations and hence "missions". I'll go more into this later, and demo a bit of how it'll work out. 

At the moment I'm still very busy at work (as seen by my sporadic posting here) and so the game is slow to progress, but rest assured I haven't let it grind to a halt.

23 March 2010

Collapsible people

Skeletons. BoneNodes. Joint constraints. Rewriting my previous inverse kinematics engine. But really, instead of doing all the hard work I've decided to use a physics engine. I was going to integrate my own IK and animation engine with some physics library after the fact but after some thought I've realised that may be the long way round. If I'm integrating at some point, it may as well be as soon as possible.

Ah, the folly of not thinking far enough ahead. It's ok, though, this should speed me up considerably. All I have to do is make sure that I can layer my own stuff decently on top of the physics engine (for example the skinning system which places a visual of the character on top of a skeleton) and also tie it into the animation system.

Using the animation system will mean I can teach it the basics of how to move and then code in the rest. So walking will mean moving a character's arms in time with it's feet. But if it's holding a gun, it will only move it's arms slightly and keep the gun pointing somewhere. The ideas behind how I want to animate this (or at least procedurally animate this) are very similar to the way the Euphoria engine works. Instead of just having a ragdoll getting tossed around on screen when a character "dies" (generally this happens even if they are just falling), I want the ragdoll to attempt to move. People don't just collapse when they get knocked, they stumble, try to right themselves, or trip and push their arms out to brace for impact or shorten the fall. In short, ragdoll stuff is amateur, old school. Nothing really happens like that in life unless the character is completely dead (as opposed to just slightly dead) when the ragdolling is applied.

On another note, what's with these "idle animations" that people keep making for various games? Pop open whatever game you have lying around and fire it up. If you leave your character standing still, they will general experience some heavy breathing and massive wavy warm effect. Even though they can run nonstop for an infinite distance, they will stand there breathing excessively heavily as if they're about to have a heart attack. But they don't - I checked.

Nobody does that sort of thing when standing still. Have a look at a queue when you're next at the shops, or in a bank or being afflicted by some form of horrifying beaurocracy. People either don't move much at all (besides occasionally looking around), or they move into a new stance and then relax in that without moving much again. I certainly haven't seen people moving their shoulders up and down like crazy. Admittedly this has gotten a bit better over time, but I still see games animated like this occasionally. It just feels so awkward.

20 March 2010

Voicing concerns

Well, I've been thinking about the talky talky system (or, conversation/dialogue system for the grown-ups out there). Huge flowing dialogue trees are fantastic to play through, but insanely long to write. Still, it's something I want to have in the game. Which means I might have to curtail the length of some conversations or at least the number of times you can talk to somebody if it means keeping the number of choices and quality of writing up to scratch (actually, it needs to be much better than scratch).

To really make this sort of thing shine, and in fact the game in general, I've been thinking a lot along the lines of how Warren Spector originally planned to do the first Deus Ex (one of my fave games). His plan was for the whole game to only be played within the confines of a single building and then to make just about anything and everything you wanted to possibly do in that building possible.

It's a goal I've always admired, and while they instead went on to make a game that traveled the world, it still had the feel of so much to do. At the very least, it lived up to the point of that goal. I'm hoping to do something in a similar vein (why is that a common turn of phrase? How often are veins shared that it became common to talk about them in that manner?). This means that I can keep down the number of art assets I'll have to create and turn that towards other components, hopefully speeding up the game creation, or at the very least giving me more time to really refine the game play.

Refining the game play is pretty important in fact. It's very easy for a game that handicaps players to become tiresome or annoying. So I'll have to be very careful about the way I implement the game's mechanics. While I want to showcase the more human aspect of characters in games, I still want this to be fun to play. If something detracts from that, it needs to be fixed and in the worst case, cut from the game.

11 March 2010

Polite banter

Dialogue systems in games (most particularly RPGs) have a long way to go before they could be called immersive or sensible. Often, you just aren't given the option of saying what you really want to say. A few (very few) games have broken through this in different sorts of ways. The most memorable for me, perhaps because it was the most spectacular leap from the standard conversation system, is Facade.

This was a game wherein you typed your responses. Not in the sense of Zork or those old Interactive Fiction games, because it is so much more than that. You could say whatever you wanted. At any time you wanted. For the most part, the game's protagonists react very realistically. In a way it is similar to the whole adventure and role playing game dialogue systems (like Mass Effect, Fallout, Monkey Island). In those games you are given a list of choices or responses. Some games even further this by allowing you to do actions within those responses (like intimidate, draw weapon, run, etc.). However it is normally a very short list of things to say. Facade is like this, except the responses are all hidden away from you. And there are hundreds of possible things to say and responses to those things. It's astounding. It feels like however you react to the game, it is understood by the characters. It makes them feel quite real.

I couldn't begin to do something close to Facade's interaction. It took them around 5 years to create a very short game (to play, that is - although there is a ton of replay value).

Instead, I've decided to do something that I feel has been missing from all these dialogue systems. Tone. Emotion. It's generally implied by what is written in the text, but text is sometimes difficult to read into. A response could be laden with sarcasm, or said lightly, or menacingly. It's difficult to tell just from the text itself. It often takes the user clicking on it to find out how the response is actually said. In Mass Effect, they have paragon(roughly equivalent to good)/neutral/renegade(negative or bad) types of responses.

Here's the sort of conversations you could currently have in Fallout 3 (courtesy of http://www.flickr.com/photos/beaty/3023926779/)

The Witcher has similar limitations. In fact, the Witcher, which prides itself on the greyness of it's moral choices often has binary responses to something that could easily have a myriad of ways to respond to. Even worse, in some games, certain responses have the exact same meaning or reaction from NPCs (non player characters, i.e. anyone who isn't you). What a cheap cop-out. If a choice is the same as another, just remove it. Don't pretend we have a choice. Unfortunately the world doesn't quite work in just those sorts of responses. There's a huge swirling mass of grey, a spectrum of grey choice.
Just look at all that grey. So much choice. Do you see? So much grey is available, I even had to limit my screenshot of morality to grey codes #A3A3A3 through #383838.

 I want to be able to have a veritable list of choices. That's for starters. I'm going to try think of as many useful responses as possible to a given situation, question, sentence, whatever. That's not really anything new, however. What I want to do is explicitly include tone within each response. A phrase can easily go multiple ways. So the way it would be to have a basic version of responses listed. You pick one and then apply a tone to it. 

For example:
Phrase: Where is the control room?
Applied tone: inquisitive Do you know where the control room is?
Applied tone: angry Where the hell is the control room?
Applied tone: Concise or stern Control room?
Applied tone: irritated Look, just tell me where the control room is.

or:
Phrase: I have a gun.
Applied tone: nervous I...um... I have a gun, yeah, um...ha
Applied tone: serious I have a gun, I know what I'm doing.
Applied tone: threatening Watch yourself or I might have to shoot you.

I will probably have to limit the number of tones that can be applied to one. But it might be interesting to have an amount of tone that can be applied. It would be interesting to see the difference between a slight amount of anger (similar to the irritated response above) vs a lot of anger (like the angry response). This should be a fluid or fuzzy amount. Too much anger and you freak somebody out. Depending on their personality, they could cower away from you, shout back, lash out at you, run away, whatever.

Of course, this isn't really all that revolutionary. In fact it's just a nifty way of hiding a whole lot of choices away. Instead of reading through a list of 40 possible dialogue options, you get 5. Then you just apply tone to those. Using this approach makes it easier to quickly pick the option you're looking for. The tones you can apply are pre-set per response. I'll be trying to include as many tones that make sense.

As a single written sentence can have so many meanings, this gives a clear indication to the player what the response actually means. No more picking an option meant to berate an NPC and having them smile blithely as though it were praise. You can specifically state if what you are saying is sarcastic or serious.

It would be interesting to have volume (whisper, shout, normal) attached to this, but would become unwieldy and silly and too often ignored. I think volume can be implied by certain tones. So getting really angry at somebody could mean shouting, which would attract attention to you from further away. I won't bother with this, though - it's superfluous for this game.

The dialogue tree could look something like this. The black blocks with white arrows in just return you to the previous (top) list.


Completely off track rambling to follow:

A long while back I was discussing how to have a really procedural dialogue system. The start of that was based on symbols. Symbols meant different things to different creatures. Food could mean "tree" or "rabbit, voles, and insects". The game was about interacting with tribes of creatures in any way you felt. I'm sad we haven't continued with that game because there was so much to it that would be awesomely fun to play. The story was equally procedural, based in a sense, on the insanity of the main character rationalising what you did.

You could, for example walk through a desert for ages, dying of thirst, while the narration said things like: "But he knew what he was looking for was just over the next rise", "His tiredness is nothing to the import of the journey" and so on. If you just ran up and killed an innocent villager, the game would say something like, "He saw the gleam in the villager's eyes. Acting swiftly to deter the murderous wretch, he stabbed out with his rapier". Everything in the game's view was correct. The path you chose was the exact path you needed to choose. It would even possibly go so far as to show why you were right. Perhaps the villager would have hidden weapons on them, caked in blood and around the corner you would see bodies of all their previous victims.

You could unite tribes or convince them to wage wars on each other depending on how much you'd manipulate them into trusting you. You could, for example, make them trust you by helping them defeat an enemy that you'd encouraged to attack them. And all of it would be rationalised.

The magic system worked much like visual programming language, and in fact the first prototype of this my friend did is part of what inspired my own customized visual language for the level editor.

I'd still be keen to do something like this one day.

09 March 2010

Icky animation

It's been a while since I updated. I've been rebuilding the inverse kinematics system for animation I mentioned a while back. Although it's a system hog, in the end it's way too useful to abandon. Normal animation (frame by frame, pre-made) would be very time consuming to do for every entity in the game.

So, like those big 3D games, I'm building a skeletal system that's mostly shared across all entities. This means I only animate that skeleton once and that animation can be shared across a number of characters (as long as they have 2 legs, arms, and a head). Using this system, I'd still have to hand animate that skeleton but it'd be much easier with inverse kinematics - moving the foot would move the thigh and shin accordingly whereas without IK, I would have manually reposition and re-angle the thigh and shin each frame. So i only really need to focus on moving the foot about. Of course, there do need to be a few constraints here. A leg shouldn't bend backwards for example, so I'm making angle limits on the bones of the skeleton.

It's all very boring to explain so I'll stop there, and post a ragdoll/animation demo later on. If my horrifically vague and inaccurate explanation of what IK fails, have a look at this video. The only part of that robot's arm that is moved is the bit attached to the wheel. The rest of the arm works out how to position itself from there.

UPDATE: Instead of manually doing the animation, I'll be taking a procedural approach. So animation will be worked out on the fly. As a rough analogy, I won't show it how to walk, instead I will explain the concept of walking to the computer and it'll work out how to place its feet and move.

26 January 2010

Brought to you in Technicolor


Look! It's your room.

 
This is an almost direct trace of the pen sketches I did previously. The table and computer setup has been replaced with a desk of drawers and some stationary/crumpled paper and I jigged the chair at an angle. Now, there's no perspective whatsoever so judging what's in the foreground and background is a little tricky. I'm going to have to add some subtle clues in-game.

For starters, everything is on it's own layer so it can move back and forth at different speeds, simulating depth (ooh, it's positively philosophic). I'm also gonna fuzz out the foreground and background ever so slightly to give it the whole out of focus look. Because it's popular and all them young 'uns like that sort of fing. And this is all about popularity. In fact I've replaced my main character with a space marine. But really the focus thing does work and I promise not to make it all overblown. I'll possibly darken some of the out of focus stuff in the background. I have mentioned this a bit before but it pays (in theory although I'm getting nothing here) to say it again as a reminder. I haven't worked out where to put the window although probably to the right of the desk. I was thinking of indicating a window on the wall that the camera is looking through but I think that'd be a bit messy.

To explain all the words thrown slapdash across the art, this is the main menu. The game will fade slowly into this as though Mr Whatsit is waking up in bed. That's why the game title (In the Sideline in case it's too much of a stretch to scroll to the top of the page) is at an angle. The game will start at that angle before handing camera control over to the player (see the rotating camera control).

Waking up might look like this

I'm not quite sure if I'll have darkened edges but I'd like to - it just might be a slight performance issue, but I'm sure I can power Flash on through it. The other words are all directions as to what to do. Go turn off the light switch and you quite the game. Have a look at the mounted picture to load up a game. Open the door to start the first chapter (or wherever your current progress is).

I was also thinking of having the room slowly degrade over time during the course of the adventure. Although the character won't actually be coming back to the room, the main menu will persist. It might have the painting taken down (with a brighter patch of wallpaper left behind and you first have to pick up and re-hang the pic), or the wallpaper can peel or the door lock be smashed in and the door swinging open slightly. All of this is to point out the emotional and physical state of the character. It'd start with the bed nicely made for example. I don't know, it might not work or be too much work for me to actually do but it could also be fun. Hey, it worked for Valve.

18 January 2010

Art direction

*** It looks like the file server I was storing all my Flash stuff on (all those online demos) inconveniently crashed. It looks like it's back up but let me know if you have issues viewing the demos in previous and future posts.

I am trying to pin down the art style (visual representation of objects that have lost a dimension). You know. 2D art. I can go that pseudo-3D route and have 3D objects while the gameplay only exists on a 2D surface (i.e. you can't go into the screen). Well, I say I can, but I really don't think I'd be that great at it, at least not for this project. And while I want to have some concept of depth (moving in and out of a scene), I'd like it to remain 2D because I need to be able to keep my time on this down so I can finish the game within a reasonable timeframe.

It's hard to tell what the art style of many 3D games is now-a-days. Mostly they seem to focus on gritty realism. It takes a game to really go over the top in visual direction for the player to notice the difference (like Mirror's Edge). 2D games really shine in art direction - it's certainly faster and easier to do 2D than 3D and this is surely part of the reason, but still, it's surprising how many of the latest games just try stick to the look of "realism". I find that immensely boring.

I've gone off track a bit here, so if the above is boring to you, feel free to skip down to this sentence and go on from here (of course you probably won't notice this sentence until you have already read the above, which probably has a moral in there somewhere. Either way, eat your veggies or your thumbs will fall off).

I'm using a side-on viewing angle and dropping all perspective from objects. This is actually a kind of tricky thing: how do you know which objects are in the foreground if there is no perspective? A quick I-haven't-tested-it idea is fading or dimming of objects so that only the interactive or foreground objects will be highlighted. I'll probably do a bit of that. Non-perspective is normally not too bad but I'm going for semi-realism at the same time which is why it's not so straight forward.




I'm all out of graphics tablet so I've resorted to black pen and paper. Which means I'm also out of an eraser so some of the bits are messy. This is a rough idea for the protagonist's* room.

While perspective is out, angling an object is not. So in the above I could have the computer and table offset so that it's sort of facing the camera like this:

It actually turned out better than I expected. This could really work.

So why aren't I doing some sort of isometric style thing here? Pretty much because I'd have to then rewrite my shadow engine. It deals really well with flat 2D but isometric stuff would require a semi-3D take in shadow calculation. That's really not an option when working in Flash. Besides, embracing limitations is fun.


* I really need a name for this guy. I promise by next post I'll have one. If you have suggestions feel free to chuck 'em in the comments or something. As "cool" as they are, names like Slade Dynamite, Snake Melodramatic, Raven Mistmare, etc. are not quite what I had in mind.