design_coder

From Esolang
Jump to navigation Jump to search

design_coder is an experimental code and paint tool based on given shapes and a grid that can be programmed with an esoteric programming language. design_coder is based on the design game: design with rules and shapes, decide, try and iterate again. it's time to define visuals by rules, functions and shells! thereby design_coder works like all tools and materials, it also shapes the outcome with.

It is inspired by brainfuck (cell ideas), brainfuckconsole74, jquery and Orca.

design_coder - Painter, shell, programmable (esoteric language)

Designcoding.png

You find the design_coder online at designcoder.and-or.ch/ [1].

Idea

Design is actually a game with forms and rules and their restrictions. design_coder restricts the forms and thus also the possible relationships. Like all tools, design_coder co-writes the created and the possible creativity. Thus the game is closer to the reality of original materials such as multimedia with wood, paper, glass or stone, but can also be programmed. A simple esoteric programming language allows to program visual rules. For example, filters can be set up that apply visual rules, or the graphics change based on sets of rules. All this can be drawn or programmed directly, even in a shell.

Basics

Gridders.png

design_coder is based on the idea that space works in a grid. This idea was used especially in the early days of computer games to design backgrounds or mazes. The history of game design is unthinkable without playfields made of blocks. In analog, there have been blocks with different colors and shapes on each side for a long time. design_encoder, however, allows different shapes on top of each other.

Besides the grid with cells, the whole thing is built on an esoteric programming language. Almost every letter of the alphabet has its own meaning, similar to ORCA. An O is big O, a . is a very small o in the grid. All the cells, the forms and their values.

So every cell can have several forms. The forms can be filled (optional), colored (default color 3).

Example: f3L is a filled rectangle colored red.

You can use design_encoder as a simple painting tool with limited shapes and colors.

Define rules & facts: Esoteric coding language

But you can also extend it and make it a powerful tool. For example, shapes can be generated automatically, rules can be set up which shapes follow which consequences, which shapes overlap which ones. So the painting tool can be extended or completely take over the control of generative graphics.

Possibilities.png

PAINTER: You can define the behaviour of the painter. What happens if you click and add something.

FILTER/TOOLS: You can add new tools/filter.

PRG (Programs): You can create programs, that are creating something or/and you can add filters that were applied while you are painting.

Rules

Condcommand.png

The main structure of the design_encoder programming language is the following.

Rule.png

#SELECTOR ( CONDITION_OPTIONAL ) { COMMANDS }

Example: #a { o > O v _ }

Exp: Go through all #a cells and add first an circle (o), go right and add another circle (O) and then down add a line (_)

#a{L} // add everywhere a gray rect (L)

#a(R01){L} // add 50% a gray rect

#a(L){>fD} // add a halfcircle (filled) if there is an L

#a{BMS} // add random filled colored form.

#a{ymJ} // add everywhere the actual painter filled colored form!

#s{>>>vvvv/K} // add an X at position 3/4

#a{$} // delete in all cells everything

#a{-o} // delete all circles

#a(o){-o} // delete where there is an o the o

#a(R01o){-o} // delete to 50% all os

#a(R01o){-oO} // delete to 50% all os and add bigger Os


Functions, events, programs

You can go further in coding design_encoder. It is possible to define various behaviours or functions. The structure of functions is the following:

Functionzhoh.png

+TYPE'NAME' #SELECTION (CONDITION) {COMMANDS}

+cl'removeit'#c(J){-J} // delete the painted form. so nothing will be added

+cl'random'#c(J){-J S} // add random form

+cl'addcircle'#c(J){-J S} // add big circle


Program

+st'startup'#a(R001){.O} // add at start small circle and circle

+st'loop'#a(.>O){ >_ } // if there is a . next to O, add a _ in the next cell

Examples

Hello world

Graphic output may make Hello World impossible. However, there may be some alternatives.

+be'cellheight'#s{[cellheight=50]}
+be'cellwidth'#s{[cellwidth=50]}

+fi'clear'#a{$}
+im'image'#s{>>>3_>>>>>>>>v%
>3l3_>3l>3l3_>>3l>>3l>3g>3p>>v%
>3l>3l>3l3_>>3l3_>>3l3_>3t>3Q>>v%
v%
>3l>3l>3l>>3l3D>>3l>>3l3p>>v%
>3V>3V>3O>>3l3K>>3l3_>>3l3Q>>v%
v%
}