How can I create a Magnified Inset?
-
- Lux Newbie
- Posts: 3
- Joined: Tue Aug 15, 2006 8:02 pm
How can I create a Magnified Inset?
I am creating a map where there is a cluster of relatively small countries, somewhat difficult to see. I noticed that at least one existing map, Macedonian Empire, by hunterrose2000, has an inset that magnifies a portion of Southern Greece, making it easier to play. And any action that occurs in the inset is instantly mirrored on the main map.
Anybody know how he did that?
Anybody know how he did that?
Re: How can I create a Magnified Inset?
There are a few maps that use this technique, the one you mentioned being the first. Currently there is no way to do this within the Lux map editor. In order to accomplish it one must be familiar with and be able to alter the maps code file. Basically it consists of giving one country two ploygon tags, 1 tag for the tiny part and 1 tag for the zoomed in part. For a non-code way of doing a zoom in box (or inset), check out the map Hawaiian Kingdom by Kartofile. Here Kartofile uses theme elements, which in my opinion is a better way of doing it because then its less confusing for the player and the little red arrows that tell you which countries are attackable aren't pointing in odd directions.A.Vespucci wrote:I am creating a map where there is a cluster of relatively small countries, somewhat difficult to see. I noticed that at least one existing map, Macedonian Empire, by hunterrose2000, has an inset that magnifies a portion of Southern Greece, making it easier to play. And any action that occurs in the inset is instantly mirrored on the main map.
Anybody know how he did that?
MB
- Ricklionhart
- Luxer
- Posts: 77
- Joined: Sat Jul 08, 2006 2:49 am
- Location: Down Under "Down-Under"
- Contact:
An example might help:
Open the blahblah.luxb file in a text editor like TextEdit and you'll find a bunch of country definitions that look something like this (this example uses only two countries):
<country>
...some stuff missed out here...
<polygon>50,50 100,50 100,100 50,100</polygon>
</country>
<country>
...some stuff missed out here...
<polygon>200,50 250,50 250,100 200,100</polygon>
</country>
Those are the polygons to draw to make the country - ie draw a line on screen from 50 across 50 down, to 100 across 50 down, to 100 across 100 down, etc.
Now if we add two extra lines like this:
<country>
...some stuff missed out here...
<polygon>50,50 100,50 100,100 50,100</polygon>
<polygon>10,10 20,10 20,20 10,20</polygon>
</country>
<country>
...some stuff missed out here...
<polygon>200,50 250,50 250,100 200,100</polygon>
<polygon>300,10 310,10 310,20 300,20</polygon>
</country>
Each country will now consist of two entirely separate polygons for display purposes, but both are the same country and you can click in EITHER of them. When one turns blue, they both do. Etc. Note as Mark said, that the red arrow which shows movement in the game will point to the MATHEMATICAL CENTRE of the country, which means if its made up of more than one polygon, the arrow can point to somewhere which seems to be in the middle of nowhere. That's why in Hawaii Kingdom, the author didn't use two different polygons for the same country, he just used one in the 'enlarged' area and used the graphics to portray the idea that those countries were in two places.
Don't be afraid of editing your luxb files in the text editor, they are only text files after all! Sure, properly formatted text files, so be careful what you change especially if it has < > or / anywhere near it, but apart from that, have fun and learn by looking at existing maps in an editor.
ONE-WAY CONNECTIONS
Note also that editing the file directly like this is also how you make one-way connections on maps - draw in the connections as normal in the map editor, then delete some of the connections (carefully) in the text editor. Look at the very last country (the 'Lone Human' gun) in my submission for this week, Lux Invaders, and you will see that it has connections to every single country on the map but that only the ones on the bottom row of the invaders have them back.
Cheers.
Open the blahblah.luxb file in a text editor like TextEdit and you'll find a bunch of country definitions that look something like this (this example uses only two countries):
<country>
...some stuff missed out here...
<polygon>50,50 100,50 100,100 50,100</polygon>
</country>
<country>
...some stuff missed out here...
<polygon>200,50 250,50 250,100 200,100</polygon>
</country>
Those are the polygons to draw to make the country - ie draw a line on screen from 50 across 50 down, to 100 across 50 down, to 100 across 100 down, etc.
Now if we add two extra lines like this:
<country>
...some stuff missed out here...
<polygon>50,50 100,50 100,100 50,100</polygon>
<polygon>10,10 20,10 20,20 10,20</polygon>
</country>
<country>
...some stuff missed out here...
<polygon>200,50 250,50 250,100 200,100</polygon>
<polygon>300,10 310,10 310,20 300,20</polygon>
</country>
Each country will now consist of two entirely separate polygons for display purposes, but both are the same country and you can click in EITHER of them. When one turns blue, they both do. Etc. Note as Mark said, that the red arrow which shows movement in the game will point to the MATHEMATICAL CENTRE of the country, which means if its made up of more than one polygon, the arrow can point to somewhere which seems to be in the middle of nowhere. That's why in Hawaii Kingdom, the author didn't use two different polygons for the same country, he just used one in the 'enlarged' area and used the graphics to portray the idea that those countries were in two places.
Don't be afraid of editing your luxb files in the text editor, they are only text files after all! Sure, properly formatted text files, so be careful what you change especially if it has < > or / anywhere near it, but apart from that, have fun and learn by looking at existing maps in an editor.
ONE-WAY CONNECTIONS
Note also that editing the file directly like this is also how you make one-way connections on maps - draw in the connections as normal in the map editor, then delete some of the connections (carefully) in the text editor. Look at the very last country (the 'Lone Human' gun) in my submission for this week, Lux Invaders, and you will see that it has connections to every single country on the map but that only the ones on the bottom row of the invaders have them back.
Cheers.
- Black Pope
- Lux Exorcist
- Posts: 3878
- Joined: Tue Sep 06, 2005 5:36 pm
- Location: God's Right Hand
I don't know if this is helpful to you wonderful map makers, but in my experience, insets are a reason NOT to use a map.
Now, I haven't discussed this with a great deal of people, but those I have spoken to about it hate the inset as much as I do.
Please only consider this comment if it helps in continuing your butt kicking map making process.
I enjoy the fruits of your labor...thanks.
Now, I haven't discussed this with a great deal of people, but those I have spoken to about it hate the inset as much as I do.
Please only consider this comment if it helps in continuing your butt kicking map making process.
I enjoy the fruits of your labor...thanks.
- Black Pope
- Lux Exorcist
- Posts: 3878
- Joined: Tue Sep 06, 2005 5:36 pm
- Location: God's Right Hand
Well, for me its simply confusing*. For example, on the Crusades map, it is difficult to figure out...then, shifting the click and the glance makes a kill quite difficult.
Also, on some maps it is impossible to figure out where the insert belongs...the Hawaiian Kingdom map is baffling to me.
*Please keep in mind the fact that I am not bright
Also, on some maps it is impossible to figure out where the insert belongs...the Hawaiian Kingdom map is baffling to me.
*Please keep in mind the fact that I am not bright
Hmmm... did you download the theme "Hawaiian Kingdom"...?
Seriously though, I agree that insets can often be confusing and should be avoided when possible. I put one in Hawaiian Kingdom only because Oahu is the most populous and important of the islands, and without the inset (and the large number of Oahu territories it provides) the island seemed inappropriately small and insignificant. Sorry if it confused you.
Actually I'm about to make a post asking how to improve Hawaiian Kingdom, and it will be interesting to see how often the inset is mentioned. I expect there may be even more opposition to the hibiscus.
Seriously though, I agree that insets can often be confusing and should be avoided when possible. I put one in Hawaiian Kingdom only because Oahu is the most populous and important of the islands, and without the inset (and the large number of Oahu territories it provides) the island seemed inappropriately small and insignificant. Sorry if it confused you.
Actually I'm about to make a post asking how to improve Hawaiian Kingdom, and it will be interesting to see how often the inset is mentioned. I expect there may be even more opposition to the hibiscus.
- Ricklionhart
- Luxer
- Posts: 77
- Joined: Sat Jul 08, 2006 2:49 am
- Location: Down Under "Down-Under"
- Contact:
Or have a look at my map 'Fullerenes' in a text editor and the map editor, which has a few nodes which are behind other nodes, or which are partially obscured by the connecting rods. In each of these cases I needed to make more than one polygon to represent the country - in some cases there are 3 or 4 polygons for the one country.
It was the 'World War 2 Battles - Operation Market Garden' map, which has a number of enlarged bridge areas, that I examined to learn how to do the multi-poly trick. I suggest you look there for some good examples of it.
It was the 'World War 2 Battles - Operation Market Garden' map, which has a number of enlarged bridge areas, that I examined to learn how to do the multi-poly trick. I suggest you look there for some good examples of it.
- Preacherman
- Semiholy Priest
- Posts: 4496
- Joined: Tue Feb 24, 2004 3:52 am
- Location: Sweden (capital of Denmark, an island in Norway, southern Europe)
- Contact:
Yes, ScaLuxtric broke the Lux Engine in more ways than one at the timeSir Holo wrote:mbauer: I do believe that ScaLuxtric was the first to use the trick, although it was to make bridges and not insets.
A.Vespucci: ScaLuxtric might be a good example map to study the trick. Its layout is pretty simple.
I just meant Macedonina Empire was the first to use the trick in order to make a magnified inset.Sir Holo wrote:mbauer: I do believe that ScaLuxtric was the first to use the trick, although it was to make bridges and not insets.
A.Vespucci: ScaLuxtric might be a good example map to study the trick. Its layout is pretty simple.
so shaddup
Who is online
Users browsing this forum: No registered users and 65 guests