Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Bitmap inside radar

Author
Message
Abraxis
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location:
Posted: 10th Jul 2008 19:44
I'm working in a rpg game but I want to add a radar to the screen to display on which is the bad guy(red dot) or not(blue dot). I'd like to have this radar actually display the surrounding land that the player walks. Would I need to add another 'make camera' cammand for a helicopter view to show buildings, trees, etc,.?

If you do something 10,000 times. Your bound to get it right once.
Nano brain
16
Years of Service
User Offline
Joined: 7th May 2008
Location:
Posted: 10th Jul 2008 23:32
It depends. The camera may be the easiest method...or quickest, however you look at it. Need help with anything of it in particular? Let me know.
Moe
18
Years of Service
User Offline
Joined: 1st Apr 2006
Location: Sunny California
Posted: 11th Jul 2008 02:37
There are a couple methods. Yes, one way would be to make another camera, this would show a completely literal view of everything the player was seeing, but from above.

The way most minimaps are done, however, take the X and Z coordinates of the player, and the surrounding objects, and then divide that by a certain amount. I'll try to get a couple sample scripts up

parrot
Moe
18
Years of Service
User Offline
Joined: 1st Apr 2006
Location: Sunny California
Posted: 11th Jul 2008 04:39


This would be the literal screen, which is the easiest to use. Otherwise you would have to
1. Make a texture of the entire map you want to use
2. make sure the texture map is in proportion to the real map
3. find the players position on the map texture
4. find the rotation
5. find the enemies position relative to the player and his rotation
6. divide that number to fit the screen
7. use the dot or circle command to make a dot or circle at the area on the minimap.
8. rotate and clip the minimap....

i dunno, it's hard.

parrot
Nano brain
16
Years of Service
User Offline
Joined: 7th May 2008
Location:
Posted: 11th Jul 2008 07:19
Here is another example of a map using a camera.



If you would rather create a custom 2d map, and are still having trouble conquering it yourself, then let me know and I'll write up some quick example code for you. Good luck!
Abraxis
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location:
Posted: 11th Jul 2008 17:12
thanx for help guys. I found both of these examples usefull. I now have the general idea on what to do.

If you do something 10,000 times. Your bound to get it right once.
Abraxis
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location:
Posted: 11th Jul 2008 21:15
Just a thought tho. Having the radar transparent, almost like a ghost effect except on whos the bad guys.

Any ideas?

If you do something 10,000 times. Your bound to get it right once.
Moe
18
Years of Service
User Offline
Joined: 1st Apr 2006
Location: Sunny California
Posted: 13th Jul 2008 02:44
with using a camera as a radar? i don't think it's possible.

parrot
sinisterstuf
17
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 14th Jul 2008 13:58
I don't really know what you mean but you could make a new camera (the one with the helicopter view) and output the camera to an object like a plain (there is a command for this, look it up in the help file because I don't remember it) which will be on the player's HUD and then lower the alpha value of the object and ghost it to make it transparent. Is that what you wanted?

Well... No, my name IS actually 'sinisterstuf' not 'Sinister Stuff', a misspelling resulting from the former having too many characters with no spaces in between

thanks CattleRustler!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Jul 2008 20:13
SET CAMERA TO IMAGE is the command, then use that to texture either a ghosted plain, or a sprite (plain would be better & faster, sprite is slightly easier).

Nano brain
16
Years of Service
User Offline
Joined: 7th May 2008
Location:
Posted: 16th Jul 2008 23:29
Abraxis,

I believe that the code below is an example of what you were asking for on your July 11 post. Opaque dots where the enemies are on the overlay map, with the rest of the map transparent. Hope this helps.

Abraxis
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location:
Posted: 19th Jul 2008 01:49
It seems if I use the 'set camera to image' command to form the radar into a sprite. Then use the 'set sprite alpha' command to make the radar somewhat transparent so I'm able to see whats going on in the distance.

I'm greatful of your help guys.

Thanx

If you do something 10,000 times. Your bound to get it right once.

Login to post a reply

Server time is: 2024-11-25 01:31:49
Your offset time is: 2024-11-25 01:31:49