I have this at the moment, but it's not perfectly symmetrical. Is there anything I can do to get this more symmetrical?
set display mode 1152,864,16
sync on
type hex
a as integer
b as integer
c as integer
x as float
y as float
xvel as float
yvel as float
endtype
hide mouse
dim hexagon(1000) as hex
Dim centre(700,2) as integer
global startx as float = 1.0
global starty as float = 1.0
global sidelength as float = 30.0
curx as float = startx-sidelength
cury as float = starty-sidelength
switch as integer = 0
switch2 as boolean = 0
global exn as float = 700.0
Load Image "Cursor.jpg",1
Load Image "Temperature.jpg",2
Lock = 1
mindist = 1000
set sprite 1,1,0
set sprite 2,1,0
do
sprite 2, screen width()-100,0,2
cls
exn=screen width()
starty=Screen height()
curx = startx-sidelength*2
cury = 30
switch as integer = 1
switch2 as boolean = 1
Count = 1
for a=1 to 1000
if switch=1
switch=0
inc curx,2*sidelength
Centre(Count,1) = curx - ((sidelength+(sprite width(1)/2)))
Centre(Count,2) = cury - (sprite Height(1)/2)
Inc count
else
switch=1
inc curx, sidelength
endif
if curx>exn
if switch2=0
switch2=1
switch=0
inc cury,sidelength*sqrt(3)/2
curx=startx
else
switch=1
switch2=0
inc cury,sidelength*sqrt(3)/2
curx=startx-sidelength/2
endif
endif
hexagon(a).x=curx
hexagon(a).y=cury
If lock = 1
inc i
if i > 400 then i = 1
if abs(mousex()- centre(i,1)) < sidelength-6 and abs( mousey()- centre(i,2)) < sidelength-6
if mousex() + ((sidelength)-6) >= centre(i,1) then X3 = centre(i,1)
if mousey() + ((sidelength)-6) >= centre(i,2) then Y3 = centre(i,2)
if mousex() - ((sidelength)-6) <= centre(i,1) then X3 = centre(i,1)
if mousey() - ((sidelength)-6) <= centre(i,2) then Y3 = centre(i,2)
Endif
else
X3 = Mousex()
Y3 = Mousey()
Endif
dx#=0
dy#=0
if spacekey()
f#=1/sqrt((hexagon(a).x-x3)^2+(hexagon(a).y-y3)^2)`*rnd(1)
dx#=(hexagon(a).x-x3)*f#*-100
dy#=(hexagon(a).y-y3)*f#*-100
endif
dot hexagon(a).x+dx#,hexagon(a).y+dy#
next a
sprite 1,x3,y3,1
sync
loop