Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 05.11.2005, 03:11   #1
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default [Tutorial] Geodata Explaination (Chinese)[translation at R4]

thx to jiaqiang

【共享】目前我知道地图知识 有能力的的朋友就去弄吧

这里要谢谢ajia 希望大家以后不被地图的问题捆绕 能够专心开发系统
说到地图 我以前说地图都是一样 我想toun 和 ajia该明白不管是384K和几M的都一样是� �么意思
我现在详细说一下 地图的规律
先说代码读取规则 是按照从左到右 从上到下 从高到低的原则

先说客户端一个坐标规律
客户端最小的/位置地图高度差是8
也是灰质地bmp地图里 我们放的高度其实是8的倍数 这就是解决了 255阶表示我们现在地图的问题 toun在制作地图时候没发现这个问题 你以后可以自己更正

大家知道00 00代码 00 00 aa bb xx yy 格式 我以前说过xx yy是不读的
aa bb 才是真实表示的高度 如何换算我就不说了 不明白的去看bfwd的帖

那我们用00 00代码写地图的时候会碰到1个问题
因为00 00代码代表了1个区域 那这1个区域里只有1个高度
那例如这个区域内需要2个高度或者更� �� 那00 00代码就不能完成了 显然要引入新的代码编写方式
那新的方式就是40 00 或者40以上的代码
40其实就是64
那40 00 这个1个区域内就最多可以放64个高度
整个40 00代码的区域和00 00代码代表的区域大小一样
40 00 里面的代码也是按照左到右 从上到下的规则的 8个代码一起 分为8份 8*8=64
里面代码的谱写也必须符合为8的倍数� ��规则

那空间的概念就是
例如一个区域我们以上基本知道一个� �码区域内最多能放64个高度
那1个区域放64以上的高度呢?那就是空� ��概念了
例如41 00
他里面65个高度 他的格式肯定是41 00 01 00 xx yy .....02 00 xx yy aa bb
那02 代表 2个高度 xx yy 上层高度 aa bb下层高度
代码编写和40 00代码一样 梢后我会高度详细的代码换算法则

层连接概念
层与层连接高度差最大为24
例如2个位置 1个位置的高度是-3000 -5000
另一个位置的高度 -3024 -5000
那表层是完全连接
例如 另一位置的高度是 -3036 -5000
那从-3000走到-3036是可以走到的
那从-3036走到-3000是不可能的
直接掉了-5000去了 那是toun以前碰到的问题

环境变量概念(既代码换算)
40 00 包括40以上代码换算

0: 全禁止
0.5 : 全通过
1: 禁止向右
1.5: 禁止向左
2.0: 禁止左右 只能上下
2.5: 禁止向下
3: 禁止向右 向下
3.5: 禁止向左 向下
4: 只能向上
4.5: 禁止向上
5: 禁止向上 向右
5.5: 禁止向上 向左
6: 只能向下
6.5 禁止上下 只能左右
7: 只能向左
7.5 只能向右

基本换算
65536-2X-2(变量)

注:X为8的倍数 也就是只能是 0 8 24......之类的
变量为0-7.5
得到16个效果
Digital is offline  
Old 05.11.2005, 05:04   #2
bob1122
Архивный участник
 
Join Date: Aug 2005
Posts: 278
Default

When it comes to l2, i think its better for me to learn Chinese than ASM :P
bob1122 is offline  
Old 05.11.2005, 07:35   #3
wton
Архивный участник
 
Join Date: May 2005
Posts: 463
Default

traslate google
translated more down ^^ by digitals

thanks digital ^^
wton is offline  
Old 05.11.2005, 07:36   #4
bwgreen
Архивный участник
 
Join Date: Sep 2005
Posts: 408
Default

http://babelfish.altavista.com/tr

lol.......
bwgreen is offline  
Old 05.11.2005, 09:40   #5
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

thx to jiaqiang (sheesh, translation by me + more details explaination by me (flaming me not allowed + i bet jiaqiang, torune and kcinick would kill me.. lol) :P)

【share】my geodata knowledge as of now, ppl with ability have fun with it

thanks to ajia, hope that ppl will not be troubled by geodata problems again and concentrate on development new stuff
speaking of geodata, i said before that geodata are the same, i believe torune and ajia understands the meaning of that no matter if it's 384k or a few MB, they are all the same (dig: again... this is wrong = = sheesh stabs jiaqiang, 384k geodata plainly only stores the information of terrain and seriously lack of detailed information of other related layers)

i'll explain the rules of geodata below:
firstly hex code reading rules - from left to right, top to bottom, high to low priniciple (dig: actually this is wrong :x what is read should appear as y axis followed by x axis, shrugs... continue with translation)

client side has a coordinate rule
client's smallest /loc geodata height difference is 8
also in grayscale bmp geodata, the height we place in it is actually a multiple of 8.
this fixes the 255 byte representation problem on our geodata.
torune doesnt discover this problem when creating geodata, u could fix it by yourself
(dig: O_o, seriously i dunno what he's trying to say... isnt this something everybody knows? (at least to those doing bmp->geodata, this is the basics), oh alright , i'll try not to sidetrack :x)

everybody should know 00 00 header and 00 00 aa bb xx yy base geodata template, i've said before xx yy isnt read and aa bb is the real height
how to calculate these heights, i will not be going into, for those who doesnt understand read bfwd's post

