Server Help

ASSS Custom Projects - Region solutions

Bak - 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
Dr Brain - 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?
Bak - 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)
Mr Ekted - 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".
Dr Brain - 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.
Bak - Sun Jul 18, 2004 4:01 pm
Post subject:
you just said you wanted 45 degree angles. Wouldn't that add the same ambiguity?
Anonymous - 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
Dr Brain - 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.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group