Computer Science Canada

"Time Crisis"-like game, suggestions/help needed

Author:  skatelhs [ Fri May 23, 2003 1:22 pm ]
Post subject:  "Time Crisis"-like game, suggestions/help needed

Hi.
I am making a games similar to Time Crisis, the one in the arcades where you put your foot down on the big metal thing and your character hides behind something, making enimies not be able to shoot at you.

So far I've got the crosshair and bullet-counter thing.

code:

View.Set ('offscreenonly')

var x, y, button, bulletsleft : int

bulletsleft := 8

loop
    %Bullets Left Shown at Top
    locate (1, 1)
    put "Bullets Left in the Clip: ", bulletsleft
    Mouse.Where (x, y, button)

    %CROSSHAIR%
    locatexy (maxx div 2, maxy div 2)
    %Triple-Thick Horizontal Line
    drawline (x - 30, y, x + 30, y, black)
    drawline (x - 30, y - 1, x + 30, y - 1, black)
    drawline (x - 30, y + 1, x + 30, y + 1, black)
    %Triple-Thick Vertical Line
    drawline (x, y - 30, x, y + 30, black)
    drawline (x - 1, y - 30, x - 1, y + 30, black)
    drawline (x + 1, y - 30, x + 1, y + 30, black)
    %Clearing Screen of Crosshair
    View.Update
    cls

    %BUTTON-CLICKING%
    %Bullets-Left Count
    if button = 1 then
        bulletsleft := bulletsleft - 1
        delay (250)
        %Reload Warning
        if bulletsleft <= 0 then
            bulletsleft := 0
            locate (2, 1)
            put "Out of Ammo!  Press R to reload"
            %No Ammo Left sound
            sound (80, 40)
        end if
        %Gunshot Spiral thing
        if bulletsleft > 0 and button = 1 then
            locatexy (maxx div 2, maxy div 2)
            drawoval (x, y, 2, 2, red)
            delay (15)
            cls
            drawoval (x, y, 4, 4, red)
            delay (15)
            cls
            drawoval (x, y, 8, 8, red)
            delay (15)
            cls
            drawoval (x, y, 12, 12, red)
            delay (15)
            cls
            drawoval (x, y, 18, 18, red)
            delay (15)
            cls
            %Gun Shooting Sound
            sound (400, 20)
            sound (350, 20)
            sound (300, 20)
            sound (250, 20)
            sound (200, 20)
        end if
    end if
end loop

I was wondering if anyone had some better bullet-shoot and the no-bullets-left sounds, because mine really suck. Also, can anyone make it so when you press 'r' bulletsleft becomes equal to 8? I dont really understand the whole boolean thing that most everone uses.
Also, if you had any suggestions on improvements i could make that would also be great.
thanks
(also, if anyone does some of this ii wouldnt mind donating my bits, i dont really even know what they are for Confused )

Author:  Tony [ Fri May 23, 2003 4:30 pm ]
Post subject: 

for sounds you can just load .wav or even .mp3 (i think)

as for boolean. Its a true/false variable that are used as flags. Basically when a sertain action happens, you set appropriate flag to true so that at another point you can check the status of your flag to find out if sertain even should take place or not.

Such as display a sertain object while objectFlag = true.

Then you would have a procedure that contols those flags and raises or lowers them (true/false)


: