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.

AppGameKit Classic Chat / NNeed Help With MiniMap

Author
Message
BlackChaos
14
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 2nd Jun 2013 02:12
//Tis code works but's in accurate.. not sure why.. pre-warning you are about to see some bad math

Also:
Plase asume these facts to always be true, the variable "backdrop" is just an image of a map loaded and resized to a small map at the corner of the screen.
And find that the variable "Player" is also an image loaded into memory;
Finally that the variable "MiniMapDot" is a tiny 8x8 image of a blue square(Much smaller that the image of the map previously loaded).




//It's just a really small sprite(Tiny cube) that mimics the position of a larger sprite's down-scaled x and y axis.

I need assistance in make this code more accurate .. or just an explanation of what i should be aiming for.

AEngine 2012 Ameadus Project Feedback or Food o0
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jun 2013 05:52
First, what is the purpose of the square root of the size of the sprites?

Since the size of the display definitely won't change and the size of the sprites probably won't, why don't you have all of that information stored once in variables?

In what way is it not accurate?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Marl
12
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 2nd Jun 2013 09:57
If...
1) ...the mini-map is just a smaller version of the main map
2) ...the main map is on the world plane
and
3) ...All objects on the main map are represented on the min-map

Then you don't need to redraw anything.

You can use setscissor in conjunction with setviewoffset and setviewzoom to have AppGameKit redraw the small version for you.

I did something similar a while back.

http://forum.thegamecreators.com/?m=forum_view&t=197617&b=48

Login to post a reply

Server time is: 2024-05-02 17:33:34
Your offset time is: 2024-05-02 17:33:34