MiniMap/Radar

Blitz3D Forums/Blitz3D Programming/MiniMap/Radar

GIMPY73(Posted 2003) [#1]
K

Wot is the best way to make a minimap/radar in Blitz3D

Ive got the camera set at an isometric style view looking at the terrain but i need a minimap/radar which will show the terrain from a top down view and also show enemy placements

How do i go about setting this up???

Thanks

GIMPY :)


Doggie(Posted 2003) [#2]
Why not just use a second camera placed directly up?

Have you looked at my "Radar with True Bearing" example in 3DGraphics Archives? It took me quite awhile to get that figured out but it works.

Doggie


GIMPY73(Posted 2003) [#3]
Thanks m8 ill look into that example


Thanks

GIMPY :)


GIMPY73(Posted 2003) [#4]
Ok i had alook the radar bit seems ok but the camera above method just blows the polys through the roof lol

ill keep trying tho :)



Thanks
GIMPY :)


Jim Teeuwen(Posted 2003) [#5]
I did something similar in one of me first blitz programs a long time ago. twas a 2D view of a 3D terrain for a racing type game.

what I did was; have a 2D version of your terrain (top-down view) with roughly the same dimensions (same wxh ratio anyways).

then get the players positions on the real terrain and translate them to 2d coordinates.
then take the rotation of the real terrain, as opposed to the 2D mapview into account, and devide the resulting x,y coords by the scale difference of the real terrain/2D map.
than you have a set of x, y coords which represent the players position on the 2D mapview. to render them onto the actual mapview, just add the mapviews x and y offset to the x and y coords and ur set.

mmm that explaination prolly doesnt make it any clearer, but it did work like charm :)


wedoe(Posted 2003) [#6]
What Defiance said ! :)


GIMPY73(Posted 2003) [#7]
lol @ wedoe

and thanks defiance ill see wot i can come up with using ur idea


Thanks
GIMPY :)


poopla(Posted 2003) [#8]
My RTS map is set up in a large grid, so it's easy to find out whats on each grid, and draw accordingly.


Rob(Posted 2003) [#9]
Translating from 3D to 2D coordinates is simple.

CameraProject will project a 3D coordinate (entityx, entityy and entityz of each entity) into 2D coordinates.

Get the result using ProjectedX() and ProjectedY()
You may want to "feed" CameraProject an x and z in place of an x and y (swap them around or shuffle until happy) to return 'useful' ProjectedX() and ProjectedY() coords.

So, divide these results to fit a smaller rectangle, and offset to draw where you want in your minimap.


GIMPY73(Posted 2003) [#10]
Ahhh thanks Rob i wondered wot CameraProject did lol


Thanks

GIMPY :)