View unanswered posts | View active topics It is currently Fri May 06, 2016 1:00 pm



Reply to topic  [ 2 posts ] 
 Waypoint Question 
Author Message
Site Admin

Joined: Tue Aug 06, 2002 7:01 am
Posts: 24
Location: Thunder Bay, ON, CA
Post Waypoint Question
I have a map that I have defined in an array like so:

{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 },
{ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

And I need a computer bot to a corner of the track. I know the absolute X and Y coords of it on the map, but I have no idea how to program with absolute coords or if thats even the best way to go.

Basically I need him to go from point A to B and point B is on the other corner of the map, way offscreen, etc. I generate the maps from tiles and have not created a map editor yet to hold information on the files (such as waypoints), but I need to know if there is another way. Can I just tell him to head to say.. (1000, 200) on an 800 x 600 screen or must I do something else? Thanks in advance for your help.

-Terry [img]images/smiles/icon_smile.gif[/img]

[ July 31, 2003: Message edited by: Hackin' ]</p>


Thu Jul 31, 2003 11:16 pm
Profile WWW

Joined: Mon Sep 02, 2002 7:01 am
Posts: 10
Location: Stockport, Manchester, UK
Post Waypoint Question
Is this 2D or 3D? Either way, the world coordinate system is completely separate from the viewport (or screen) coordinates.

You move your AI cars in you world coords and then extrapolate that to your screen depending on: where the camera is, where it's pointing, perspective adjustments etc.


Wed Aug 27, 2003 8:27 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.