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.

Dark GDK / best way to go about making a mini map?

Author
Message
Wikaman1
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 11th Jan 2010 17:20
I want to create a mini map in the corner of my game that will show a dot where enemy's and allies are. I have no idea how to do this though as the game is 3d but the map would be 2d and other things. Has anyone managed to do this?
Aldur
16
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 11th Jan 2010 18:39 Edited at: 11th Jan 2010 18:40
Get the size of playable area, say a plain that is 500 units long and wide.
Choose a size for your minimap, say 100x100px and work out the scale factor.
In this case it would be 1/5.

So, for your minimap you would have your position, dbObjectPositionX(player) & dbObjectPositionZ(player),
and scale them (1/5)

For your minimap you could use sprites, dgdk inbuilt 2d functions, or whatever you like. Here is a small piece of untested code for you to think about.



Hope that helps.

Wikaman1
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 11th Jan 2010 20:53
thank you, I'll try this out just now and get back to you

Login to post a reply

Server time is: 2024-10-01 20:23:26
Your offset time is: 2024-10-01 20:23:26