Conitec 3d gamestudio a4 programmer 매뉴얼
A4 Programmer’s Manual © Conitec 2000 8
Blocks
A4 uses a right-handed XYZ coordinate system with the Z-axis standing upright. If you're not
familiar with the reference of "right-handed" to a coordinate system, it basically provides a tactile
and visual discription of the mechanics of the system. If you wrap your right hand around the z-
axis, with your thumb facing the positive position, and clench your hand, your knuckles will face in
the direction of the positive x-axis and your fingertips will face the postitive y-axis. Here's a picture
of A4's coordinate system:
Blocks
A4 uses a right-handed XYZ coordinate system with the Z-axis standing upright. If you're not
familiar with the reference of "right-handed" to a coordinate system, it basically provides a tactile
and visual discription of the mechanics of the system. If you wrap your right hand around the z-
axis, with your thumb facing the positive position, and clench your hand, your knuckles will face in
the direction of the positive x-axis and your fingertips will face the postitive y-axis. Here's a picture
of A4's coordinate system:
^ z
| ^ y
| /
| /
|/
--------> x
| ^ y
| /
| /
|/
--------> x
Blocks are the primary componens of a MAP file. Each block defines a solid or passable convex
region. Blocks define this region as the intersection of four or more planes. Each plane is defined by
three non-colinear points. These points must go in a clockwise orientation:
1--2----->
| /
|/
3
|
V
Each block statement looks like this:
block 0 {
( 0.0 0.0 32.0 ) ( 0.0 500.0 32.0 ) ( 500.0 0.0 32.0 ) wood 0 0 0 1.00 1.00 : 0000 0.0 50.0 ndef ndef 0.0 0000
( 32.0 0.0 0.0 ) ( 32.0 0.0 500.0 ) ( 32.0 500.0 0.0 ) wood 0 0 0 1.00 1.00 : 0000 0.0 50.0 ndef ndef 0.0 0000
( 0.0 -32.0 0.0 ) ( 0.0 -32.0 500.0 ) ( 500.0 -32.0 0.0 ) wood 0 0 0 1.00 1.00 : 0000 0.0 50.0 ndef ndef 0.0 0000
( -32.0 0.0 0.0 ) ( -32.0 500.0 0.0 ) ( -32.0 0.0 500.0 ) wood 0 0 0 1.00 1.00 : 0000 0.0 50.0 ndef ndef 0.0 0000
( 0.0 32.0 0.0 ) ( 500.0 32.0 0.0 ) ( 0.0 32.0 500.0 ) wood 0 0 0 1.00 1.00 : 0000 0.0 50.0 ndef ndef 0.0 0000
( 0.0 0.0 -32.0 ) ( 500.0 0.0 -32.0 ) ( 0.0 500.0 -32.0 ) wood 0 0 0 1.00 1.00 : 0000 0.0 50.0 ndef ndef 0.0 0000
{
0000
ndef
}
}
0000
ndef
}
}
That's probably just a bit confusing when you first see it. It defines a cube that extends from (-32,-
32,-32) to (32,32,32). Here's what a single line means:
( 0.0 0.0 32.0 ) ( 0.0 500.0 32.0 ) ( 500.0 0.0 32.0 ) wood 0 0 0 1.00 1.00 :
1st point 2nd point 3rd point texture x_offs y_offs angle x_scale y_scale
0000 0.0 50.0 ndef ndef 0.0 0000
flags ambient albedo future expansion – not used yet
Here are more details about those fields:
1st point \ Those three points define a plane, so they must not be colinear.
2nd point > Each plane should only be defined once.
3rd point / Plane normal is oriented towards the cross product of (p1 - p2) and (p3 -p2)
Texture - name of the texture.
X_offs - texture x-offset in pixels
Y_offs - texture y-offset in pixels
1st point \ Those three points define a plane, so they must not be colinear.
2nd point > Each plane should only be defined once.
3rd point / Plane normal is oriented towards the cross product of (p1 - p2) and (p3 -p2)
Texture - name of the texture.
X_offs - texture x-offset in pixels
Y_offs - texture y-offset in pixels