ASDL: Enable graphic programming when no other ways are easily viable

tosh1 pts0 comments

GitHub - NuxTuxSux/ASDL: A simple program to enable graphic programming when no other ways are easily viable · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

NuxTuxSux

ASDL

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>8 Commits<br>8 Commits

examples

examples

ASDL.cpp

ASDL.cpp

LICENSE

LICENSE

README.md

README.md

TODO.md

TODO.md

asdl.k

asdl.k

bs.gif

bs.gif

compile

compile

View all files

Repository files navigation

ASDL

A (very) simple program to enable graphic programming when no other ways are easily viable.

It works listening on two local ports: one for custom graphic commands and the other for sending events.<br>I am primarly developing it to enable simple games/graphic programming in K and APL.

Any contribution is welcomed :)

Currently accepted commands:

]: Begin (and clear) frame to render

SC r g b: Set drawing color

DL x_1 y_1 ... x_n y_n: Draw line(s)

FR x_1 y_1 w_1 h_1 ... x_n y_n w_n h_n: Fill rect(s)

FC x_1 y_1 r_1 ... x_n y_n r_n: Fill circle(s)

Ports:

12345: Waits for graphic commands

12346: Sends keystrokes

Example program (in ngn/k)

x+y;x>y]} / bounces

upd:{cts::&[res-\:/:rs;]rs|cts+vs;vs::a+/:vs*bv'[cts+vs;rs]}<br>main:{upd[];BF[];dB'[cls;_cts,'_rs];EF[]}

100 main/0n">\l asdl.k

res:1024 768<br>a:0 3.0 / acceleration<br>rrng:20 50 / radii range<br>n:200 / n. of balls<br>cls:(n;3)#*[3;n]?255 / colors<br>rs:rrng[0]+n?-/|rrng / radii<br>cts:+n?/:res / initial centers<br>vs:8*(n;2)#-0.5+?n*2 / velocities

dB:{SC@x;FC@y} / draw ball<br>bv:{-1 1@/:&[res>x+y;x>y]} / bounces

upd:{cts::&[res-\:/:rs;]rs|cts+vs;vs::a+/:vs*bv'[cts+vs;rs]}<br>main:{upd[];BF[];dB'[cls;_cts,'_rs];EF[]}

100 main/0n

About

A simple program to enable graphic programming when no other ways are easily viable

Resources

Readme

License

GPL-3.0 license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

C++<br>100.0%

You can’t perform that action at this time.

asdl graphic reload enable programming search

Related Articles