How can I create a Magnified Inset?

Lux maps won't make themselves.
Post Reply
A.Vespucci
Lux Newbie
Posts: 3
Joined: Tue Aug 15, 2006 8:02 pm

How can I create a Magnified Inset?

Post by A.Vespucci » Sun Aug 20, 2006 3:25 pm

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?

User avatar
mbauer
Not A Truck
Posts: 3959
Joined: Mon Jun 28, 2004 3:59 pm
Location: Tallahassee
Contact:

Re: How can I create a Magnified Inset?

Post by mbauer » Sun Aug 20, 2006 4:23 pm

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?
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.

MB

User avatar
Ricklionhart
Luxer
Posts: 77
Joined: Sat Jul 08, 2006 2:49 am
Location: Down Under "Down-Under"
Contact:

Post by Ricklionhart » Tue Aug 22, 2006 7:14 am

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.

User avatar
Black Pope
Lux Exorcist
Posts: 3878
Joined: Tue Sep 06, 2005 5:36 pm
Location: God's Right Hand
Contact:

Post by Black Pope » Tue Aug 22, 2006 7:18 am

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.

User avatar
hoodie
Burning Man
Posts: 4879
Joined: Sat Jun 18, 2005 4:03 pm
Location: San Francisco

Post by hoodie » Tue Aug 22, 2006 11:36 am

I think it depends on the inset, I've seen good, I've seen bad.

User avatar
SunTzu
Lux Cartographer
Posts: 1585
Joined: Sat Jan 14, 2006 1:48 am
Location: Maryland

Post by SunTzu » Tue Aug 22, 2006 12:51 pm

Black Pope wrote:in my experience, insets are a reason NOT to use a map.
I'm curious... what don't you like about insets? The little red arrows? Having to mentally shift to a different part of the map?

User avatar
Black Pope
Lux Exorcist
Posts: 3878
Joined: Tue Sep 06, 2005 5:36 pm
Location: God's Right Hand
Contact:

Post by Black Pope » Tue Aug 22, 2006 2:22 pm

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

User avatar
Kartofile
Luxer
Posts: 255
Joined: Sat Jun 17, 2006 1:30 am

Post by Kartofile » Tue Aug 22, 2006 3:26 pm

Hmmm... did you download the theme "Hawaiian Kingdom"...? :wink:

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. 8)

User avatar
Sir Holo
Old Skool Lurker
Posts: 333
Joined: Wed Jul 28, 2004 9:54 am
Location: USA
Contact:

Post by Sir Holo » Sat Aug 26, 2006 12:56 pm

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.

User avatar
Ricklionhart
Luxer
Posts: 77
Joined: Sat Jul 08, 2006 2:49 am
Location: Down Under "Down-Under"
Contact:

Post by Ricklionhart » Sun Aug 27, 2006 5:54 am

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.

User avatar
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:

Post by Preacherman » Sun Aug 27, 2006 6:34 am

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.
Yes, ScaLuxtric broke the Lux Engine in more ways than one at the time 8)

User avatar
mbauer
Not A Truck
Posts: 3959
Joined: Mon Jun 28, 2004 3:59 pm
Location: Tallahassee
Contact:

Post by mbauer » Sun Aug 27, 2006 4:33 pm

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.
I just meant Macedonina Empire was the first to use the trick in order to make a magnified inset.

so shaddup

Post Reply