Re: Delays in Programs

new topic     » goto parent     » topic index » view thread      » older message » newer message

(I am trying to start my game with the company name and delay it for a  few
seconds then change to the second page using virtual screens.  Can you help
me?)
without warning
without type_check

include font.e
include graphics.e
include ecstacy.e
include image.e
include get.e
include mode19.e

-- declarations
object junk
atom delay

integer cargo22,festus18,arial08



-- defines


-- go to mode 19
junk=graphics_mode(19)

tick_rate(100)

--force use of vesa standard
machine_proc(36,1)
-- crash message
crash_message("An unexpected error has occured.\n"&
"Contact longlifter at prodigy.net\n"&
"Do not delete the file \"ex.err\"")

--1
-- Write Company name to the screen--
-- set background color
bk_color(BLACK)
-- load font of choice
cargo22 = load_font ("cargo22.f")
festus18=load_font("festus18.f")
arial08=load_font("arial08.f")
-- set the attributes for the text
set_attributes(SHADOW)
-- select a loaded font
select_font (cargo22)
--set text color
set_foreground(BLUE)
-- set background for text
set_background(CLEAR)
-- set x and y positions for text
setx(30) sety(80)
-- write to screen BLACK BIRD GAMES
write("BLACK BIRD GAMES")
---------------------------------------------

--2
-- Write "presents....." below "BLACK BIRD GAMES"
-- select a loaded font
select_font(festus18)
-- set text color
set_foreground(WHITE)
-- set attributes
set_attributes(SHADOW)
-- set background for text
set_background(CLEAR)
-- set x and y positions for text
setx(90) sety(130)
-- write "presents....." to the screen
write("presents.....")
--------------------------------------------
set_active_page(1)
clear_screen()


select_font(arial08)   -- select arial font
set_foreground(WHITE)  -- set text color to white
set_background(CLEAR)  -- set background for text
set_attributes(SHADOW) -- set attributes for text
setx(0) sety(320)      -- set x and y positions for text
write("Copyright(c)1999") -- write Copyright information.

-- Here is where I tried to use your code, but I can't get it to work
-- properly.
procedure wait(atom delay)
atom start, fini
  start = time() -- now
  fini = start + delay
 while time() < fini do
 end while -- loop
end procedure

set_display_page(1)    -- screen output will now be displayed

----- Original Message -----
From: Irv Mullins <irv at ELLIJAY.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Saturday, November 20, 1999 6:33 PM
Subject: Re: Delays in Programs


> ----- Original Message -----
> From: Longlifter <LONGLIFTER at PRODIGY.NET>
> To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
> Sent: Saturday, November 20, 1999 10:12 PM
> Subject: Delays in Programs
>
>
> Can someone supply me with some code on how to delay in a program?  I've
> seen it in many games when the creators name appears and then the screen
> goes to the next virtual screen. Does a certain library do what I am
trying
> to achieve? I just mastered the font library today(big whoopie), but I
> really need to move on in my game that I am starting. Can someone help me
> out?
>
> You can use time()..
>
> procedure wait(atom delay)
> atom start, fini
>   start = time() -- now
>   fini = start + delay
>  while time() < fini do
>  end while -- loop
> end procedure
>
> wait(10) -- 10 seconds
> wait(.1) -- 1/10 second
>
> Irv

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu