I don't know if I'm weird or if it's just normal to get random reverse engineering urges.
-
yeah this makes no sense.
-
the first byte seems to be which icon to use. I can adjust it, and the thing still picks up as the mining probe, but it looks different in the preview
-
next byte seems to be what it is.
I set it to 08 and got a Data Storage Laser Disk [sic]I think this guy was murdered, I found out from looking at the files that there's a dead body you can find somewhere, and I think it's mr. Allen
-
ahh. I think it's (effectively) using big endian numbers. See, the coordinates aren't linear X/Y, they're "which sector" and then (maybe) "where within the sector".
-
which I think means it has a positional resolution of like 35 meters, given that each sector is 10km across
-
fuck me these are nibble addresses
I entered "87", which is hex 0x57, and it's in sector E07
E is the 5th letter of the alphabet. so it's sector E07. -
so if I change it to 71 (hex 0x47) it should move to sector D07
-
hey look there it is.
-
Foone🏳️⚧️replied to Foone🏳️⚧️ last edited by [email protected]
okay so the 6-byte format is:
byte 0: icon
byte 1: what it is
byte 2: what sector it is inbytes 3-5 are for intra-sector positioning (presumably). now to try and figure that shit out
-
-
okay this is weird. Byte 3 is the x-position within the sector, and it can have (valid) positions between -19 and +19.
If you go above or below that range, it'll get placed into neighboring sectors, which fucks up the game's item detection. It only looks in the current sector for items, but it won't see an item that's one sector over but positioned at -50
-
byte 4 is Y-position using the same rules (origin is at bottom left)
No idea what byte 5 means. it's set to 18, but changing it to 0 or FF or anything in between seems to change nothing
-
okay I can figure out where all the items are now
C:\DOSBox-X\drive_c\Echelon\py>python decode.py ..\Az.ARE az.out
header=(0, 144),n_items=5
icon=0,itemid=2,sector=D04,x=6528,y=4992,c6=31
icon=96,itemid=128,sector=D11,x=7552,y=7040,c6=3
icon=108,itemid=152,sector=D11,x=3712,y=4992,c6=33
icon=20,itemid=41,sector=E06,x=5760,y=6784,c6=18
icon=18,itemid=38,sector=L11,x=3456,y=7296,c6=1 -
I wonder if it'll break if I put all 242 items into one area
-
Foone🏳️⚧️replied to Foone🏳️⚧️ last edited by [email protected]
so the game works by only having a 3x3 sector grid rendered, but those sectors are inside of Areas, and it can only have one area loaded at once. So if you're at sector B02, you have A01, A02, A03, B01,B02,B03, C01,C02,& C03 loaded.
-
but it can only have on area loaded.
So when you're at A01, you should have parts of three other areas visible... it solves this in a silly but simple fashion:There's nothing at the borders.
-
when a sector isn't loaded it's rendered like it's there anyway, but empty.
So when you're at A05 and looking west, you should be seeing what's in B14. And you are... because B14 is empty. The stuff doesn't start to B13, which you can only see by traveling into B14 and loading that area instead
-
you can REALLY tell this game was born on a c64. Each area is like 3kb. Loading the maximum of 4 of them would take up a massive TWELVE KILOBYTES
-
This post is deleted!
-
@foone is this border why the sector maps are 14x14 instead of 16x16 like normal people would do?
-
I went and bought the GOG version.
The one I was hacking on was version 1.0 from 1988, the gog one is 3.40 from 1989