javascript - 2D top-down minimap -
i'd make minimap of rpg game. is making minimap simple dividing object dimensions, velocities, , coordinates large want minimap? for example below... have size of 1000x1000px, canvas (viewport) of 500x500px, player located in center of viewport... if wanted minimap half size of actual world, do: player/viewport x,y velocity/2 player/viewport x,y coordinates/2 canvas, world, , objects' width , height divided 2 etc... that way rendering of minimap on world , velocities scaled accurately? missing anything? thanks! edit : this? function minimap() { $(".minimapholder").show(); $("#mini_map").text("hide minimap"); var minicanvas = document.getelementbyid("minimap"); ministage = new createjs.stage("minimap"); minicam = new createjs.shape(); minicam.graphics.beginstroke("white").drawroundrect(0, 0, 100, 40, 5); //blip representation of player player_blip = new createjs.shape(); ...