#### Archived

This topic is now archived and is closed to further replies.

# Lines of death

This topic is 5648 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I was just playing a bit of football with a friend and thought of this. As the ball flies through the air, the path it takes can usually be visualised as a simple parabola - or at least, it can be broken down into parts, each of which can be described mathematically. I actually pictured the curve in 3D space, superimposed on what I was seeing. Now, what if that trajectory were a real, physical object? Say a laser beam - by standing in the path of the ball, I''d get my ass fried. Turn the ball into a rocket from an RPG and you can maybe see where I''m going with this... Collision detection, characters against the *trajectories* of objects, rather than just the objects themselves. How cool would it be if you saw an AI dive for the floor just as you fire an RPG at him... Superpig - saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

##### Share on other sites
Very cool. Also running and screaming out of the path of your vehicle. Or how about you toss a grenade, then the AI opponent picks it up, pulls the pin, then tosses it back?

-solo (my site)

##### Share on other sites
Or grabs the grenade and may or may not successfully throw it back, as you see him in a panic fumbling with it.

"Ahh ahh..."

Boom.

##### Share on other sites
quote:
Original post by 5010
Very cool. Also running and screaming out of the path of your vehicle. Or how about you toss a grenade, then the AI opponent picks it up, pulls the pin, then tosses it back?

Or, rather than picking it up (because when it''s on the ground it''s got no trajectory) diving to do a soccer-style ''save,'' catching it, and throwing it back that way...

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

##### Share on other sites
You''re gonna love my game.

##### Share on other sites
This is just an example of prediction, since you need to be able to model the trajectory of the object to create the ''path object'' which you are avoiding. Prediction is costly... and what about uncertainty. It''d get quite boring if the NPC always dodged your bullets or your RPG fire. Adding uncertainty costs even more... and makes inference more costly as well.

Timkin

##### Share on other sites
quote:
Original post by Anonymous Poster
This is just an example of prediction, since you need to be able to model the trajectory of the object to create the ''path object'' which you are avoiding. Prediction is costly... and what about uncertainty. It''d get quite boring if the NPC always dodged your bullets or your RPG fire. Adding uncertainty costs even more... and makes inference more costly as well.

Is it really that costly? Say that when you fire your gun, the first thing it creates isn''t a bullet - it''s a ''path object'' which represents the path the bullet will take. That path won''t change, unless something collides with it, so as soon as you''ve fired once (and let''s face it, most games seem to use straight lines as bullet trajectories) the path is build and won''t change until something collides with it.

Dodging bullets all the time would be boring, yes - not to mention that people can''t usually dodge bullets in real life. Adding a simple ''reaction time'' to the AI agent could fix it - or possibly, giving the path an ''influence'' value which falls off as it gets further away from the projectile. Because enemies should not necessarily be able to predict a rocket that is still 100m away, the influence value is less where it hits them and so they are less likely to respond in a controlled way. They might not react at all, or they might make a more generalised movement (clear the area).

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

##### Share on other sites
quote:
Original post by superpig
quote:
Original post by 5010
Very cool. Also running and screaming out of the path of your vehicle. Or how about you toss a grenade, then the AI opponent picks it up, pulls the pin, then tosses it back?

Or, rather than picking it up (because when it''s on the ground it''s got no trajectory) diving to do a soccer-style ''save,'' catching it, and throwing it back that way...

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Don''t the enemies do this in the Medal of Honor games?

##### Share on other sites
quote:
Original post by Sakuranbo
Don''t the enemies do this in the Medal of Honor games?

Don''t know, haven''t played them. (Probably should).

##### Share on other sites
The enemies in Halo will dive to avoid oncoming vehicles and run from thrown grenades.

1. 1
2. 2
3. 3
Rutin
14
4. 4
5. 5

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633674
• Total Posts
3013276
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!