Author Topic: ASCII characters  (Read 3284 times)

0 Members and 1 Guest are viewing this topic.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
ASCII characters
« 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
Logic is the beginning of wisdom.

FellippeHeitor

  • Guest
Re: ASCII characters
« Reply #1 on: September 18, 2020, 06:50:51 am »
Yes.

Let me find Cobalt's post with the code, one moment.

FellippeHeitor

  • Guest
Re: ASCII characters
« Reply #2 on: September 18, 2020, 06:53:19 am »

FellippeHeitor

  • Guest
Re: ASCII characters
« Reply #3 on: September 18, 2020, 08:54:01 am »
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.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: ASCII characters
« Reply #4 on: September 18, 2020, 10:33:33 am »
From my testing, you can PSET letters faster than you can PRINT them.  ;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: ASCII characters
« Reply #5 on: September 18, 2020, 10:47:17 am »
I was completely ignorant to this, haha. Makes sense though from a perspective of unified graphics.
You're not done when it works, you're done when it's right.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: ASCII characters
« Reply #6 on: September 18, 2020, 11:24:21 am »
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
« Last Edit: September 18, 2020, 01:20:39 pm by bplus »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: ASCII characters
« Reply #7 on: September 18, 2020, 02:07:21 pm »
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
« Last Edit: September 18, 2020, 02:21:09 pm by SMcNeill »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: ASCII characters
« Reply #8 on: September 18, 2020, 06:37:57 pm »
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*
Logic is the beginning of wisdom.