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.

DarkBASIC Discussion / creating hud/radar using locked plains on screen

Author
Message
phukol
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location:
Posted: 20th Feb 2005 23:45
hi there. just wana get some help from u regarding how i could make a radar which uses textured plains (so that i can use nos or images to represent ojects, rather than just plain dots or shapes). and i used samples from the monster hunt tutorials, and man, they can really eat lots of fps because of the bitmap and dots needs to be displayed every loop. when i tried replacing the dots with the textured plains locked on the screen, the main problem that i had was that the coordinates and the proper scaling of the object to the map. As anybody knows, to get the coordinates we use:

PX#=object position x(1)/(matrix size/map (bitmap) size)
PZ#=map (bitmap) size-(object position z(1)/(matrix size/map (bitmap) size))
Circle PX#,PZ#,4

But the plain object represrnting the real object doesnt follow the coordinates properly. i was just wondering if there shoould be some things that i should adjust so that my locked plain will serve as good as the 2d dot or circle for radars. thnx!!!

phukol
phukol
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location:
Posted: 21st Feb 2005 21:22
anybody home???

phukol
hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 22nd Feb 2005 10:02
I haven't had any problem with using a small bitmap to create a HUD from. Just don't make your bitmap any bigger than you need to. Also, I have my code update the hud every 5 loops to gain some FPS. I have my hud plotting the coordinates of about 60 different enemy players, and still have a good frame rate.

phukol
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location:
Posted: 23rd Feb 2005 23:16
but its much faster using locked plains. all im asking is that if anyone knows how i could properly scale the values of the map and the objects on the screen. say for ex, a 640*480 screen.

phukol

Login to post a reply

Server time is: 2025-05-23 21:30:25
Your offset time is: 2025-05-23 21:30:25