Sign in to follow this  
Followers 0

little detail of the doom 3 presentation

I dont know if any 1 else saw this, but the demon at the end jumped over a fence. He had his hands on it and pushed himself over it. I think this detail proofs how advanced the scripting system will be.

Share this post


Link to post

I don't think there is anyone here who DIDN'T see this!

I am serious! That was very hard to miss :)

Share this post


Link to post

If my dream comes true (no, not that one), that's not for a scripted sequence, but a real behavior...

Share this post


Link to post

Zaldron - If I am not wrong the enemy behavior in RTCW is scripted right?

Share this post


Link to post

If my dream comes true (no, not that one), that's not for a scripted sequence, but a real behavior...


Although I have no knowledge of these things, I can Imagine that the logic behind such a move could be:

If obstacle =< then 1 meter, then jump fence the cool way.

Is this scripted or real behavior??

Computers stay machines I guess

Share this post


Link to post

No offense Zoost, but you make it sound easy as hell.
I think it's a little more dificult. Anyway, I hope it's just normal enemy behaviour too.

Share this post


Link to post

Scripted would be like this:

When player moves into trigger #4124; Make monster jump over fence. (not very dynamic)

Not scripted, like in zald's dream, would be like this:

Monster encounters an obstacle, decides to jump over it.

:)

Share this post


Link to post

The problem would be finding a reason WHY the creature should leap to the other side, checking if there's actually a possible volume both in destination and origin. Destination volume should score less points in the path-finding system than the point pre-leaping. Sync for the animation is hard, specially when the obstacle may be height-variable, and the shape of it can ever be an issue while choosing WHERE the hand should go.

IT'S GODDAMN HARD AS HELL

Share this post


Link to post

I want to see how the AI and the scripting work in RTCW.

Share this post


Link to post

IT'S GODDAMN HARD AS HELL


I will not dispute that; but i guess they will not do it the way you describe. OK. another approach.

Within the Chase procedure:

if run into obstacle Then
If obstacle.climable = True then
if obstacle.climable.type = Low jump Then
Animate cooljump (Low)
Handpositioning = obstacle.handplace (coordinates)

EASY!!!

And that while i have never programmed outside VBA
OK iD, I'm available for a consult ;-).Can I play DooM III Then ?

Share this post


Link to post

imp.mode := passive
lurking := true
while (lurking)
{
imp.pos:=(lurk behind crates)
if (player spotted imp)
{
lurking := false
imp.mode := agressive
}
}
...

Share this post


Link to post

bool fence_jump = false;
bool fence_on_x = false;
bool fence_on_z = false;
float fence_rotation_z;
register int select_jump_sound;
float x_counter = 0.0f;
float y_counter = 0.0f;
float z_counter = 0.0f;
float demon_health;
float demon_height;
float jump_height;
float fence_distance;
float fence_x_or_z_check;
float fence_distance_x;
float fence_distance_y;
float fence_distance_z;
float demon_position_x;
float demon_position_y;
float demon_position_z;
float fence_position_x;
float fence_position_y;
float fence_position_z;
float fence_jump_decision;

fence_jump_decision = rand()%10;
if (fence_jump_decision < 2)
{
FenceJump();
}

glVoid FenceJump()
{
// check how the fence is placed;
if (fence_rotation_z > 70 && < 110)
{
fence_on_x = true;
}
if (fence_rotation_z > 160 && < 200)
{
fence_on_z = true;
}
if (fence_rotation_z > 250 && < 290)
{
fence_on_x = true;
}
if (fence_rotation_z > 340 && < 20)
{
fence_on_z = true;
}
// coordinates + rotation of the fence
glTranslatef(fence_position_x,fence_position_y,fence_position_z);
glRotatef(fence_rotation_z,0.0f,0.0f,1.0f);

// render the fence.... (load the model)
// ( not going to code the whole load model code:p )

// calculate distance
if (fence_position_x > demon_position_x)
{
fence_distance_x = fence_position_x - demon_position_x;
}
if (fence_position_x < demon_position_x)
{
fence_distance_x = demon_position_x - fence_position_x;
}
if (fence_position_y > demon_position_y)
{
fence_distance_y = fence_position_y - demon_position_y;
}
if (fence_position_y < demon_position_y)
{
fence_distance_y = demon_position_y - fence_position_y;
}
if (fence_position_z > demon_position_z)
{
fence_distance_z = fence_position_z - demon_position_z;
}
if (fence_position_z < demon_position_z)
{
fence_distance_z = demon_position_z - fence_position_z;
}

// walk to the fence

if (demon_position_x < fence_position_x && x_counter < fence_distance_x)
{
demon_position_x += 0.5f;

x_counter ++;
}
if (demon_position_x > fence_position_x && x_counter < fence_distance_x)
{
demon_position_x -= 0.5f;

x_counter ++;
}

if (demon_position_y < fence_position_y && y_counter < fence_distance_y)
{
demon_position_y += 0.5f;

y_counter ++;
}
if (demon_position_y > fence_position_y && y_counter < fence_distance_y)
{
demon_position_y -= 0.5f;

y_counter ++;
}


if (demon_position_z < fence_position_z && z_counter < fence_distance_z)
{
demon_position_z += 0.5f;

z_counter ++;
}
if (demon_position_z > fence_position_z && z_counter < fence_distance_z)
{
demon_position_z -= 0.5f;

z_counter ++;
}
// jump if fence distance < 1

if (fence_distance_x < 1.0f && fence_distance_y < 1.0f && fence_distance_z < 1.0f)
{

//calculate jump height

jump_height = demon_height + fence_position_y + (demon_health / 100);


// jump over the fence
if (demon_position_y < jump_height)
{
demon_position_y += 0.5f;
// select demon jump sound;
select_jump_sound = rand()%4;
if (select_jump_sound == 1)
{ PlaySound("Sounds/demons/DemJump1.wav", NULL,SND_ASYNC);
}
if (select_jump_sound == 2)
{PlaySound("Sounds/demons/DemJump2.wav", NULL,SND_ASYNC);
}
if (select_jump_sound == 3)
{PlaySound("Sounds/demons/DemJump3.wav", NULL,SND_ASYNC);
}

if (fence_on_x == true;)
{
// dont jump on fence but over it

if (demon_position_x < (fence_position_x += 1.0f))
demon_position_x += 0.5f;
if (fence_distance_x > 1.0f)
Fence_Jump = false;
if (demon_position_x > (fence_position_x -= 1.0f))
demon_position_x -= 0.5f;
if (fence_distance_x > 1.0f)
Fence_Jump = false;
}
if (fence_on_z == true;)
{

if (demon_position_z < (fence_position_z += 1.0f))
demon_position_z += 0.5f;
if (fence_distance_z > 1.0f)
Fence_Jump = false;
if (demon_position_z > (fence_position_z -= 1.0f))
demon_position_z -= 0.5f;
if (fence_distance_z > 1.0f)
Fence_Jump = false;
}
}




}




Share this post


Link to post

VERY GOOD, AIR !


/ME IS IMPRESSED

Share this post


Link to post

It doesnt take that much time;), only if someone keeps chatting to you while you're typing it... hehe

Share this post


Link to post

My god, DoomBoy, can't you be even more stupid? Why did you quoted all that stuff?

Nice code, Air, but now you need to add the part that makes the creature think it is better being in the other side of the "fence".

Share this post


Link to post

If you're on the other side of the fence, it would make sence if the demon tries to be on the other side of the fence as well;). But wouldnt be the other side anymore though hehe.

Share this post


Link to post
This topic is now closed to further replies.
Sign in to follow this  
Followers 0