Wall Running

Blitz3D Forums/Blitz3D Programming/Wall Running

GIB3D(Posted 2010) [#1]
Does anyone have any experience in coding Wall Running in a 3D game? Here is an example if you do not know what "Wall Running" I'm talking about...
http://www.youtube.com/watch?v=97BaqWsRAok


Jiffy(Posted 2010) [#2]
I doubt anyone is doing this. It's a pretty tough thing to code- especially in blitz. It can be done- but you'd pretty much need to make your own level editor.

Basically, just like you'd code a special 'wall' (invisible) to note climbable ladders/vines/whatever, you'd do the same for 'wall runnable' surfaces. Difference is you'd need to check other stuff too like speed, and impact angle (surface normal). It is not hard, but not trivial coding.

You'd also need custom animations to 'sell' it. That's probably the toughest part- other than that- and extensive level design- piece of cake... :P


GIB3D(Posted 2010) [#3]
I just started this thread to see if anyone could give ideas about how to do it so if I ever wanted to use it then I'd have some ideas on hand. One of the ideas I had would be to LinePick a wall if you're close enough. Then it checks the distance and angle from you to the wall. Probably use AlignToVector to keep the player looking like he is attached to the wall.


Jiffy(Posted 2010) [#4]
Well, first- linepick is slow- there are DLLs you should consider if you're serious on that route. Second, you'll have to know what geometry you've picked- unless your game has no objects or other players. Then of course is that wall 'run-able'? Slick glass/metal, swinging door, office partition- it all looks 'the same' to a linepick. Third- BSP's don't have accessible geometry info, so you're probably not using those for your maps without more work.

Those are the major issues. After that it's just math, velocity and so forth.


GIB3D(Posted 2010) [#5]
I haven't done any work/testing with Wall Running code and I don't plan to until I actually start making a game that requires it. This is all purely ideas/experience that I'm looking for. The more, the better.

I've never used BSP's but what I have made my own map editors. One object can be programmed differently from another object that is loaded. I usually base what the object does by checking the file name. With the game I'm working on, I use the number 1 before the model name to say that it is a player spawn model.

1 = Player Spawn
2 = Non-Breakable Object
3 = Breakable Object
4 = Player Animation

So figuring out if an object can be used in Wall Running wouldn't be the hard part. All I would have to do with a LinePick is use PickedEntity() to see what it just picked. A physics dll (PhysX, JV-ODE) could be used for all the collisions. When I do actually try to make this, I would probably start with a single wall to test against.


Jiffy(Posted 2010) [#6]
Stumbled on this today. Now you know what you're looking for.

http://developer.valvesoftware.com/wiki/Navigation_Meshes

Particular attention @ 2.1.1, 2.6.1


Ross C(Posted 2010) [#7]
Linepick isn't that slow if you keep your geometry simple. As you say, have a proxy mesh, invisible over the wall mesh. What i would do is create a start area, for the jump. You can check the distance from this start point and start the wall jump, if the jump button is pressed, and your angles are right. As Jiffy says though, there's a good deal of setting up to be done here, such as a level editor to place such walls and markers.


Naughty Alien(Posted 2010) [#8]
im doing this in my game..as well as for climbing etc...im controlling specific wall motion based on many invisible physics 'bounding' boxes, and each has different set of behaviour related to animation, controls and character controller body..

EDIT:
im not using B3D, but it should work with it just fine..all you really need is just those physics boxes(sensors) and few orientation pivot points generated during loading time(for curved walls), or just one for flat walls..


_PJ_(Posted 2010) [#9]
In theory, Wall-Running should arise naturally from the physics of a game engine. There's nothing particularly 'special' about it in a standard mechanical model.

What I think is perhaps of most importance is the capacity for the engine design to allow for the 'player object' to orient themselves perpendicular, rather than assuming a default 'upright', in short:

Wall Running along a horizontal wall, allow for the Roll angles as well as 'standard Yaw'.

Wall Running up a vertical wall, allow for the Pitch angles as well as 'standard' Yaw.

Movement should remain the same for all other intents and purposes, though locally translated to their elevated angle.


GIB3D(Posted 2010) [#10]
@Jiffy
That was a good link :) So then for wall running all you need is to place boxes along the runnable-walls and if you're touching them and doing all the other requirements (speed, angle, etc.) then you wall run along the box. But the thing is, I don't believe Prince of Persia does it that way because you are able to wall run on just about everything unless they took the time to place each and every possible place to do it at.


Jiffy(Posted 2010) [#11]
That's the point.
I'd bet they took the time to place each and every possible place to do it at.

That's level design for ya.


Naughty Alien(Posted 2010) [#12]

I don't believe Prince of Persia does it that way because you are able to wall run on just about everything unless they took the time to place each and every possible place to do it at.



You will be surprised to see Tomb Raider underworld levels 'behind scene' .. loads and loads small physics boxes(sensors) for pretty much anything Lara can do over there...


Nate the Great(Posted 2010) [#13]
well it seems you have your problem solved, on another topic, I wonder how many people have almost gotten to the end of that prince of persia level and fallen on the last thing, I know I would, I suck at wall running no matter what the game is ;)


GIB3D(Posted 2010) [#14]
@Nate the Great
I've beaten all the Prince of Persia games so far (the 3D ones for PC, not the older ones). I love them all :)


_PJ_(Posted 2010) [#15]
As for TR underworld --- I had to cheat in the end, there's a bit where you have to wall-run over some water in a small-ish cavern - No matter how many times I tried, I just couldn't do it :( I even followed a GameFAQ guide to the letter and t didn't help, just showed how rubbish I was a t the game. (Is this a fault with me or the devs???) In the end I got a Trainer to 'super-jump' over the offending puzzle. Problem solved :D

I personally suggest that Wall-Running should not be an essential feature, but simply as an aide to movement. ;)


GIB3D(Posted 2010) [#16]
I've never played Tomb Raider Underworld but I have played Gunz too. If you've never played it, it's a free online third person shooting game. You can do wall-running in it too. http://gunz.ijji.com/