when we use 00 00 header to write geodata, we'll face a problem
cause 00 00 header represents 1 area, and that 1 area can only have 1 height.
for example, if this area needs 2 heights or more, the 00 00 header will not be able to accomplish what is needed.
therefore we'll need to introduce new header coding format.
and that new header is 40 00 or 40+ headers (e.g. 41 00 / 42 00 / 4x 00)
*40 (hex) is 64 (decimal)
in 40 00 header, this area could have up to 64 heights
the whole 40 00 header area and 00 00 header area has the same size
inside 40 00 header, it follows the same rule of left to right, top to bottom rule, 8 byte together forms 8*8 = 64 and the format of writing must match the multiple of 8 rule.

concept of what is above:
example in a area, we can use the knowledge above and know that within a header area, the max height in it is only 64.
and what about the height above that area? this is where it is used.

for example 41 00 header
inside this header has 65 heights, it's format is 41 00 01 00 xx yy .... 02 00 xx yy aa bb
that 02 represents 2 heights, xx yy as the top height and aa bb as bottom height.
style of writing is the same as 40 00 header, later we'll talk about height detail calculations

level connection concept:
level to level height difference is max at 24
for example at 2 location, 1 location height is -3000 -5000
other location height is -3024 -5000
this means the level is connected
if another location height is -3036 -5000
that means, u could walk from -3000 to -3036
but walking from -3036 to -3000 is impossible
u'll drop to -5000, this is a problem that torune used to face

environment variable concept: (dig: or our so called geodata wall bit)
40 00 header including 40+ headers

(dig: this is from kcinick, hope he doesnt kill me for releasing this, but jiaqiang has already given it.. so i guess it's alright :X)
0000 = 0 = EAST -> WEST [WALL] WEST -> EAST [WALL] NORTH -> SOUTH [WALL] SOUTH -> NORTH [WALL]
0001 = 1 = EAST -> WEST [WALL] WEST -> EAST [OK] NORTH -> SOUTH [WALL] SOUTH -> NORTH [WALL]
0010 = 2 = EAST -> WEST [OK] WEST -> EAST [WALL] NORTH -> SOUTH [WALL] SOUTH -> NORTH [WALL]
0011 = 3 = EAST -> WEST [OK] WEST -> EAST [OK] NORTH -> SOUTH [WALL] SOUTH -> NORTH [WALL]
0100 = 4 = EAST -> WEST [WALL] WEST -> EAST [WALL] NORTH -> SOUTH [WALL] SOUTH -> NORTH [OK]
0101 = 5 = EAST -> WEST [WALL] WEST -> EAST [OK] NORTH -> SOUTH [WALL] SOUTH -> NORTH [OK]
0110 = 6 = EAST -> WEST [OK] WEST -> EAST [WALL] NORTH -> SOUTH [WALL] SOUTH -> NORTH [OK]
0111 = 7 = EAST -> WEST [OK] WEST -> EAST [OK] NORTH -> SOUTH [WALL] SOUTH -> NORTH [OK]
1000 = 8 = EAST -> WEST [WALL] WEST -> EAST [WALL] NORTH -> SOUTH [OK] SOUTH -> NORTH [WALL]
1001 = 9 = EAST -> WEST [WALL] WEST -> EAST [OK] NORTH -> SOUTH [OK] SOUTH -> NORTH [WALL]
1010 = 10 = EAST -> WEST [OK] WEST -> EAST [WALL] NORTH -> SOUTH [OK] SOUTH -> NORTH [WALL]
1011 = 11 = EAST -> WEST [OK] WEST -> EAST [OK] NORTH -> SOUTH [OK] SOUTH -> NORTH [WALL]
1100 = 12 = EAST -> WEST [WALL] WEST -> EAST [WALL] NORTH -> SOUTH [OK] SOUTH -> NORTH [OK]
1101 = 13 = EAST -> WEST [WALL] WEST -> EAST [OK] NORTH -> SOUTH [OK] SOUTH -> NORTH [OK]
1110 = 14 = EAST -> WEST [OK] WEST -> EAST [WALL] NORTH -> SOUTH [OK] SOUTH -> NORTH [OK]
1111 = 15 = EAST -> WEST [OK] WEST -> EAST [OK] NORTH -> SOUTH [OK] SOUTH -> NORTH [OK]

basic calculation
65536-2X-2(variable)

Note:X is a multiple of 8, so it could only be 0,8,24... etc
variable is between 0-7.5, getting 16 results in the end
Digital is offline  
Old 05.11.2005, 10:35   #6
Domzelan
Архивный участник
 
Join Date: Apr 2005
Posts: 599
Default

Anybody can do a program witch will be use this stuff?
Domzelan is offline  
Old 05.11.2005, 13:22   #7
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

.............
no comments... maybe i shouldnt have translated.
Digital is offline  
Old 05.11.2005, 14:09   #8
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

Thanks for the info. I hope I could understand geodata a bit more, I don't know where to start
top-gear is offline  
Old 05.11.2005, 14:15   #9
bwgreen
Архивный участник
 
Join Date: Sep 2005
Posts: 408
Default

Thanks, and thanks for translating.
bwgreen is offline  
Old 05.11.2005, 14:43   #10
localhost
Архивный участник
 
Join Date: Jul 2005
Posts: 145
Default

Yea, thanks for the translation digital.
localhost is offline  
Old 05.11.2005, 16:49   #11
mar_tin
Архивный участник
 
Join Date: Aug 2005
Posts: 49
Default

thanks for the info, and thanks for the translation, really ty
mar_tin is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:35.