Alice Community

Alice Community (
-   How do I...? (
-   -   How do I show the locations of moving objects on a map? (

bluecomp5 01-01-2010 04:46 PM

How do I show the locations of moving objects on a map?
I'm making this fighter jet game, and I'm trying to show the locations of enemy ships on a map I made. Does anyone have any clue how I should do this? Thanks in advance.

x2495iiii 01-04-2010 07:51 PM

Tough one. You'd need some way of telling where each object was you wanted to put on the map, then have an object on the map, a circle for instance, position itself according to the position of the original object on the map.

Let me see if I can put together a quick example.

jediaction 01-05-2010 08:01 AM

Where, there is no option of where to make a map but there is a manuel way to do it. You just need to be very accurate. Check out my Modern Warfare game for an example

x2495iiii 01-05-2010 08:52 AM

That's how almost everything is in games, you have to write it yourself.

So far I've got a map which tracks the enemy (a chicken) and its simple movements and a player's simple movements. I still need a way to track the chicken in real-time, though, and I'm trying to think of a simple, processor-friendly way to do that.

cardsfan527 01-05-2010 04:47 PM

I think the easiest way to do this is to find out the length and width of your map and the ground. Then place an object at the front and right of the ground. Have a continuous loop to find the jet's distance to the left of the one object and distance behind the other as seen by an object you place in the air (to get rid of POV problems). Then multiply the distance by the ratio you found between the ground and the map. then have a continuous loop that will move the dot on the map the scaled distances left and backward(or down based on the POV) from the edges.

Hope this helps. If not, please tell me what went wrong.

x2495iiii 01-05-2010 08:24 PM

Do you feel you can write an example of your method?

cardsfan527 01-06-2010 06:35 AM

I may be able to but frankly I am very busy. I'll try to make one soon.

jediaction 01-06-2010 10:59 AM

The way i would track is as the object moves the little dot on teh screen moves to but slower and in the direction that the chicken is moving

x2495iiii 01-06-2010 11:14 AM

That's what I did already, that was the easy part. The hard part is going to be tracking the chicken's relative position to the player as the player moves.

jediaction 01-06-2010 11:20 AM

Oh i see what you mean, Darn thats hard. OH man, i just realized, yah well you can just make it so as the player moes at which speed the player is moving and turning, the dot representing the enemie moves too, and as it reaches the edge of teh map, it showing variable turns to false, and when seen again turn to true when its comes back into the map...just helping, that shoul work

All times are GMT -5. The time now is 12:47 AM.

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.