
-----------------------------------
babesjersey4
Sat Jun 04, 2005 10:12 am

help with an intro screen
-----------------------------------
I am creating a game that runs the intro screen has an Input.Pause and then starts the game, the only problem is the background of the intro screen does not clear completely, I have used cls and have reset the background, yet it still does not work, is their anything else I can do?

-----------------------------------
syphon4
Sat Jun 04, 2005 11:13 am

screen
-----------------------------------
try drawing a plain white screen over top of the starting one......

drawfillbox (0, 0, maxx, maxy, 0)

-----------------------------------
lyam_kaskade
Sat Jun 04, 2005 9:28 pm


-----------------------------------
If you've used cls, there might be a problem with your code. I recommend posting it.

-----------------------------------
babesjersey4
Sat Jun 04, 2005 10:15 pm


-----------------------------------

View.Set ("noecho,nocursor")
setscreen ("graphics")

% Set constants = ord value of the arrow keys
const RIGHT := 205
const LEFT := 203
const SHOOT := 32
const MAXMENGROUND := 3

var menground := 0     %counts how many men are on the ground
var score := 0 % keeps track of score
var groundCount := 0 %how many parachutters are on the ground
var gunnerHit := false %gunner has not been hit
var gameOver := false %player is still alive

%shot is off the screen to avoid collision with parachute dude
var bulletX, bulletY := -100
var shooting := false %the ship is not firing

%default ship position
var gunnerX := maxx div 2
var gunnerY := 15

var parachuters := 0 % how many parachutes are dropping


Draw.FillBox (0, 0, maxx, maxy, black)
colour (black)
Text.ColorBack (white)
cls

%When a parachuter is hit, have him bleed
procedure paraHit (x, y : int)

    var blood : int := Pic.FileNew ("blood.jpg")     %load the picture

    Pic.Draw (blood, x, y, picCopy)       % draw blood

    delay (1000)

    drawfillbox (x, y, x + 45, y + 50, white) %erase the blood

end paraHit


process introscreen

        const Y := 100 %number for delay
        const X := 1000 %number for delay
        
        Draw.FillBox (0, 0, maxx, maxy, black)
        colour (white)
        Text.ColorBack (black)

        delay (Y)
        locate (5, 35)
        put "W" ..
        delay (Y)
        put "E" ..
        delay (Y)
        put "L" ..
        delay (Y)
        put "C" ..
        delay (Y)
        put "O" ..
        delay (Y)
        put "M" ..
        delay (Y)
        put "E" ..
        locate (7, 25)
        locate (8, 33)
        put "The situation: "
        locate (9, 22)
        put "Enemy parachuters are dropping from the sky."
        delay (X)

        locate (11, 33)
        put "Your mission: "
        locate (12, 22)
        put "Shoot as many parachuters as possible. If they"
        locate (13, 22)
        put "get as many as three men on the ground, it's"
        locate (14, 22) 
        put "Game Over for us."

        delay (X)
        locate (16, 22)
        put "Good luck, and may we triumph for all things"
        locate (17, 22)
        put "good!"
        locate (19, 30)
        put "Press the space bar to continue."
        cls

        
end introscreen

process men

    var para : int := Pic.FileNew ("men.jpg")      %load the picture
    % controls a single parachuter which flies down from top of screen
    var menXSpeed := 0
    var menYSpeed := Rand.Int (1, 3)
    var men_Y : int := 0 %stores position of men on Y axis
    parachuters += 1    %increase the number of parachuters
    var menX := Rand.Int (15, 585)


    for decreasing menY : 385 .. 15 by menYSpeed

        Pic.Draw (para, menX, menY, picCopy) %draw the parachuter
        delay (20)
        drawfillbox (menX, menY, menX + 50, menY + 50, black)
        men_Y := menY
        exit when gameOver

        % check if parachuters is on the ground
        if men_Y 