Showing posts with label Game. Show all posts
Showing posts with label Game. Show all posts

Saturday 10 May 2014

Bola Asik (aplikasi game menggunakan Smallbasic)

Copas code berikut ini ke editor bahasa program Smallbasic kamu dan jalankan (run/F5):

bola1 = Shapes.AddEllipse(25,25)
GraphicsWindow.BrushColor = "Red"
bola2 = Shapes.AddEllipse(25,25)
GraphicsWindow.BrushColor = "Green"
bola3 = Shapes.AddEllipse(25,25)
awal:
shapes.animate(bola1, Math.GetRandomNumber(500), Math.GetRandomNumber(500),1000)
shapes.animate(bola2, Math.GetRandomNumber(500), Math.GetRandomNumber(500),1000)
shapes.animate(bola3, Math.GetRandomNumber(500), Math.GetRandomNumber(500),1000)
Program.Delay(1000)
Goto awal

Monday 10 February 2014

Hujan Bola 2


GraphicsWindow.MouseDown = mousedown GraphicsWindow.MouseUp = mouseup GraphicsWindow.Show() i = 0 Sub mousedown s[i] = Shapes.AddEllipse(25,25) Shapes.Move(s[i], GraphicsWindow.mousex - 10, GraphicsWindow.mousey - 10) i = i + 1 EndSub Sub mouseup shapes.animate(s[i-1], Shapes.Getleft(s[i - 1]), GraphicsWindow.height - 25, 1000) EndSub