'Initialization
Dim sizeX = 60 As Int
Dim sizeY = 40 As Int
Dim gridSize = 10 As Int
'Cache
Dim halfGridSize = gridSize / 2 As Float
'There's no need to cache lastX and lastY for the For cycle.
'If you're using a Do While Loop Until cycle however, it's a different story.
'Main Cycle
For x = halfGridSize To (sizeX * gridSize) Step gridSize
For y = halfGridSize To (sizeY * gridSize) Step gridSize
cvs.DrawCircle(x, y, halfGridSize, fx.Colors.Red, True, 0) 'Only one instruction, whoohooo!!!
Next
Next