SHOW CONTROLS (F1)
HIDE CONTROLS (F1)


                        Everything is work in progress!

                              PRESS ENTER TO START


                             TEXTOR EDITOR CONTROLS
                                                                                
KEY ............................. ACTION                                        
                                                                                
Any ASCII character ............. Type character                                
Arrow keys + Control ............ Move camera                                   
Arrow keys + Shift + Control .... Change characters colors                      
Arrow keys + Shift .............. Resize selection                              
Arrow keys ...................... Move selection                                
Backspace ....................... Hide editor interface                         
Alt + Shift + s ................. Resize and paste                              
Alt + a ......................... Replace selected characters                   
Alt + c ......................... Copy selection                                
Alt + d ......................... On/off step mode                              
Alt + e ......................... Pick character                                
Alt + f ......................... Previous character sheet                      
Alt + g ......................... Next character sheet                          
Alt + h ......................... Highlight character                           
Alt + i ......................... Shrink file height                            
Alt + j ......................... Shrink file width                             
Alt + k ......................... Increase file height                          
Alt + l ......................... Increase file width                           
Alt + m ......................... Load file                                     
Alt + o ......................... Zoom out                                      
Alt + p ......................... Zoom in                                       
Alt + r ......................... Replace selected character colors             
Alt + s ......................... Save file                                     
Alt + u ......................... Invert selected character colors              
Alt + v ......................... Paste copied selection                        
Alt + x ......................... Replace selected characters                   
Alt + y ......................... Redo                                          
Alt + z ......................... Undo                                          
Enter ........................... Compile script                                
Escape .......................... Switch between assets mode and script mode    
Tab ............................. Invert characters colors                      


                             GOULF SCRIPT OPERATORS

                          Non exhaustive documentation

: path                                 h height
; output                               t time
! different                            > superior
" string                               ? condition
# sprite                               @ variable
$ function                             A array
% modulo                               D sprite
& and                                  G argument
( sinus                                I loop iteration index
) cosinus                              K input
* multiply                             R random
+ plus                                 \ loop
, list                                 _ floor
- minus                                f foreground color
/ divide                               g background color
< inferior                             w width
= equal                                | or
d data                                 i data index
x data horizontal position             y data vertical position
^ priority operator


                                : PATH OPERATOR

In Goulf you draw code into tree shape or circuits with ':' operator that link
operators together.

Each character is an operator.

Each operator get input from up, left and right and output its result down.

Some operators need to have specific data incoming to specific input to work.


EXEMPLE
                                  1+1     1+1
                                   :       : 
                                   ::::+:::: 
                                       :     
                                       :     
                                       ;0     

Back to operator index

                               ; OUTPUT OPERATOR 

Output operator compiles the circuit linked to its up input.

Right input await for a number to define compilation mode and output destination.

0 (default) compile circuit only when Enter is pressed and output as log only.

1 compile circuit at each frame and output as log only.

2 compile circuit at each screen character and output its value on each of
theses characters.


EXEMPLE
                 Output red background on each screen character

                                       g1
                                       : 
                                       : 
                                       ;2


EXEMPLE
                         Log time at manual compilation

                                       t
                                       : 
                                       : 
                                       ;0


EXEMPLE
                              Log time each frame

                                       t
                                       : 
                                       : 
                                       ;1

Back to operator index

                              ! DIFFERENT OPERATOR

If result is false (or 0) it will be true, if result is true (or 1) it will be
false.


EXEMPLE
                                       1
                                       !
                                       :
                                       ;0

Back to operator index

                               " STRING OPERATOR

Output the list (not in array form) of the ASCII codes of the characters typed
as its right input.

Stop right input with another '"' operator.


EXEMPLE
                   Put "Hello world" ASCII values in an array

                                       "Hello world"
                                       :
                                       A
                                       :
                                       ;0

Back to operator index

                               # SPRITE OPERATOR

Define a sprite from assets drawn in Textor Editor.

Left input await a two number list to define sprite width and height.

Up input await a two number list to define up and left sprite starting position
within Textor Editor File.

Right input await a number as sprite index.


EXEMPLE
Define a 4x4 sprite starting from x 10 and y 10 of Textor Editor file on index 1312.

                                    4,4 10,10
                                     :    :
                                     :::::#1312
                                          :
                                          ;0


EXEMPLE
                  Draw 1312 sprite at X 6, Y 7 at every frame.

                                   6,7
                                    :
                                    ::D1312
                                      :
                                      ;1

Back to operator index

                              $ FUNCTION OPERATOR

Define a function.

