Not a newbie to basic (hacked a few things together with Amos on the Amiga years ago) but new to AGK.
I'm trying to draw a 3x3 display on my screen, three squares of equal dimensions filling the screen horizontally, and taking up the same amount of space vertically. I am using the default SetDisplayAspect(0.66) from the wizard.
I have drawn the sprites like so:
for block_counter = 1 to 9
createsprite(block_counter,0)
next
for block_counter = 1 to 9
setspritesize(block_counter,getvirtualwidth()/3,-1)
next
and have set each with a unique colour.
However, positioning them is confusing as heck for me.
I am setting the first row of three squares like this:
setspriteposition(1,(getvirtualwidth()/3)*0,0)
setspriteposition(2,(getvirtualwidth()/3)*1,0)
setspriteposition(3,(getvirtualwidth()/3)*2,0)
and this is working fine. However, dealing with the vertical positioning of row two and three is just
for me.
Could someone give me an example of calculating the vertical position so that row two sits directly below row one (with no gap) and row three sits directly below row two, of course maintaining the size and aspect of the squares?
Thanks!