Author |
Message |
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Sat Jul 17, 2004 6:32 pm Post subject: |
|
|
|
|
here's my solution to region problems, I made the format accept regular numbers, as well as coords, it's reverse compatable with the old version
Format:
asss region file version 2
;use TILES not pixels
name: MyRegion
;load a rectangle with x=50, y=65, w=90, h=90 TILES
50, 100, 90, 90
; load a coordinate with x=512 y=512
512, 512
isbase
name: YourRegion
50,50
90,50
63,123,4,5
i don't think grel wants it to be official because he thinks using a sparse array for regions would work better... I say that just prevents overlapping regions
region 2.zip - 9.41 KB
File downloaded or viewed 46 time(s)
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sat Jul 17, 2004 9:51 pm Post subject: |
|
|
|
|
The region file I will be converting has some 45 degree walls in it, so there is no way I can really do the file by hand, no matter the format.
Getting off topic here. Perhaps split this off into a new post? _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me
|
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Sat Jul 17, 2004 11:16 pm Post subject: |
|
|
|
|
Perhaps a polygon type object would be better... and you could define a series of points like
54,13:15,28:600,512:54,10
and it would make a polygon like that and then check for containment appropriately (draw a ray from your point in any direction, odd number of line intersections = inside polygon, even number of line intersections = outside polygon)
|
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Jul 18, 2004 2:24 am Post subject: |
|
|
|
|
The best way is to have an LVL editor where you can indicate regions visually and save them to a file that ASSS can load. Trying to have users define polygonal or curved regions would cause all kinds of problems with "aliasing". _________________ 4,691 irradiated haggis!
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sun Jul 18, 2004 9:06 am Post subject: |
|
|
|
|
Best way aside, I need to make a region file. We can talk about what's nice all day long, but the fact of the matter is that I'll have to make a BMP converter.
Polygons also add ambiguity. Don't know for sure if the tiles right on the edge are inside or out. Rectangles you always know.
|
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Sun Jul 18, 2004 4:01 pm Post subject: |
|
|
|
|
you just said you wanted 45 degree angles. Wouldn't that add the same ambiguity?
|
|
Back to top |
|
|
-Smong- Guest
Offline
|
Posted: Sun Jul 18, 2004 5:34 pm Post subject: |
|
|
|
|
Maybe you could make up a region from horizontal lines, and use some RLE method for the y axis:
; rectangle (5,10) (20,15)
;<how many times to repeat/increment y-coord>:<start y>,<start x>,<end x>
5:10,5,20
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sun Jul 18, 2004 6:43 pm Post subject: |
|
|
|
|
Bak wrote: | you just said you wanted 45 degree angles. Wouldn't that add the same ambiguity? |
No, I said that because of the map's 45 degree angles, I can't make the file by hand. Far too tedious and prone to error.
If I were to only make the file once, I would use Excel to do it, but because there are always changes and additions needed, I will make the conveter sometime this or next week.
|
|
Back to top |
|
|
|