VaelisDocs
v1.0.0
Concepts · v1.0.0

Coordinate system & conventions

The signs, units, axes, rotation conventions and reference-resolution rules that prevent common Vaelis scripting mistakes.

View as Markdownllms.txt
Core conventionVaelis is a 2D screen-style coordinate system: +X is right and +Y is down. Treat Y signs accordingly when writing movement, offsets, camera/UI positioning, and physics examples.

#Transform axes

ValuePositive directionCommon use
xRightHorizontal world movement and placement.
yDownVertical placement; jumping/falling code should use negative/positive signs according to the movement system being used.
zDepth layer / pseudo-3D inputAffects pseudo-3D rendering only when the camera’s pseudo-3D behavior is enabled.
rotationDegrees around ZUsed by sprites, lights and directional orientation; 0 points along +X for directional/spot style aiming.
scaleX / scaleY1 = native sizeValues above 1 enlarge; values below 1 shrink; negative values mirror the axis.

#UI coordinates

Screen-space Text, TextInput, ChatLog and Joystick components use the reference-resolution pixel convention supplied by the Camera/device-fit pipeline. This is why HUD coordinates remain stable when the physical device resolution changes.

#Angles and vectors

Vector-like APIs use ordinary JavaScript objects such as {x, y}. When converting a direction to an angle, remember that the canvas/world Y axis points downward, so visually “up” is negative Y.

#Timing

ConceptMeaning
time.deltaTimeSeconds since the previous script update; multiply speeds expressed per second by deltaTime.
wait(seconds,...)Wall-clock game/script timer in seconds.
repathIntervalNavigation re-plan period in seconds.