Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BAM: _LETCHR$ and _GETCHR$
#14
(05-09-2023, 07:55 PM)CharlieJV Wrote:
(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.

...

Now for chunk 2:

Code: (Select All)
  PrintTiles:
        ptrn% = INT(RND*3)
        FOR i = 1 TO 80
            SELECT CASE ptrn%
              CASE 0
                PRINT CHR$(0) + CHR$(0) + CHR$(1);
              CASE 1
                PRINT CHR$(0) + CHR$(1) + CHR$(0);
              CASE 2
                PRINT CHR$(1) + CHR$(0) + CHR$(0);
            END SELECT
        NEXT i
    RETURN


Not much special here.  Print (note the semi-colon to do no carriage return) groups of three characters 80 times.

In another bit of code, the first line is made to be blank.  3 characters 80 times, 240 characters in all.  At 20 characters per row, 12 rows of characters.  (screen being 160 pixels wide by 112 pixels tall.  Reference: BAM's screen modes.)

Code: (Select All)
SCREEN _NEWIMAGE(160, 112, 14)

Before going into the loop, we pick a pattern to use (0, 1, or 2).

I like the "rule of thirds" in photography, so each pattern has the "diagonal-flippy character" once, and the other two characters are the straight generated one.

The idea here is to make sure that however number of characters in the pattern, the total number of character-width of the screen cannot be divided neatly (i.e. there will be a remainder) by the number of characters in the pattern.  So we never have a column of text with the one character repeated throughout.  That makes for a more interesting pattern.
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,991 11-07-2023, 10:27 PM
Last Post: James D Jarvis
  BAM: New version CharlieJV 0 491 06-29-2023, 02:22 AM
Last Post: CharlieJV
  BAM App Personalizer (a GUI to personalize BAM programs) CharlieJV 0 478 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: 1 Guest(s)