🆕 _GETCHR$ get string representation of 8x8 pixels for ascii code character

Started by CharlieJV, Apr 28, 2023, 01:28 AM

Previous topic - Next topic

CharlieJV

An example of some interesting possibilities that are now in easy reach:

You cannot view this attachment.

johnno56

I have not as yet attempted the putstring$() command, but I have been tinkering with GETCHR$()... I took the liberty of modifying the "skier" in the ski challenge. Created 3 simple sprites. two parallel vertical lines (no left or right movement); two left-facing parallel lines (left movement)... you get the rest... and it worked very well. Did not save it as it was only a test... But the potential is there...
May your journey be free of incident.  Live long and prosper.

CharlieJV

Good stuff!  Thanks for trying that out.

Character graphics have an old-school charm, which I enjoy maybe because that simplicity gets the job done without being overwhelming.  Not sure how to explain it.

I like this idea of being able to take character graphics to a "next level" without losing that old-school appeal.

Something like that.


johnno56

Here is a converted Amstrad program that used the "symbol" command to redefine the characters.

The program creates and controls the movement of a 2x2 tile sprite. I thought there might be some lag or jittering but, as you can see, the sprite moves fine.

Use A,Z and , . to move. s to stop. That's it. It does nothing else.

10 SCREEN 0: width 40, 25
20 PRINT"You can now guide the creature using the";
21 PRINT "'a' and 'z' keys to move it up and down,";
22 PRINT "and the and '.' keys to move it left and";
23 PRINT "right."
25 PRINT:PRINT"Press 's' to stop."
30 Print "Press ENTER when ready. ";: INPUT reply$
40 cls

'	original Amstrad symbols for chr$'s 240-243
'SYMBOL 240,3,3,15,15,63,63,243,243
'SYMBOL 241,192,192,240,240,252,252,207,207
'SYMBOL 242,255,255,255,255,204,204,204,204
'SYMBOL 243,255,255,255,255,51,51,51,51

_LETCHR$(0, _
    "......XX" + _
    "......XX" + _
    "....XXXX" + _
    "....XXXX" + _
    "..XXXXXX" + _
    "..XXXXXX" + _
    "XXXX..XX" + _
    "XXXX..XX")
_LETCHR$(1, _
    "XX......" + _
    "XX......" + _
    "XXXX...." + _
    "XXXX...." + _
    "XXXXXX.." + _
    "XXXXXX.." + _
    "XX..XXXX" + _
    "XX..XXXX")
_LETCHR$(2, _
    "XXXXXXXX" + _
    "XXXXXXXX" + _
    "XXXXXXXX" + _
    "XXXXXXXX" + _
    "XX..XX.." + _
    "XX..XX.." + _
    "XX..XX.." + _
    "XX..XX..")
_LETCHR$(3, _
    "XXXXXXXX" + _
    "XXXXXXXX" + _
    "XXXXXXXX" + _
    "XXXXXXXX" + _
    "..XX..XX" + _
    "..XX..XX" + _
    "..XX..XX" + _
    "..XX..XX")

45 top$ = CHR$(0) + CHR$(1)
46 bottom$ = CHR$(2) + CHR$(3)
51 REM set up start position
60 xcoord = 10
70 ycoord = 12
80 newxcoord = 10
90 newycoord = 12
100 color 11,0
110 '
120 CLS
'
'	NOTE: Issuing a "SCREEN" command AFTER the characters have
'				been defined, will reset to their original definition.
'
130 response$ = ""
140 continued = 1
150 WHILE response$ <> "s"
151 REM scan keyboard
160 response$ = LCASE$(INKEY$)
161 REM update creature's position - check it's not off-screen
170 IF response$ = "a" AND ycoord > 1 THEN newycoord = ycoord - 1
180 IF response$ = "z" AND ycoord < 23 THEN newycoord = ycoord + 1
190 IF response$ = "," AND xcoord > 1 THEN newxcoord = xcoord - 1
200 IF response$ = "." AND xcoord < 38 THEN newxcoord = xcoord + 1
201 REM if movement key has been pressed, print blank in old position
210 IF response$ <> "" AND response$ <> "s" THEN
				LOCATE ycoord, xcoord
				PRINT "  "
				LOCATE ycoord + 1, xcoord
				PRINT "  ":xcoord = newxcoord
				ycoord = newycoord
		end if
211 REM print creature
220 LOCATE ycoord, xcoord
230 PRINT top$
231 LOCATE ycoord + 1, xcoord
232 PRINT bottom$
240 WEND
250 _DELAY 1
260 CLS: END

I will search for some more 'interesting' character-type programs. As this test seemed to work well, why not something a little more complex? Moo Ha Ha Ha...
May your journey be free of incident.  Live long and prosper.