Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BAM: _LETCHR$ and _GETCHR$
#11
(05-09-2023, 07:22 PM)bplus Wrote: Oh yours looks like tiling on a slant, with pixel offsets?, as opposed to filling "character cells" straight up and down or across fills.

I will try that...

Do you suppose an 8x8 cell is ideal for neat looking designs? Is you Random fill 50/50?

That should be an easy question to answer, but I'm struggling.

Maybe we can get somewhere by analysing the code in chunks.

Code: (Select All)
CreateGraphicsChars:
        c$ = "" : d$ = ""
        FOR i = 1 TO 64
            p$ = defPixel$()
            c$ = c$ + p$
            d$ = p$ + d$
        NEXT i
        _LETCHR$(0, c$) : _LETCHR$(1, d$)
    RETURN

Every image is created with two custom 8x8 characters.

The first character, each pixel is randomly set on or off.  The second character is the equivalent of result of flipping the first character on the vertical axis and again on the horizontal axis.

The _LETCHR$ function will assign a new character to the identified ASCII code, and based on the specification in the 64-character string parameter.  (One character per pixel, "X" meaning pixel on, "." meaning pixel off.

So the subroutine above creates two strings, first one to generate a new character for ASCII code 0, the second one (diagonal flippy of the first) assigned to ASCII code 1.

50-50 chance of a pixel being turned on:

Code: (Select All)
FUNCTION defPixel$()
  defPixel$ = "."
  IF INT(RND*2) = 1 THEN defPixel$ = "X"
END FUNCTION


Let's make sure all of that makes sense, then we can look at the next thing.
Reply


Messages In This Thread
BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 04-28-2023, 01:40 AM
RE: BAM: _LETCHR$ and _GETCHR$ - by mnrvovrfc - 04-28-2023, 01:55 AM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 04-28-2023, 02:08 AM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 04-28-2023, 02:48 AM
RE: BAM: _LETCHR$ and _GETCHR$ - by bplus - 04-28-2023, 11:02 AM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 04-28-2023, 10:17 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 05-09-2023, 03:34 AM
RE: BAM: _LETCHR$ and _GETCHR$ - by bplus - 05-09-2023, 12:52 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 05-09-2023, 04:29 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by bplus - 05-09-2023, 07:22 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 05-09-2023, 07:55 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 05-09-2023, 08:58 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by mnrvovrfc - 05-09-2023, 08:02 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 05-09-2023, 08:44 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by bplus - 05-09-2023, 09:41 PM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 05-10-2023, 12:49 AM
RE: BAM: _LETCHR$ and _GETCHR$ - by CharlieJV - 05-10-2023, 02:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  BAM Draw CharlieJV 9 1,979 11-07-2023, 10:27 PM
Last Post: James D Jarvis
  BAM: New version CharlieJV 0 488 06-29-2023, 02:22 AM
Last Post: CharlieJV
  BAM App Personalizer (a GUI to personalize BAM programs) CharlieJV 0 477 01-06-2023, 03:48 AM
Last Post: CharlieJV
  BAM FIX: disappearing BAM menu bar on mobile web browsers CharlieJV 0 474 12-11-2022, 07:00 PM
Last Post: CharlieJV
  BAM Features Set: "Powerwash", "BAM System Update", "TW System Update" CharlieJV 1 742 11-10-2022, 05:16 AM
Last Post: CharlieJV

Forum Jump:


Users browsing this thread: