Topic: character coding questions .

So currently i want to have  ledge climbing and ledge detection as shown in the recent games of assassins creed , i am not planning to imitate it but i would like to make something similar .

So having a huge box around the character for collision detection  doesn't really seem the way for it  , i just heard of having boxes around  bones of the character for collision detection .

i have no experience with it just wanted to hit  it here if anybody has any clue of it and can shed some light  .

any other way you know i could do something Similar to  assassins creed ?

p.s i can wrap my head around other stuff of game programming like AI , particles , gui etc i just can't seem to make good main character players for games (which is of course a HUGE part of the game ) . i can do the normal scripting of 3rd person character with boxes for collision detection  and animation changing etc but i want to reach the next level in character programming something smooth and advanced  are there any good books on it .

Sorry if it seems a big question or something i am just a little lost with main character programming
Thank you for reading

Re: character coding questions .

Just searching on Google gives interesting links:
http://gamedev.stackexchange.com/questi … ect-ledges

The more you want to go "dynamic" the more it will be difficult. You should just aim to the first Tomb Raider games type of climbing lol. If you really want to go dynamic, see this page http://wiki.maratis3d.org/index.php?tit … ting_bones
to see how you can access bones information. Then create some physics objects and attach them to the bones (e.g. the hands bones). Checking collision between this physics objects and the environment can give you clues of what the character can and can't do. Be sure to keep it simple though because you would have limited controls in a game anyway: you press UP key, and the player climbs up, so there's no need to check if a hand could grab something here or there. Just check if there is space over the player with the technique in the first link and you should be fine.

Last edited by 255 (2013-10-31 20:48:10)

Re: character coding questions .

If you can script AI and 3rd person blended animations (smooth ones) then you can surely do something like creed.

In a 2d game they do something similar to what 255 said. They check to see if there is a space above the character, and if it is, that is when you do the climb animation.

It will be something like:

if HeadIsClear() then
...

If the space above the character is free, then it will do the jump animation. In 2d games they are usually checking pixels. But it seems you would use vectors for 3d.

You also have to think about scale. I have a post on the conversion factors from google sketchup (which was used to model they buildings for Drakes Uncharted), Blender, and Maratis. Scale changes from Blender to Maratis, and that would matter if you are doing advanced climbing and things. You probably want to make some standard primitives to test your climbing and scale, and then fill them in later with actual objects.

If I learn anything new, I will post it here.

Edit: Found a video:
http://www.youtube.com/watch?v=GFu44oeLYPI

Last edited by Tutorial Doctor (2013-11-01 03:00:26)

Re: character coding questions .

Thank you guys for replying
I have seen the overgrowth video was Considering to use it .
thanks zester for the bones link .

TD i didn't really consider environment scale ill make sure that stays the same thanks .

Previously in Unity i had done something like tomb raider perhaps even a little more advanced than that but it wasn't what i was looking for (involved a lot of triggers and stuff).

I would like to achieve a dynamic system.

Anyway ill keep researching on it and give the bones collision detection  and the overgrowth technique a shot . ill keep you guys updated if i get a dynamic system done.

Re: character coding questions .

One easy way to solve the problem is to use ghost colliders (invisible planes/boxes with ghost physics).

You put a collider just in front of your obstacle (on the floor, on a wall...) and when the player hits it (collision detection) this triggers a specific action/animation.

So for example for a wall climb, you put a collider on the floor that triggers a climb (automatic or if combined with a key press) and one on top of the wall that triggers a transitional animation.

Re: character coding questions .

And if you need a very accurate collision detection (for example to check when a fist hits something), you can use the getCurrentFrame() function in addition to the overall collision detection:

if isCollisionBetween(player, object) and getCurrentFrame(player)==124 then ...

This allows to fake body-parts collision detection in lua.

Re: character coding questions .

And for dynamic/procedural/non linear animations, you need to implement a library of this kind.

Re: character coding questions .

is the confuse a library ?. i cant  even seem to use it properly i cant even zoom / pan  (normal 3d packages functions) in it .

i made a fake ledge climbing system in unity 3d before it wasn't Something i wanted to make so i scrapped it after  i implemented ledge climbing .

Edit :- got it how to move around and even see the source code  .

Last edited by Crucio777 (2013-11-01 10:35:51)

Re: character coding questions .

Instead of detecting the ledges, you can also create a simplified invisible physics cage (built onto the object to climb) to restrict the movements in all directions and to match the topography and available ledges. In this way it requires no triggers. And for angles, the friction should make the player rotate by itself.

Last edited by com3D (2013-11-01 11:19:31)

Re: character coding questions .

com3D wrote:

And if you need a very accurate collision detection (for example to check when a fist hits something), you can use the getCurrentFrame() function in addition to the overall collision detection:

if isCollisionBetween(player, object) and getCurrentFrame(player)==124 then ...

This allows to fake body-parts collision detection in lua.

That is a VERY good idea.