Rainbow Six Vegas/Gears of War cover system

Blitz3D Forums/Blitz3D Programming/Rainbow Six Vegas/Gears of War cover system

SilverCoin(Posted 2010) [#1]
Hey guys! I'm thinking about putting a RSV or Gear of War -style cover system in our prototype (a 3rd person game). Does anyone have any idea how to do this in blitz? I have two ideas:

1. Place marker cubes in the level. Each cube will have the data about the proper facing for that cover. If the player's avatar is inside a cube, the game will "read" that cover's facing and stick the player to that cover. Thing is, I'd have to place hundreds of markers in every possible cover spot in a level.

2. Make a sensor that checks around the player's avatar. If it detects a mesh near him, it makes further checks in that direction, on 4 corners: upper left, upper right, lower left, lower right. If the system detects the lower sensors to have matching facing (the normals, right?), that's supposed to be a flat surface of a low cover and ducks to that direction. If all four sensors match, that's a flat surface of a high cover and sticks to that direction. I think this is better, but I don't have any idea (yet) how to code this and I think this is gonna be buggy.

Any thoughts? Any two cents are welcome and thanks in advance!


Jiffy(Posted 2010) [#2]
Um. 'Don't?'

http://blitzbasic.com/Community/posts.php?topic=89173#1016395

If you have to, but I really hated it- it felt awkward, was often accidental, and seemed stupid/unneccessary compared to just plain crouching/wall press. Out of the 6 or 7 people I know that played gears- 1 guy liked it. Feels like falling in a hole to me.

That's my 2 cents.


SilverCoin(Posted 2010) [#3]
Thanks for the link, Jiffy. Will study that navmesh thing there.

Actually, I was aiming more for a wall press rather than a shooter game's cover. I just needed something to detect the direction/facing of the nearest wall from the player, and that the system would automatically know that it has to crouch first before wall sticking, rather than have it as a separate button press. Anyhow, the navmesh link there did gave me some ideas for it so thanks again.


Jiffy(Posted 2010) [#4]
Np. Glad I could help.


GW(Posted 2010) [#5]
I guess you could have the equivalent of curb-feelers attached to your player model at certain locations, and when you detect collisions on these in the 'right way', the cover system can take effect.


Gabriel(Posted 2010) [#6]
Yeah, I would do what GW suggests. A simple collision sphere around your player, that you're probably already using to stop him walking through walls. When a collision with level geometry takes place, check the collision normal. If the collision normal is basically opposite the direction the player is moving (because you don't want to go into cover when grazing a wall) go into cover mode. You can check if the directions are basically opposite using the dot product of the two directions.