Up input await for a circuit to define the function, if no input is provided
function is called as it is.

Right input await for a number as function index.

Left input await for arguments.


EXEMPLE
     Define a function that add two values given as arguments at index 67.

                                    G0   G1
                                    :    : 
                                    :::+:: 
                                       :   
                                       $67
                                       : 
                                       ;0


EXEMPLE
                    Use function 67 to add 13 and 12 values.

                                    13,12   
                                      :     
                                      :::$67
                                         :  
                                         ;0 


Back to operator index

                               % MODULO OPERATOR

Loop a value into another


EXEMPLE
                Loop time every 3 secondes and log it each frame.

                                      t%3
                                       : 
                                       ;1

Back to operator index

                               & AND OPERATOR

Is true if used inputs are true.


EXEMPLE
Check if two floored looped time both equal 0.

                                  t%4     t%3
                                   _       _ 
                                   :       : 
                                   =0      =0
                                   :       : 
                                   ::::&:::: 
                                       :     
                                       ;1    

Back to operator index

                         ( SINUS AND ) COSINUS OPERATOR

Loop a number between -1 and 1 with a easing/wavy/circular behaviour.


EXEMPLE
                  Move a sprite in a circle of 10 radius size

                                   t      t  
                                   (      )  
                                   *10    *10
                                   _      _  
                                   :,::::::  
                                    :        
                                    ::D1312  
                                      :      
                                      ;1     

Back to operator index

                                , LIST OPERATOR

Output the list (not in array form) from its right input or left input.


EXEMPLE
                        Put 13,12,6,7 values in an array

                                       13,12,6,7
                                       :
                                       A
                                       :
                                       ;0

Back to operator index

                              < INFERIOR OPERATOR

Check if a value is inferior to another


EXEMPLE
                          Check if 6 is inferior to 7

                                       6<7
                                        :
                                        ;0

Back to operator index

                                = EQUAL OPERATOR

Check if a value is equal to another


EXEMPLE
                            Check if 6 is equal to 7

                                       6=7
                                        :
                                        ;0

Back to operator index

                                d DATA OPERATOR

Return the list of all screen character values


EXEMPLE
          Replace each screen character current data value with next.

                                      di+1
                                      :   
                                      ;2  

Back to operator index

                      x DATA HORIZONTAL POSITION OPERATOR

Return the list of current character X position


EXEMPLE
              Draw half left of screen in red, half right in blue

                                        x>w/2
                                     5   :  
                                    4?::::  
                                     :      
                                   g::      
                                   :        
                                   ;2       

Back to operator index

                              ^ PRIORITY OPERATOR

Resolve linked circuit operation in priority (like putting something between
brackets)


EXEMPLE
                                      3+3 
                                       ^  
                                       :/2
                                        : 
                                        ;0

Back to operator index

                               h HEIGHT OPERATOR

Return height of screen (in character lines) 


EXEMPLE
              Draw half down of screen in red, half up in blue

                                        y>h/2
                                     4   :  
                                    5?::::  
                                     :      
                                   g::      
                                   :        
                                   ;2       

Back to operator index

                                t TIME OPERATOR

Return time in seconds.


EXEMPLE
                Loop time every 3 secondes and log it each frame.

                                      t%3
                                       : 
                                       ;1

Back to operator index

                              > SUPERIOR OPERATOR

Check if a value is superior to another


EXEMPLE
                          Check if 6 is superior to 7

                                       6>7
                                        :
                                        ;0

Back to operator index

                              ? CONDITION OPERATOR

Output up input circuit result if right input circuit result is true otherwise
return left input circuit result.


EXEMPLE
              Draw half left of screen in red, half right in blue

                                        x>w/2
                                     5   :  
                                    4?::::  
                                     :      
                                   g::      
                                   :        
                                   ;2       

Back to operator index

                              @ VARIABLE OPERATOR

Define a variable.

Up input await for a circuit to define the variable, if no input is provided
function is called as it is.

Right input await for a number as function index.


EXEMPLE
                   Define a variable that grow up every frame

                                       @0
                                       : 
                                       +1
                                       : 
                                       @0
                                       : 
                                       ;1

Back to operator index

                                A ARRAY OPERATOR

Define an array.

Up input await for a circuit to define the variable, if no input is provided
function is called as it is.

Right input await for a number as function index.


EXEMPLE
                        Put 13,12,6,7 values in an array

                                       13,12,6,7
                                       :
                                       A
                                       :
                                       ;0

Back to operator index

                             D DRAW SPRITE OPERATOR

Draw a sprite.

