Page 1 of 1

DEV INFO: Customizing the zoom levels

Posted: Sun Apr 03, 2005 4:46 pm
by color
We figured that not everyone wanted to have the same zoom levels, so like so many other concepts in the game, we made them configurable.
To change the zoom levels yourself, open up the art.txt file and find the three following lines:

Code: Select all

 // zooms for the game
 MAP_ZOOM,4800,5400,6000
 
 // chip scaling by zoom
 CHIP_SCALE,3000,3375,3750
 
 // Y ofsets by zoom
 ICON_Y_OFFSET,35,40,45
 

- The first line is the zoom at the three different levels. The numbers goes from the highest zoom to the lowest zoom. Increasing the number increases the zoom level and vice versa. That also means you can actually zoom further out at the highest level by lowering the first number. This should satisfy the request of some to get a large overview mode where you can to do strategic planning without using the strategic map.

- The second decides the scaling of the unit icons on each zoom level.

- The third decides the x and y coordinate offset for each zoom level when placing the unit icons.
The unit icon coordinates for each region is in another file.


So changing the first set of values and then playing around with the two other sets to find the optimal values you can completely customize the zoom level to your liking. I suggest once players has found new values they like that you share them with other players posting replys to this thread.


Jorgen

ADMINS, please make this sticky.

RE: DEV INFO: Customizing the zoom levels

Posted: Sun Apr 03, 2005 9:35 pm
by Marc von Martial
For a customer made example see also this thread in the main GGWAW forum:

tm.asp?m=830833

RE: DEV INFO: Customizing the zoom levels

Posted: Sun Apr 24, 2005 7:29 pm
by marc420
anyone know the max of how far out you can zoom and still see the numbers? .... the numbers like transport capacity in a region?

RE: DEV INFO: Customizing the zoom levels

Posted: Fri Jun 03, 2005 2:18 am
by Lebatron
I found that to be 4000. So that is what I set my normal zoom to. The others are 3000 and 2000. But at them zooms the program uses the enlarged unit icons from the old zoom-in. I guess if you want the unit size to stay uniform though all the zooms you will need to go though all the lines of code for each unit type. Its not worth the effort.
From the art.txt file

// zooms for the game
MAP_ZOOM,4000,3000,2000

// chip scaling by zoom
CHIP_SCALE,3000,1700,1500

// Y ofsets by zoom
ICON_Y_OFFSET,25,25,25

If you would like keep the original default zoom level use 4800 in place of 4000. At 4800 the icon offset was originally at 35. But I think 25 works better because it places the ships closer together. Also air sits a little closer to land units. I think you'll like the tighter look better. Try both 25 and 35 to see for yourself.


RE: DEV INFO: Customizing the zoom levels

Posted: Thu Sep 08, 2005 7:32 pm
by Starfire512
It turns out that you can have more than three zoom levels, if you so desire. Just add the extra ones at the end. Make sure that all three lines have the same number of numbers