
-----------------------------------
Witchcraft
Sat Oct 13, 2007 8:36 pm

Asteroid Game Asteroids!!!!!!!!!!
-----------------------------------
ok so, im pretty new to programming, but im having a good start, im now at the point were im creating my first game. The game is suppost to be a game where you are a ship that dodges asteroids and other space objects. I have loaded the pictures (that i created myself in photoshop, just like to balance out the fact that im a noob programmer), which include the background, score bar and the ship itself. I have gotten the ship to move, so now im ready for the next step, which is the asteroids. So i've been playing around for some time and i have no idea were to start with the asteroids! What a want to happen is that asteroids appear at a random x value top of the screen, and slowly move down in a some what randome direction (somewhat meaning that there going in a general down direction) if you could help me that would be great, oh and here is the code i have so far (introduction will be added when the game is done)

%A shipe game where you dodge objects
View.Set ("graphics:500;500,position:center;center,nobuttonbar")
var x, y : int %x and y values
var key : array char of boolean %key being pressed down
var picID, picID2, picID3 : int %pictures for the game
var font1 : int %font style
var score, lives, level : int %score lives and lecel values
y := 25
x := 200
score := 0
lives := 3
level := 1
picID := Pic.FileNew ("Ship.bmp")
picID2 := Pic.FileNew ("Ship game bar.bmp")
picID3 := Pic.FileNew ("Ship Background.bmp")
font1 := Font.New ("BERKLEY:11:bold")
Pic.Draw (picID2, 0, 0, picCopy)
View.Set ("offscreenonly")
loop
    colorback (black)
    Input.KeyDown (key)
    if key ('w') then
        y := y + 5
    end if

    if key ('s') then
        y := y - 5
    end if
    if key ('a') then
        x := x - 5
    end if

    if key ('d') then
        x := x + 5
    end if

    if y > 450 then
        y := 450
    end if
    if x > 400 then
        x := 400
    end if
    if x 