At the other end of the spectrum to Mario kart development,
Here I am making a dice game from 1965.
Called click!
Click
Re: Click
Here is some ZX basic code that draws a box using graphic mode.
This example would draw a rectangle:
so this is box(x1,y1,x2,y2) specifying the top left and bottom right coroner of you box.
This example would draw a rectangle:
Code: Select all
box(5,5,10,20)
Code: Select all
sub box(x1 as ubyte, y1 as ubyte,x2 as ubyte, y2 as ubyte)
for z = 1 to x2-x1
print at x1+z,y1 ;"\: "
next
for z = 1 to x2-x1
print at x1+z,y2 ;"\ :"
next
for z = 1 to y2-y1
print at x1,y1+z ;"\''"
next
for z = 1 to y2-y1
print at x2,y1+z ;"\.."
next
print at x1,y1;"\:'"
print at x1,y2;"\':"
print at x2,y1;"\:."
print at x2,y2;"\.:"
end sub
Re: Click
Another little zx basic snippet.
This uses plot and line to draw a square. You provide the x and y of the squares corner, and the side length in pixels.
The thing that caught me out was that in zx basic plot x= 0 is the bottom left of the screen.
This uses plot and line to draw a square. You provide the x and y of the squares corner, and the side length in pixels.
The thing that caught me out was that in zx basic plot x= 0 is the bottom left of the screen.
Code: Select all
sub square (x1 as ubyte, y1 as ubyte, s as ubyte)
plot y1,x1
draw 0,s
draw s,0
draw 0,-s
draw -s,0
end sub