Author Topic: ASCII Draw(BAM program in progress, QB64 version to follow)  (Read 2556 times)

0 Members and 1 Guest are viewing this topic.

Offline CharlieJV

  • Newbie
  • Posts: 89
ASCII Draw(BAM program in progress, QB64 version to follow)
« on: April 06, 2022, 09:24:54 pm »
Very early stages, throwing out there for those interested.

BASIC Anywhere Machine version:

User guide:
  • Brush style: any character on your keyboard (press a key to set the brush to that character at any time)
  • Brush color (foreground and background): pick a color by clicking on it; "f" is foreground, "b" is background, toggle between "f" and "b" by clicking on it

so mouse clicking on "canvas" to draw, mouse clicking on "f" and "b" to toggle whether a color choice applies to foreground or background, and mouse clicking on color to select it.

key press will set the brush to the matching character.

More later !

Offline SierraKen

  • Forum Resident
  • Posts: 1454
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #1 on: April 07, 2022, 05:41:11 pm »
Wow stuff like that is old old school. :) I remember my first online friend made something like that, but the grid was smaller and it wasn't ASCII, instead it was a Sprite Editor, to be used with other games and programs. Nowadays a sprite editor would have to be a bit larger though, because of the larger monitors and better graphics.

Offline CharlieJV

  • Newbie
  • Posts: 89
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #2 on: April 07, 2022, 08:01:46 pm »
Just uploaded a new version of that program.  (links in original post don't change.)

Made the color choices two characters wide instead of one.

changed the "f" and "b" label toggles to "foreground" and "background".

got rid of the brush instructions, which I will add to the intro screen instead.

added intro screen (instructions pending) to ask for character width and height of the canvas.

fixed a problem that caused drawing past either left or right edges of canvas to "wrap" the drawing, even though the mouse is way past the edge of the canvas.

Good times.

On my immediate todo: turn on/off the grid, which will require storing the current drawing to re-render the drawing after toggling the grid.

Then get QB64 version working  (I think mouse-input is the only incompatibility.)

At some point: saving the drawing to something (file? browser localstorage? clipboard?) and loading a previously saved drawing.

Lines? Shapes?  Eraser?  Fill ?  Maybe.

ASCII characters that we don't see on our keyboards (well, unless you have a Vic-20/C64 kind of keyboard ...)


Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #3 on: April 07, 2022, 09:19:36 pm »
Ken was working on pretty good paint program some time ago, including a picture save.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #4 on: April 09, 2022, 08:13:11 pm »
Yeah, here's Paint Pixels 7, before I got into using window menus. I can't seem to find 8 or 9 on this forum, but I'll put 9 up after this post if you are interested.

https://qb64forum.alephc.xyz/index.php?topic=1992.msg112372#msg112372

Offline SierraKen

  • Forum Resident
  • Posts: 1454
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #5 on: April 09, 2022, 08:20:25 pm »
Here is my Paint Pixels 9. It might take awhile to learn, maybe you can learn sections at a time if you want to. It's been a couple years since I made this, using help from this forum, so I myself would have to relearn some of it. It is attached as Paint Pixels 9.zip
Put all the files in the same directory.


* Paint Pixels 9.zip (Filesize: 479.57 KB, Downloads: 93)
« Last Edit: April 09, 2022, 09:27:09 pm by SierraKen »

Offline CharlieJV

  • Newbie
  • Posts: 89
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #6 on: April 09, 2022, 08:38:31 pm »
I've got QB64 running on Linux, and can't get these to work.

Could it be that these programs were built for Windows ?

Offline SierraKen

  • Forum Resident
  • Posts: 1454
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #7 on: April 09, 2022, 08:44:08 pm »
Ah yeah, I know 9 won't work because it uses Windows internal commands. I would think 7 should work though, but I don't know hardly anything about Linux. Sorry they aren't much use. If you want, you can just look at the code and see how I used variables and circles and boxes, etc. You can break it apart if you wish and put it in your own code, etc.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #8 on: April 09, 2022, 08:49:28 pm »
I know Linux is strict about upper and lower case file names.

I just looked at old thread and it seems the Paint Box or Orbits needs a 2 click system one to start and one to stop, otherwise the start of next was the end of the other. Don't know what version 9 is doing.

 
image_2022-04-09_205539889.png


Plus a problem with saveimage.bm, it is not updated to QB64 v 2.0+ using a Function name as a temp variable is no longer valid.

« Last Edit: April 09, 2022, 08:57:18 pm by bplus »

Offline CharlieJV

  • Newbie
  • Posts: 89
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #9 on: April 09, 2022, 08:55:18 pm »
I know Linux is strict about upper and lower case file names.

I just looked at old thread and it seems the Paint Box or Orbits needs a 2 click system one to start and one to stop. Don't know what 9 is doing.

Yeah, those were annoying but easy to fix.

COMDLG32 is a Windows DLL file.  So I can't see this program working on my computer.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #10 on: April 09, 2022, 08:59:01 pm »
Yeah, those were annoying but easy to fix.

COMDLG32 is a Windows DLL file.  So I can't see this program working on my computer.


Oh they used that too! Yep you're right!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #11 on: April 09, 2022, 09:05:37 pm »
The color picker and Paint3 subs (my contributions) pretty useful as well as save image code, wouldn't be hard to fix, Steve may have already!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • Steve’s QB64 Archive Forum
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #12 on: April 09, 2022, 09:16:58 pm »
The color picker and Paint3 subs (my contributions) pretty useful as well as save image code, wouldn't be hard to fix, Steve may have already!

https://qb64forum.alephc.xyz/index.php?topic=1651.0 Latest version works just fine with the changes to Function.  Just update your library.  ;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
Re: ASCII Draw(BAM program in progress, QB64 version to follow)
« Reply #13 on: April 09, 2022, 09:29:56 pm »
BTW I am talking about this color picker, in version 6/7? I think they changed to image later?
 
image_2022-04-09_212952330.png