Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Compiled Languages (https://www.askmehelpdesk.com/forumdisplay.php?f=466)
-   -   Small basic computor programming / codeing, game help (https://www.askmehelpdesk.com/showthread.php?t=603639)

  • Oct 13, 2011, 08:47 PM
    ka2na
    Small basic computor programming / codeing, game help
    Hi I was wondering do any of you know the software programme where you make programmes and software through lines and lines of coding, anyway I am making the game airhockey, but a virtual version which yes is similar to pong. I was wondering how to I get my rectangle shape to move smoothly, and not appear in random spots, thank you. This is what I have coded thus far. Your feed back would be much appreciated

    'properties
    Color = "Black"
    GraphicsWindow.CanResize = "true"

    SetUpWindow()

    Sub SetUpWindow
    GraphicsWindow.Width = Desktop.Width
    GraphicsWindow.Height = Desktop.Height
    GraphicsWindow.Left = 0
    GraphicsWindow.Top = 0
    GraphicsWindow.Height = 1000
    GraphicsWindow.BackgroundColor = "Aqua"
    GraphicsWindow.DrawRectangle(796,1,2,10000)
    GraphicsWindow.DrawEllipse(750.5,394,100,100)
    EndSub

    SetUpShapes()

    Sub SetUpShapes

    ellipse = Shapes.AddEllipse(10,10)
    rectangle = Shapes.AddRectangle(40,80)
    ball = Shapes.AddEllipse(50,50)

    EndSub

    Shapesmove()

    Sub ShapesMove
    GraphicsWindow.MouseDown = OnMouseDown

    EndSub

    Sub OnMouseDown
    x = GraphicsWindow.MouseX
    why = GraphicsWindow.MouseY
    Shapes.Animate(ball,x,why,700)


    x = GraphicsWindow.MouseX
    why = GraphicsWindow.MouseY
    Shapes.Animate(rectangle,x,why,400)
    EndSub

  • All times are GMT -7. The time now is 07:57 PM.