News:

Welcome to RetroCoders Community

Main Menu

Tessellation with randomly generated graphics characters

Started by CharlieJV, May 09, 2023, 03:15 AM

Previous topic - Next topic

ZXDunny

Very nice Charlie. I like the way you define your characters - I'm gonna see how this can be done in SpecBAS.

ZXDunny

And here it is:



Not as pretty as your listing with your unicode labels :D
The main meat here I guess is the character definition code which is markedly different. SpecBAS stores its font(s) in memory banks.

The FONTBANK function returns the memory bank ID that holds the current font - so we set up a loop of 64 (once for each pixel in a character) at the address of the UDG "a" - there are 128 characters with 128 alternates (or "UDG"s) which is a hold-over from how the original Spectrum used to manage things.

So we POKE the fontbank, inc/decrementing the two address vars (one points to "a" the other to the "b") to get the mirrored characters you create in your example.

Then we just PRINT a load of strings from the P$() array, similarly to yours, scaling up to 5x5 pixels (though I don't do Bilinear filtering).

That was a lovely exercise, thanks :)



CharlieJV

Holy smokes, you did not waste any time churning that out.

Them Unicode characters in my code, that's something I've been experimenting with as visual cues to help me quickly find what I'm looking for and identify the pieces.

Kind of like how bulleted lists and larger font headings help identify the parts in a large chunk of text.

There seems to be far from universal appeal for this, so it is a game of finding that sweet spot in which I accommodate my needs without alienating folk.

Then again, the negative reactions are a bit of cheap entertainment...

Folk suggesting I use comments, blank lines, and tabs: that's precious.

* "Hey, I don't like these unicode characters."
* "My code, princess.  When hell freezes over and we collaborate on some code, we can discuss."

ZXDunny

Quote from: CharlieJV on May 09, 2023, 12:26 PMHoly smokes, you did not waste any time churning that out.

Well, your code was very clear and easy to understand. Once you know how something was done, implementation is usually pretty simple.

QuoteThem Unicode characters in my code, that's something I've been experimenting with as visual cues to help me quickly find what I'm looking for and identify the pieces.

Then again, the negative reactions are a bit of cheap entertainment...

I'm sorry, what? How can anyone object to using Unicode glyphs in code - in a BASIC interpreter for that matter? My friend they are bloody brilliant and make the listing so much more fun (and easy) to follow.

You just keep doing you.

CharlieJV

Quote from: ZXDunny on May 09, 2023, 12:31 PMI'm sorry, what? How can anyone object to using Unicode glyphs in code - in a BASIC interpreter for that matter? My friend they are bloody brilliant and make the listing so much more fun (and easy) to follow.

Although I had no tension in my neck and shoulders, that somehow cranked the loosey-gooseyness up a couple of notches: like extra relaxed from the base of my skull right all the way to the palms of my hands.

"Fun".  I'm thinking there are way too many folk who've lost touch with playing and having fun.

I get scratter-brained easily, so I carefully manage distractions.  Man o' man, do I ever like a little dose of cutesy here and there to make me smile and knock any sour-puss inklings right out o' me.

CharlieJV

Quote from: CharlieJV on May 09, 2023, 03:15 AM



Arg! I'm totally addicted to the thing.

I wanted to grab a screenshot sample, and I'm finding every new pattern just as wildly interesting as the previous one.

You cannot view this attachment.
You cannot view this attachment.
You cannot view this attachment.   


ZXDunny

Have you considered the /\ pseudo-maze? If you can floodfill, then that gets really fun really quick.

CharlieJV

Quote from: ZXDunny on May 09, 2023, 05:39 PMHave you considered the /\ pseudo-maze? If you can floodfill, then that gets really fun really quick.

Just to make sure I'm not going down the wrong rabbit hole of overthinking ...

You mean like the Commodore 64 BASIC
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
?

ZXDunny

Yes indeed! There's a lot of fun to be had, such as this:



or this:



And if you're really brave you can do this:



But that's a real headache to figure out :D

CharlieJV

Quote from: ZXDunny on May 09, 2023, 10:18 PMYes indeed! There's a lot of fun to be had, such as this:



or this:



And if you're really brave you can do this:



But that's a real headache to figure out :D

Yeah, I'm right skittish around that last one, but those first two I enjoy the look of them something silly.