Left input await a list of two values to define X and Y position of sprite
drawing.

Up input optionally await a circuit to define sprite data


EXEMPLE
Move a sprite in a circle of 10 radius size and increase its data values each
frame.

                                   t      t  
                                   (      )  
                                   *10    *10
                                   _      _  
                                   :,::::::  
                                    :        
                                    : di     
                                    : :      
                                    : +1     
                                    : :      
                                    ::D1312  
                                      :      
                                      ;1     

Back to operator index

                              G ARGUMENT OPERATOR

Output value given at function call.

Right input await for index of agrument.


EXEMPLE
     Define a function that add two values given as arguments at index 67.

                                    G0   G1
                                    :    : 
                                    :::+:: 
                                       :   
                                       $67
                                       : 
                                       ;0


EXEMPLE
                    Use function 67 to add 13 and 12 values.

                                    13,12   
                                      :     
                                      :::$67
                                         :  
                                         ;0 

Back to operator index

                        I LOOP ITERATION INDEX OPERATOR

Return value of current iteration in loop.

EXEMPLE
Move 10 sprite in a circle of 10 radius size with different positions within
circle.

                                   t+I*5  t+I*5
                                   (      )  
                                   *10    *10
                                   _      _  
                                   :,::::::  
                                    :        
                                    ::D1312  
                                      :      
                                      \10    
                                      :      
                                      ;1     

Back to operator index

                                K INPUT OPERATOR

Return value of specific input according to right input value.

 0 Escape                              15 mouseY
 1 Delete                              16 mouseDown
 2 Backspace                           17 osc_total
 3 Tab                                 18 osc_midinote
 4 Enter                               19 osc_cycle
 5 Shift                               20 osc_sound
 6 Control                             21 osc_amp
 7 Meta                                22 osc_begin
 8 Alt                                 23 osc_freq
 9 AltGraph                            24 osc_gain
10 ArrowUp                             25 osc_glitch
11 ArrowRight                          26 osc_kickfreq
12 ArrowDown                           27 osc_pan
13 ArrowLeft                           28 osc_speed
14 mouseX

32-127 ASCII printable characters keys

Back to operator index

                                R INPUT OPERATOR

Return random value.

Right input optionally await for number to return fix stored random value.

Back to operator index

                                \ LOOP OPERATOR

Loop circuit linked to up input.

Right input define number of iterations.

Left input optionnally wait for 0 or 1, additionning or replacing loop result.


EXEMPLE
Move 10 sprite in a circle of 10 radius size with different positions within
circle.

                                   t+I*5  t+I*5
                                   (      )  
                                   *10    *10
                                   _      _  
                                   :,::::::  
                                    :        
                                    ::D1312  
                                      :      
                                      \10    
                                      :      
                                      ;1     

Back to operator index

                                _ FLOOR OPERATOR

Round linked circuit to nearest lower integral value.

Back to operator index

                          f FOREGROUND COLOR OPERATOR

Add value corresponding to foreground color table in Textor encoding.

Exemple
          Draw red hashtag on blue background on every cell of screen

                                       f4
                                       :
                                       +g5
                                       :
                                       +35
                                       :
                                       ;2

Back to operator index

                          g BACKGROUND COLOR OPERATOR

Add value corresponding to background color table in Textor encoding.

Exemple
          Draw red hashtag on blue background on every cell of screen

                                       f4
                                       :
                                       +g5
                                       :
                                       +35
                                       :
                                       ;2


Back to operator index

                                w WIDTH OPERATOR

Return screen width (in characters).


EXEMPLE
              Draw half left of screen in red, half right in blue

                                        x>w/2
                                     5   :  
                                    4?::::  
                                     :      
                                   g::      
                                   :        
                                   ;2       

Back to operator index

                               | OR OPERATOR

Is true if any of used inputs are true.


EXEMPLE
                Check if any of two floored looped time equal 0.

                                  t%4     t%3
                                   _       _ 
                                   :       : 
                                   =0      =0
                                   :       : 
                                   ::::|:::: 
                                       :     
                                       ;1    

Back to operator index

                             i DATA INDEX OPERATOR

Return current data index.


EXEMPLE
          Replace each screen character current data value with next.

                                      di+1
                                      :   
                                      ;2  


Back to operator index

                      y DATA VERTICAL POSITION OPERATOR

Return the list of current character Y position


EXEMPLE
              Draw half down of screen in red, half up in blue

                                        y>h/2
                                     4   :  
                                    5?::::  
                                     :      
                                   g::      
                                   :        
                                   ;2