Coding Club Snake Bite vs. UDG

Post Reply
rinwaldmolly
Posts: 7
Joined: Mon Jul 22, 2024 7:29 pm

Coding Club Snake Bite vs. UDG

Post by rinwaldmolly »

Any ideas on why a UDG versus a standard character would create issues?

I created a UDG 'apple' (CHR$ 145) to replace the letter 'o' in my version of Snake Bite which displays correctly at the start of the game but does not beep when eaten and no subsequent apples appear.

I've experimented with various standard characters (works) and the UDG set (does not work!)

Using Basic on ZX Next
dr beep
Posts: 2349
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Coding Club Snake Bite vs. UDG

Post by dr beep »

How do you test collission? Probable with SCREEN$.

SCREEN$ does not recognize UDG unless you redefine the characterset where you make UDG part of the characterset.
You can also solve this by printing the UDG in a diferent colour and test for the ATTR(Y,X).

ATTR(Y,X) is also faster than SCREEN$(Y,X)
rinwaldmolly
Posts: 7
Joined: Mon Jul 22, 2024 7:29 pm

Re: Coding Club Snake Bite vs. UDG

Post by rinwaldmolly »

I tried assigning chr$ a standard character : let g$ = chr$ (145) but did not work either.

But you are correct it's using SCREEN$ so Will look into ATTR!
dr beep
Posts: 2349
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Coding Club Snake Bite vs. UDG

Post by dr beep »

rinwaldmolly wrote: Mon Jul 29, 2024 1:11 pm I tried assigning chr$ a standard character : let g$ = chr$ (145) but did not work either.
You need to alter 23607 so that the UDG becomes part of the characterset.
Try POKE 23607,254 and test for screen$ = "+", then poke 23607 back to 60

NOTE: THIS IS WITH CHR$ 144

(assuming you use 48K)
rinwaldmolly
Posts: 7
Joined: Mon Jul 22, 2024 7:29 pm

Re: Coding Club Snake Bite vs. UDG

Post by rinwaldmolly »

Eek - have not got into the world of pokes yet but will see what I can do - thank you!
Post Reply