Why don't the lines connect ?

Monkey Forums/Monkey Beginners/Why don't the lines connect ?

Loofadawg(Posted December) [#1]
Import mojo

Class Game Extends App
	'#################
	Method OnCreate () 
	'#################
		'Local mode:DisplayMode = DesktopMode()
		'SetDeviceWindow(mode.Width,mode.Height,1)
		SetDeviceWindow(640,480,1)
		SetUpdateRate 60
	End
	
	'#################
	Method OnUpdate () 
	'#################
		If KeyDown (KEY_ESCAPE) Then EndApp
	End
	
	'#################
	Method OnRender ()
	'#################
		Cls 0, 0, 0
		SetColor 255, 255, 255
		
		For Local y:Float = 0 To 479 Step 32
			For Local x:float = 0 To 639 Step 32 
				DrawLine x, y, x, y+31
				DrawLine x, y, x+31, y
				DrawLine x+31, y, x+31, y+31
				DrawLine x, y+31, x+31, y+31
			Next
		Next
	End
End

Function Main ()
	New Game
End


In Blitz3D they do, but not here. Why is that, and what is the solution ?


SLotman(Posted December) [#2]
Try with #MOJO_IMAGE_FILTERING_ENABLED=False
(put it on top of your code)


Loofadawg(Posted December) [#3]
I added that but I still see the gap. The lower right never fills in the final pixel in each cell of the grid. I am compiling for the desktop game target. But I get the same for HTML5.


rsksenthil(Posted January) [#4]
Changing the step size to 31 or keeping the step size as 32 and changing all the 31 to 32 inside the loop removes the black dot in the lower right of each square.