Freedom of Movement
by Daniel Buckmaster · 11/20/2010 (12:19 am) · 15 comments
The phrase 'parkour it, [censored]!' has become increasingly common amongst my group of friends as a sort of catch-all response to any query one might have about, well, anything at all. Applying the same philosophy to shooter movement has yielded interesting results.
The enhanced collision system was also a huge time-sink that I eventually abandoned, which was a valuable lesson and saved me no end of hassle. Once that was out of the way, I quickly hacked in mantling, which extends nicely to wall-climbing, and vaulting. About a month ago, I hacked in tic-tacs, and by extension wall-running, which I'll be tweaking in the future. I imagine that when it's finished it will have taken the most time to get 'feeling' right, because there are a lot of variables that affect the way you tic-tac, and beyond the mere physical factors, there is the player's intent to consider.
Of course, this sort of thing has been going on in games for quite some time - at least since Thief, which had an excellent mantling ability which let you mount ledges without needing to risk a noisy jump. Gears of War and its brood of cover-based TPSes allow your characters to vault over cover, and many more recent shooters, notably (for different reasons) Modern Warfare and ArmA II, have featured variations on the 'getting over waist-high walls' theme. But aside from that, navigation of game spaces has stayed disappointingly rigid.
Well, there was Mirror's Edge, but let's not talk about that, hmm?
So what have I gone and done? In short:
How does all this integrate with shooter gameplay? It's almost enough to base a game on in its own right (cf. Mirror's Edge). The answer, I'm hoping, is something like 'organically' or 'seamlessly' or other phrases in marketing-ese. The idea is to just open up new ways of travelling around interesting maps, so that tactical cover-based gameplay becomes less stagnant. It also affords you more opportunities to approach situations creatively by climbing and navigating to locations where enemies wouldn't expect you to be. And really, it's just about player empowerment, which I'm a huge subscriber to. I hate it when I can't do something in a game that I can do in real life that would be useful - like climb over that fence or up that ledge.
So I guess after all the rambling, the end result is what's important. And here it is:
Please excuse the lack of animations. Animations are actually hugely important to making all this stuff look good and natural, and I haven't put as much effort into them as they deserve (nor am I talented enough to do them justice, in any case). Former incarnations of the test character have been animated, but I keep redoing the character's bone structure and needing to animate it all over again. This has largely been due to switching between blended and regular look animations. I'm sticking with exclusively non-blended look animations for the moment, since you can't transition between blended animations, and transitions are important for arm animations.
Also, thanks to Bryce for letting me use his Close Quarters map from the 3rd TAIK demo! (I was too lazy to create my own content ;)).
Bearing in mind what you've just seen, I'd love to ask people about a control scheme for these sorts of abilities. At the moment, the scheme is something like this:
There are a lot of complicated things you can do, but I'm wondering if the control scheme will be too difficult to master and remember. I find it pretty simple to manage, but of course, I am the developer. I put it to you: how would you design a control scheme for these abilities?
The idea is that an inventory is organised into 'locations', each with its own size. So a typical soldier's inventory might be divided into locations for the backpack, belt, pockets, webbing and secret boot compartment. Each of these locations can store a certain total amount of volume, but can also have a size restriction per item. So for example, you might have a backpack with size 10 and restriction 5, and a belt with size 5 and restriction 1. If a gun is size 5 and a clip is size 1, then you'll be able to store 5 clips on your belt, but not the gun. Alternatively, you could fit all of them in your backpack!
Each location corresponds to one of the number keys, which is how you access items in your inventory - like in HL2, you hit the key to scroll through items in that location, and click to select the one that's highlighted.
Here's a quick inventory demo. You can barely see the inventory UI in the top-left, which is a shame, but I did want to avoid a huge, obtrusive inventory UI. It needs a bit of work. The video also features some weapon-handling stuff like recoil and different poses. And leaning! Also note Thief-style object highlighting :P.
(In the video I forget that you can't hear the in-game sound, hence my reference to freesound.org!)
While I was in the process of making the inventory work, I got around to refactoring the way ShapeBase objects mount on each other. Now instead of calling the mount function with a given mount-node ID as an argument, the nodes to mount the object from and to are properties of each object. So for example, when I'm mounting a gun to the player's hands, I do something like this:
In addition to this, my ambition was to make ShapeBase a sibling class of SimSet by giving them a common interface ancestor (I needed to make an abstract SimSetInterface anyway for my A* waypoint code). This would, ideally, allow you to use mounting easily and efficiently in the world editor, by dragging objects onto each other in the inspector tree. This proved a bit more difficult than I thought, though, so investigations are temporarily on hold until I have time for a wouldn't-it-be-nice feature.
Anyway. Hope you enjoyed the blog!
Advanced Player class
The advanced Player class is probably my longest-running Torque project, which you can read all about in previous blogs. It's been quite an adventure, but it's actually nearing a point where I might call it complete! It's been nearly feature-complete for a while, but I keep going through it and redesigning the way I want features to work. The prime culprit of this process has been the torso twisting/aiming system, which has been redesigned umpteen times. It's tricky to try to accommodate torso twisting, free-looking/free-aiming, recoil, and general weapon inaccuracy when you're applying these concepts to animations on something as complicated as a human body.The enhanced collision system was also a huge time-sink that I eventually abandoned, which was a valuable lesson and saved me no end of hassle. Once that was out of the way, I quickly hacked in mantling, which extends nicely to wall-climbing, and vaulting. About a month ago, I hacked in tic-tacs, and by extension wall-running, which I'll be tweaking in the future. I imagine that when it's finished it will have taken the most time to get 'feeling' right, because there are a lot of variables that affect the way you tic-tac, and beyond the mere physical factors, there is the player's intent to consider.
Of course, this sort of thing has been going on in games for quite some time - at least since Thief, which had an excellent mantling ability which let you mount ledges without needing to risk a noisy jump. Gears of War and its brood of cover-based TPSes allow your characters to vault over cover, and many more recent shooters, notably (for different reasons) Modern Warfare and ArmA II, have featured variations on the 'getting over waist-high walls' theme. But aside from that, navigation of game spaces has stayed disappointingly rigid.
Well, there was Mirror's Edge, but let's not talk about that, hmm?
So what have I gone and done? In short:
- Charge-up jumping I showed this last time, but I've actually put some work into animations this time! Though not much, as you can tell... It's a fairly simple feature, which makes the strength of a character's jump dependent on how long the jump trigger was held for.
- Mantling I'm really not sure where the term 'mantling' comes from, but I guess it's what traceurs refer to as a climb-up. There's a ledge in front of you, you grab it and haul yourself up. The means for doing this is much simpler than I had envisioned - simply a raycast downwards in front of the character's bounding box that, when it hits something, makes the character move upwards (approaching a constant velocity). I have grand plans to expand this mantling to fully-featured ledge-hanging, allowing characters to actually dangle off ledges, shimmy along them, raise and lower themselves, etc. Though actually experimenting with that has led me to put developments in this area on hold in favour of actually being able to finish a game at some point :P.
- Vaulting The vault is a fantastically satisfying move used when you really just can't be bothered going around. When I was first roughing out ideas for this freedom-of-movement stuff, I envisioned players jumping at a wall, then tapping jump again with precise timing to initiate a vault in midair. But after the first few times I actually tried vaults myself, I realised that the vault is a motion you have to plan before you actually jump. So with that in mind, I revised jumping to be more contextual. If you jump and you're within a second of hitting an obstacle, you'll vault instead, and the jump impulse is calculated to let the player just clear the obstruction. At the moment, the timing is pretty tricky to get right - too early or to late, and your natural arc means you'll smack into the obstacle with the bottom of your bounding box. I'm working on making the jump better fit the world geometry, so that vaulting close to an obstacle results in you slowing down to avoid hitting it. This retains the level of challenge the existing vault has in its timing, but tones down the punishment from total failure to just being slowed down.
- Tic-tacs A tic-tac is a cool little move that is basically a push-off in midair, which allows you to bounce off a wall to change direction or get greater height than you would if you just jumped quickly. Side-on tic-tacs give you the best balance of height and direction change, whereas forwards tic-tacs (wall-runs, when combined with a mantle to actually get up the wall) send you straight upwards and backwards tic-tacs (something I'm not sure is actually possible, but cool nevertheless) basically give you a small horizontal rebound.
How does all this integrate with shooter gameplay? It's almost enough to base a game on in its own right (cf. Mirror's Edge). The answer, I'm hoping, is something like 'organically' or 'seamlessly' or other phrases in marketing-ese. The idea is to just open up new ways of travelling around interesting maps, so that tactical cover-based gameplay becomes less stagnant. It also affords you more opportunities to approach situations creatively by climbing and navigating to locations where enemies wouldn't expect you to be. And really, it's just about player empowerment, which I'm a huge subscriber to. I hate it when I can't do something in a game that I can do in real life that would be useful - like climb over that fence or up that ledge.
So I guess after all the rambling, the end result is what's important. And here it is:
Please excuse the lack of animations. Animations are actually hugely important to making all this stuff look good and natural, and I haven't put as much effort into them as they deserve (nor am I talented enough to do them justice, in any case). Former incarnations of the test character have been animated, but I keep redoing the character's bone structure and needing to animate it all over again. This has largely been due to switching between blended and regular look animations. I'm sticking with exclusively non-blended look animations for the moment, since you can't transition between blended animations, and transitions are important for arm animations.
Also, thanks to Bryce for letting me use his Close Quarters map from the 3rd TAIK demo! (I was too lazy to create my own content ;)).
Bearing in mind what you've just seen, I'd love to ask people about a control scheme for these sorts of abilities. At the moment, the scheme is something like this:
- Movement is WASD as usual.
- Jumping is space by default. You actually jump (or vault) when the key is released, and depending on which movement key you've got held down you'll jump in a different direction. If no movement key is held down, you don't jump, and just go back to normal movement. Additionally, if you're looking steeply up or down when you jump, you'll have far less horizontal travel than if you're looking straight ahead.
- Mantling is also initiated with space - if you hit the button and you can mantle, you will, otherwise you will jump/vault. When you're in the mantling state, you sustain it by holding the forwards movement key (if you let it go, you fall).
- You hit a movement key in mid-air to tic-tac in the direction you indicate (so hitting 'left' kicks out to push off a wall that's to your left, and will send you flying to the right).
There are a lot of complicated things you can do, but I'm wondering if the control scheme will be too difficult to master and remember. I find it pretty simple to manage, but of course, I am the developer. I put it to you: how would you design a control scheme for these abilities?
Inventory and Mounting
I've also been playing with weapon handling recently, with the idea that I'll release a combat demo over summer (winter for you northern-hemisphere types) showcasing traversal, weapon-handling, and whatever else I can squeeze in (but no AI, unfortunately). In keeping with this ambition, I dove into some gameplay features like an inventory. In designing the inventory system, I tried to mix the detail of an RPG-like tetris inventory with something simple and accessible, taking Half-Life 2's drop-down inventory as my guide. This created an interesting sort of hybrid which isn't entirely finished, but I happen to quite like.The idea is that an inventory is organised into 'locations', each with its own size. So a typical soldier's inventory might be divided into locations for the backpack, belt, pockets, webbing and secret boot compartment. Each of these locations can store a certain total amount of volume, but can also have a size restriction per item. So for example, you might have a backpack with size 10 and restriction 5, and a belt with size 5 and restriction 1. If a gun is size 5 and a clip is size 1, then you'll be able to store 5 clips on your belt, but not the gun. Alternatively, you could fit all of them in your backpack!
Each location corresponds to one of the number keys, which is how you access items in your inventory - like in HL2, you hit the key to scroll through items in that location, and click to select the one that's highlighted.
Here's a quick inventory demo. You can barely see the inventory UI in the top-left, which is a shame, but I did want to avoid a huge, obtrusive inventory UI. It needs a bit of work. The video also features some weapon-handling stuff like recoil and different poses. And leaning! Also note Thief-style object highlighting :P.
(In the video I forget that you can't hear the in-game sound, hence my reference to freesound.org!)
While I was in the process of making the inventory work, I got around to refactoring the way ShapeBase objects mount on each other. Now instead of calling the mount function with a given mount-node ID as an argument, the nodes to mount the object from and to are properties of each object. So for example, when I'm mounting a gun to the player's hands, I do something like this:
%item.mountToNode = 'rightHand'; %item.mountFromNode = 'mountPoint'; %player.mountObject(%item);At any time, I can edit the item's mountFromNode or mountToNode variables to change the way the item is mounted.
In addition to this, my ambition was to make ShapeBase a sibling class of SimSet by giving them a common interface ancestor (I needed to make an abstract SimSetInterface anyway for my A* waypoint code). This would, ideally, allow you to use mounting easily and efficiently in the world editor, by dragging objects onto each other in the inspector tree. This proved a bit more difficult than I thought, though, so investigations are temporarily on hold until I have time for a wouldn't-it-be-nice feature.
Anyway. Hope you enjoyed the blog!
About the author
Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!
#2
11/20/2010 (10:52 am)
This is absoloutly awesome. Lots of movement stuff I find really interesting, and would love to see in our project (blog coming this tuesday). As a old Rune player I really dig mantling, and your vault/tic tac adds some really new and interesting angle to this.
#3
11/20/2010 (10:54 am)
Regarding the complexity, again as a former top notch Rune player I can assure you that the hard core user base 'LOVE' complexity that adds to the way they can interact. The fact that the majority of noobs cant figure it, should not make you derail from the pure awesomeness you have there. Our own melee system is (can be) equally complex, but we are sticking to it for sure. So, keep it, its good.
#4
I like the 'you cant pickup, because you hold something', we are taking sort of the same approach.
Really nice to get a peak at this :)
11/20/2010 (10:55 am)
btw, I really digged that leaning animation, made me think about defend. And the upper body twisting also adds to giving a really good feeling.I like the 'you cant pickup, because you hold something', we are taking sort of the same approach.
Really nice to get a peak at this :)
#5
11/20/2010 (12:28 pm)
crazy guys in the first video, i really like to watch:)
#6
I remember about a year ago I installed your mantling resource and had a lot of fun running about the rooftops in that mission, letting the AI fire at me and pursue me on the ground :)
11/20/2010 (2:29 pm)
Looks solid! Nice work!I remember about a year ago I installed your mantling resource and had a lot of fun running about the rooftops in that mission, letting the AI fire at me and pursue me on the ground :)
#7
11/20/2010 (3:48 pm)
Really nice, love where you're going with your movement improvements. The control scheme as you describe it sounds about near perfect for how I'm imagining running around using it - did you say something about a demo ;D
#8
11/20/2010 (5:04 pm)
Really cool stuff, Daniel! I love the movement improvements. Even without animations, it's clear you've done a great job. I also like the torso twisting a lot. I wish I could take a peek at that code. :) Do you have plans to monetize this? You should! :) Here's one eager customer.
#9
Also a tip: the interiors I made for Bryce (the ones with bad LOD) are supposed to be used in the scale of 0.8 or 0.7.
11/20/2010 (5:46 pm)
Awesome, I can imagine how cool some random free-for-all DM could be in an open ended but cramped map like that with your movement stuff would be!Also a tip: the interiors I made for Bryce (the ones with bad LOD) are supposed to be used in the scale of 0.8 or 0.7.
#10
Thanks for all the feedback, though :D.
11/20/2010 (8:38 pm)
Bahaha, I just realised I managed to mess up the audio track in the traversal demo... sorry, guys! It's not off by much, so I hope it still made sense. And after all the work I put into aligning it in the editor... not sure what happened there. Ah well.Thanks for all the feedback, though :D.
#11
11/20/2010 (8:40 pm)
Quote:had a lot of fun running about the rooftops in that mission, letting the AI fire at me and pursue me on the groundI remember doing that in your TAIK demo as well - it just goes to show how much traversal is in level design. As long as you can move and jump, there are opportunities for awesome rooftop hunts and chases, it's just the level design that encourages or curtails this.
#12
11/20/2010 (8:41 pm)
Quote:did you say something about a demo ;DYup, hopefully sometime before the end of summer!
Quote:Do you have plans to monetize this? You should! :)It's very tempting ;). But I do have a policy that any stuff I make for my own game, I give away as a resource. Stuff I make that's not for my own personal project I might sell... though I haven't made any of that yet :P. Expect a resource... in the far-distant future!
#13
Totally agree! I find me saying to myself all the time, while playing games, "Wha...?! A normal person could do that! Why can't this guy?!" Drives me crazy sometimes...
11/22/2010 (4:34 pm)
Quote: "I hate it when I can’t do something in a game that I can do in real life that would be useful – like climb over that fence or up that ledge."Totally agree! I find me saying to myself all the time, while playing games, "Wha...?! A normal person could do that! Why can't this guy?!" Drives me crazy sometimes...
#14
So yeah, I'm excited to see where you get to with this stuff, and I can't wait to get my hands on it! Keep it up!
11/22/2010 (4:36 pm)
...I think this is an area where game development hasn't really progressed much. For a while now, we've been able to jump and crouch, or maybe go prone, but haven't been able to do much else. (Aside from a couple games, like Mirror's Edge, which is a fantastic game BTW.)So yeah, I'm excited to see where you get to with this stuff, and I can't wait to get my hands on it! Keep it up!
#15
this mantle/tic tac is in the right direction :P
11/22/2010 (5:53 pm)
Something of the best movement stuff I've seen since Rune, is the S.M.A.R.T system in http://brinkthegame.com/this mantle/tic tac is in the right direction :P

Torque Owner Bill Vee
DayOfWar Studios
Can't wait to see more.