Archived

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

MrX02

Tracking

Recommended Posts

I am making a 2D space game where the player''s ship and the enemies'' ships have 16 directions they can be turned to. Also, each ship type has a different speed that they can rotate at. When I did the tracking code for the enemies, I had them find the angle they were relative to the player and start to rotate to that angle (as close as possible), then to go forward towards the player. This tracking seems very loose. How can I make those ships follow the player more closely? Thanks in advance, and please excuse my AI programming ignorance. Get the program at http:\\www.geocities.com\mrx02\ to see exactly what I''m trying to explain.

Share this post


Link to post
Share on other sites
Implement a Steering Behaviour , where the point being aimed at is the moving target. Check out the Articles & Resources section of GameDev... the link is above.

Cheers,

Timkin

Share this post


Link to post
Share on other sites
Hmm... well I would be compelled to help you, except for the one little fact that you basically ripped-off Andre LaMothe''s game demo from his book and gave him not one single ounce of credit.

Maybe you should email him for help, since it''s basically his game anyways.

What''s so hard about putting a little thank-you note on your site?

_________________________________________________________________

Drew Sikora
A.K.A. Gaiiden

ICQ #: 70449988
AOLIM: DarkPylat

Blade Edge Software
Staff Member, GDNet
Public Relations, Game Institute

3-time Contributing author, Game Design Methods , Charles River Media (coming April/May 2002)
Online column - Design Corner at Pixelate

NJ IGDA Chapter - NJ developers unite!! [Chapter Home | Chapter Forum]

Share this post


Link to post
Share on other sites
quote:
Original post by Gaiiden
Hmm... well I would be compelled to help you, except for the one little fact that you basically ripped-off Andre LaMothe''s game demo from his book and gave him not one single ounce of credit.


That''s not quite true. I took a few bitmaps of Andre''s art from his "Tricks of the Windows Game Programming Gurus" book, but the game itself plays very differently and was written completely from scratch. And unless I mistakenly took it out, I am almost sure that I thanked him in one of the readme files.

The core of the matter is the tracking question I asked about, and I thank everyone for helping me. I will look at the Steering Behavior article.

Share this post


Link to post
Share on other sites