Tommy has made a perfectly square tile map with a mesh containing n number of rectangles, each with 256x256 dimensions, with the bottom left rectangle starting at an x,y value of (256,256). He then rotates this map by 45 degrees to make it look like an Age of Empires II map, so it is now a perfect diamond.
What equation tells Tommy how wide the map is? (Along either the x or y axis)
Bonus Questions! (Or I don't know the answer... yet >)
1) Tommy wants to draw the same mesh again in the bottom right corner of the screen, scaling it down for use as a minimap inside the GUI. If n is variable across different games, what equation will let him keep the minimap the same size no matter how wide the main map is?
USA
katsup or mustard
What equation tells Tommy how wide the map is? (Along either the x or y axis)
--Example code
m = mesh()
local x,y
local w = 256
local h = 256
for i=1,n do
for ii=1,n do
x = i * 256
y = ii * 256
m:addRect( x, y, w, h )
end
end
Bonus Questions! (Or I don't know the answer... yet >
1) Tommy wants to draw the same mesh again in the bottom right corner of the screen, scaling it down for use as a minimap inside the GUI. If n is variable across different games, what equation will let him keep the minimap the same size no matter how wide the main map is?
USA
katsup or mustard
[This message has been edited by local boi (edited 02-02-2017 @ 10:02 PM).]