how do you make a sandbox game, without it lagging to death over all the variables???
this is what I have so far :
how do I make it go fast when under larger amounts of "sand grains"
this is what I have so far :
SeedRnd MilliSecs() SetBuffer BackBuffer() Type sand Field x Field y Field colors End Type Graphics3D 1024, 768, 32, 1 Repeat RenderWorld() If MouseDown(1) Then s.sand = New sand s\x = MouseX() s\y = MouseY() s\colors = Rnd(0, 100000) EndIf For s.sand = Each sand LockBuffer FrontBuffer() WritePixel s\x, s\y, s\colors UnlockBuffer FrontBuffer() s\y = s\y + 1 If s\y > 1023 Then Delete s Next Flip Cls If KeyHit(57) Then Cls Until KeyHit(1) End
how do I make it go fast when under larger amounts of "sand grains"