QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: johnno56 on September 18, 2020, 06:27:58 am
-
A quick question.
Does QB64 have the ability to temporarily redefine acsii characters? The old BBC Micro, Amstrad and I think the ZX Spectrum could redefine an 8x8 character. I think it was done that way because it would have been quicker to "print" a character than plot 64 pixels... I could be wrong... Just need to know if QB64 can do the same? If so how?
J
-
Yes.
Let me find Cobalt's post with the code, one moment.
-
There: https://www.qb64.org/forum/index.php?topic=2911.0
-
Although cumbersome, it ends up being more practical to just use PRINT instead of PSET in a loop. However, just so you know, PRINT does use PSET internally anyway. That means there's likely no increase in performance at all.
-
From my testing, you can PSET letters faster than you can PRINT them. ;)
-
I was completely ignorant to this, haha. Makes sense though from a perspective of unified graphics.
-
Character Editor:
Create your own set of characters from ASCII, they are drawn so can scale sizes. Code can be adapted to 8X8 if anyone interested.
https://www.qb64.org/forum/index.php?topic=498.msg3498#msg3498
and it wouldn't be hard at all to devise a special "print" command for them!
and it wouldn't be hard to devise special Color command for them either.
;-)) EDIT: I suppose it doesn't inspire confidence if I don't know how to spell ASCII
-
https://qb64.freeforums.net/thread/37/custom-routines-supports-textures-shading
In the demo above, we map characters to a graphic array, and PSET them to screen, according to our textures, shading, or whatnot — and it’s quite a bit faster than PRINT or _PRINTSTRING. QB64’s PRINT is a very slow processing command, from my experience.
https://i.ibb.co/SmMSc76/Custom-Text2-08-01-09-20-07.jpg
-
Thanks guys. So, that is a 'yes', to redefining ASCII characters? Cool
Steve, back in the mid-80's when I owned an Amstrad, CPU's were maybe 3 to 4 mhz. Watching how painfully slow it drew circles (not filled), printing then was faster... Back then, if I wanted multiple colours, each colour would be layered... slowed the beast down a bit, but coloured none the less... I miss my old Amstrad... *sigh*