Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QBJS - ANSI Draw
#1
Here's a simple little text-based drawing program.  It originally started as a simple test for the Screen function which was just implemented in version 0.9.0.  It also incorporates some of the extended QBJS functionality which lets your program prompt the browser to upload and download files.

   

No bells and whistles on this one, but you can either draw with the mouse or arrow keys + SPACE or ALT.  You can select both a left button brush and right button brush by clicking the character, foreground color and background color from the palette on the left.

You can save and load your creations in a simple save format (.dat).  You can also save the drawing as an image.

I'm including a link here instead of using the embedded QBJS since browser security rules prevent some of the loading and saving functions when loaded in an iframe.

ANSI Draw
Reply
#2
this is awesome!  thank you for this program.

i was sort of looking for escape key to end program run.  but one could just press "stop" button on qbjs interface.

i would have to change the file format, or provide another "loader" to be able to see again a bunch of "bsave/bload" binary files i still have lying around.
Reply
#3
(01-15-2025, 10:28 PM)dbox Wrote: Here's a simple little text-based drawing program.  It originally started as a simple test for the Screen function which was just implemented in version 0.9.0.  It also incorporates some of the extended QBJS functionality which lets your program prompt the browser to upload and download files.

ASCII Draw

This is awesome!

We might want to take this further! There are loads of programs that draw ANSI but none that do it on the web like this. (yet)

One thing that would really help is mapping F1-F12 keys to characters of our choosing. This is how we text mode artists draw in other programs Smile

Take a look at this screenshot for inspiration. You can see common elements, what I'm showing here are the function keys at top.
[Image: gj-moebius.png]

Well done man!
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply
#4
(Yesterday, 01:01 PM)grymmjack Wrote: This is awesome!

We might want to take this further! There are loads of programs that draw ANSI but none that do it on the web like this. (yet)

One thing that would really help is mapping F1-F12 keys to characters of our choosing. This is how we text mode artists draw in other programs Smile

Thanks @grymmjack!  That's a great suggestion.  I'm sure there are loads of additional features that could be added.  My original goal was a simple technology demo with a UI that was all text based itself.  But you could go nuts, allow for different sized canvases, add web-native controls and menus, flood fill, selections, copy and paste, load standard ANSI file formats, etc.

I'm happy for anyone to take this as a starting point and mod away.
Reply




Users browsing this thread: 2 Guest(s)