ADM - Automatic defense mechanism

Introduce your project and write about your work.

Moderator: PPS-Leaders

Post Reply
retolu
Noxonian Grollknom
Posts: 5
Joined: Thu Mar 29, 2007 1:59 pm
Location: Zurich

ADM - Automatic defense mechanism

Post by retolu » Thu Apr 19, 2007 12:18 pm

I just started with the Ticket 210, which is basically the implementation of the turret done by Sebastian.

The turret is supposed to shoot at the player, who is walking through the moonstation.

As I'm at the very beginning, I'm open for ideas, suggestions tips. Feel free to answer.

see ADM (Project Page)
Last edited by retolu on Fri Apr 20, 2007 5:22 pm, edited 1 time in total.

User avatar
patrick
Baron Vladimir Harkonnen
Posts: 350
Joined: Mon Oct 02, 2006 6:03 pm
Location: Bern

Post by patrick » Fri Apr 20, 2007 3:04 pm

Hi

Sounds like a topic, which is fun to implement. The topic can be split into three major problems, I think - here my suggestions:

Aiming Algorithm
* it would theoretically be possible to always hit the player if the turret shoots, but this wouldn't be fun would it? So create an aiming algorithm, that hits the player with a certain probability. The probability should be dependant on the distance: P(Hit) ~ 1/distance
* The turret needs some inertia which prevents it from just targeting the player in no-time -> finite turning speed
* the targets a turret tries to hit should be specifyable in the xml file (group name or something).
* Advanced: check for walls in the way to the player: check for collisions on a ray between the turret and the player (bsp collision detection). Otherwise the turret can shoot through walls...


Graphics
* The player should see the projectiles approaching him/her. If they are very fast just draw some lines. The turret should draw the attention of the player as soon as it shoots.
* A muzzle flash would be nice. Make this a billbord that is displayed for some milliseconds.

Sound
* You need to create shooting sounds
* Also some activation sound (if the turret is turning and aiming towards the player a targeting beep is emitted or something like that)


Each of this features needs some implementation time. Be sure to priorize your tasks and to make a development plan. You will see how much of the topics will be feasible...

Ahh.. and yes... be sure to ask the pps instructors about quaternions before starting to write any code! :D

retolu
Noxonian Grollknom
Posts: 5
Joined: Thu Mar 29, 2007 1:59 pm
Location: Zurich

Visibility

Post by retolu » Fri Jun 01, 2007 9:14 am

I'm planning to implement a boolean isVisible, which should function by sending a ray towards the target, and return true, if the first object hit is the target, false otherwise.

This is in my eyes absolutely necessary, otherwise the turret will shoot at a player, that is not even in the same room or on the same floor (through walls).

My problem is now, that I basically have no idea, how to make this work. I would be glad for any tips or help...

-----------------------------

Some code now under /branches/adm/src/world_entities/npcs -> adm_turret. As you will see, it's still a long way. Any replies to the code are welcome, too...

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests