ATOMIC AI PIXEL ART SPEC (EN) SCOPE RULE: This document defines the complete and binding pixel art drawing system of the Atomic language. RULE: All rules defined here are mandatory. RULE: No pixel art behavior exists outside this specification. PIXEL ART COMMAND RULE: Atomic provides a dedicated command for pixel art rendering. RULE: The pixel art command is: disegna pixel art --> (ARGUMENT: value) RULE: This command does not return any value. PIXEL ART MODEL RULE: Pixel art in Atomic is based on a logical grid. RULE: The logical grid is independent from the physical screen pixels. RULE: Each logical cell represents a single logical pixel. RULE: Pixel art is declarative. GRID DIMENSIONS RULE: A pixel art is defined by a rectangular grid. RULE: The grid dimensions are defined using: LARGHEZZA (number of columns) ALTEZZA (number of rows) RULE: The total number of logical pixels is: LARGHEZZA multiplied by ALTEZZA. RULE: LARGHEZZA and ALTEZZA are numeric values. POSITIONING RULE: Pixel art supports positioning arguments: X Y RULE: X defines the horizontal position in window pixels. RULE: Y defines the vertical position in window pixels. RULE: X and Y are optional. RULE: If omitted, default values are used. COLOR DEFINITIONS RULE: Pixel art colors are defined using symbolic letter labels. RULE: At most 16 colors may be defined. RULE: Valid color labels are: A B C D E F G H I J K L M N O P RULE: Each letter is associated with a color value using arguments: COLORE A COLORE B COLORE C … COLORE P RULE: The value "trasparente" is a valid color. RULE: Transparent pixels do not draw anything. PIXEL ART DRAWING DATA RULE: The pixel art drawing is specified using the argument: DISEGNO RULE: The value of DISEGNO is a text string. RULE: The string encodes a linear sequence of pixels. RULE: The encoding format is repetition-based. RULE: Each encoded unit consists of: a number followed by a letter from A to P RULE: The number specifies how many times the color associated with the letter is repeated. RULE: Example semantics: 1A means one pixel of color A 10B means ten pixels of color B RULE: The pixel sequence is interpreted linearly. RULE: No row or column separators exist. WHITESPACE RULES IN DISEGNO RULE: Spaces inside the DISEGNO string are ignored. RULE: Line breaks inside the DISEGNO string are ignored. RULE: Whitespace has no semantic meaning. RULE: Whitespace may be used only for readability. SEQUENCE INTERPRETATION RULE: The pixel sequence is interpreted as a continuous linear stream. RULE: Pixels are placed left to right. RULE: When the current row reaches the defined LARGHEZZA, placement continues automatically on the next row. RULE: Contiguous pixels that exceed the remaining space in a row wrap to the next row. RULE: Pixel placement continues row by row until all encoded pixels are consumed. RULE: Due to the RLE encoding model, missing pixels cannot exist. RULE: Every pixel position reached by the decoding process is explicitly defined by the sequence. RULE: No implicit transparent padding is generated. ADDITIONAL GRAPHICAL ARGUMENTS RULE: The pixel art command supports optional graphical arguments: SCALA ROTAZIONE TRASPARENZA RULE: SCALA defines a scale factor. RULE: ROTAZIONE defines a rotation angle. RULE: TRASPARENZA defines overall transparency. RULE: These arguments apply to the entire pixel art. RULE: These arguments are optional. RULE: Default values are used if omitted. RULE: The default value of SCALE is 25 and converges with the standard window grid size. GENERAL ARGUMENT RULES RULE: Arguments may be specified in any order. RULE: Arguments must not be repeated. RULE: Arguments use default values when omitted. RULE: Argument values may be: numbers constants variables mathematical expressions FORBIDDEN: function calls inside arguments NO STRUCTURAL DATA TYPES RULE: Pixel art does not use: arrays matrices row-based structures column-based structures RULE: The drawing description is purely textual. RULE: Visual formatting of the code does not affect execution. DESIGN PRINCIPLES RULE: Pixel art in Atomic is designed to be: compact readable declarative independent from code formatting FORMAL CLOSURE RULE: The pixel art system of Atomic is limited to what is defined in this document. RULE: Any undocumented pixel art behavior: is invalid is not part of the Atomic language