HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Wouldn't it be wonderful if regions weren't always rectangle?

06-19-2004, 05:26 PM#1
Mech-Sheep
Regions should be made by pin-pointing the vertices, instead of a rectangle. I mean, wouldn't be wonderful? If you're trying to make a triangle, you no longer need to drag 20 regions, and 20 triggers.
06-19-2004, 05:45 PM#2
Osse
... That could help sometimes. Generally I don't have to deal with Regions other than when I'm making ambient effects (fog, dust, ect.) because I'm rarely the trigger man.
06-19-2004, 05:47 PM#3
Magias
That would make some things a little easier when dealing with different types of areas.
06-19-2004, 05:57 PM#4
Pyrus
Are you trying to get a petition to Blizzard?
I dont see how vertice pin-pointing can be bad, as long as you have the old method for noobs.
06-19-2004, 06:05 PM#5
Anitarf
Well, they might be bad preformance-wise. The current code for detecting if a unit is in region, etc... is probably optimized for square regions.
06-19-2004, 06:07 PM#6
Pyrus
You strike a good point there.
06-19-2004, 08:39 PM#7
The Gearhead
Detecting whether or not a unit has entered or left a region could be simplified to whether or not it crosses a line. So regions should be simplified to vertices connected by lines, where if a unit crosses a line (a simple x/y axis check) then it is 'in' the region, and if it crosses another line in the same array of vertices then it has left the region.
06-19-2004, 08:47 PM#8
Osse
Yeah. I worked with Starcraft's map editor, and wished I could make circular, or triangular Locations about a million times in the four years I made maps on it. It'd be so nice if you could, especially on War3.
06-19-2004, 08:53 PM#9
Vagabond
Yeah, It would actually make things really easier! Could get you out from many sticky situations.
I voted yes.. :>

Vagabond-
06-19-2004, 10:34 PM#10
AIAndy
What is called region in the world editor is actually rectangles. Regions in JASS can be any shape. So functions that really work on regions do not depend on them being rectangular or not.
06-19-2004, 11:10 PM#11
The Gearhead
Partially wrong there, a region consists of multiple rects. So you'd still require a lot of rects to be defined.
06-19-2004, 11:40 PM#12
AIAndy
But you have one region then instead of multiple and functions to generate these regions can be easily written.
06-20-2004, 12:01 AM#13
Panto
Doesn't it compare the x and y of the location to the minimum and maximum x and y of the rect? So, if you had a non-rectangular rect, it would have to do a much more complicated calculation than it currently does.
06-20-2004, 01:19 AM#14
Deathperception
Well this could be possible in a future version of WEU. However it would be difficult to calculate where a region is and it may cause you to need more CPU resources for calculations which could cause other problems. I'd recommend a polygon region maker by which you can make any shape you wish for your regions rather then a specific one.
06-20-2004, 01:39 AM#15
The Gearhead
Any non-rectangular regions are composed of rectangular rects. So yes, you could generate the regions ingame using some pretty swift calculations, but it'd be a pain and you'd almost never get the right result without seeing it with your own eyes.