if someone could please tell me how to get my instructions to be on the screen
Author |
Message |
ashlyn10
|
Posted: Sat Jan 12, 2013 12:07 am Post subject: if someone could please tell me how to get my instructions to be on the screen |
|
|
i am trying to make the game asteroids for my grade 11 game and i dont know how to make it at all.
can someone tell me how i get the instructions to show up on the screen?
can someone help me make it, or make it for me??
var font1 : int := Font.New ("serif:124")
var font2 : int := Font.New ("serif:20")
var font3 : int := Font.New ("Serif:20")
var font4 : int := Font.New ("Serif:20")
var mousex : int
var mousey : int
var button : int
% This is the background
setscreen ("graphics")
colourback (black)
cls
color (17)
% This is what is on the main screen
procedure mainscreen
Font.Draw ("Asteriods", 10, 190, font1, white)
Font.Draw ("Play Game", 230, 100, font2, white)
Font.Draw ("Instructions", 230, 70, font4, white)
Font.Draw ("High Scores", 230, 40, font3, white)
end mainscreen
procedure playgame
cls
end playgame
% procedure instructions
put "Welcome to Asteroids.The object of this game is to destroy all of the asteriods."
put "while trying to avoid being hit.As you adavance to the next levels,"
put "The amount of points you get for each destroyed asteroid will increase."
put "Good luck,enjoy the game, and have fun!"
put "Controls"
put "Up arrow makes you accelerate"
put "Down arrow makes you decelerate"
put "Left arrow makes you turn to the left"
put "Right arrow makes you turn to the right"
put "Space bar makes you shoot a bullet"
put "Press any key to continue.."
cls
end instructions
mainscreen
% If play game is selected
loop
Mouse.Where (mousex,mousey, button)
if mousex> 230 and mousex < 350 and mousey > 100 and mousey < 125 and button = 1 then
playgame
end if
end loop
% If instructions is selected
loop
Mouse.Where (mousex, mousey, button)
if mousex > 230 and mousex < 350 and mousey > 70 and mousey < 95 and button =1 then
% instructions
end if
end loop |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Panphobia
|
Posted: Sat Jan 12, 2013 12:26 am Post subject: RE:if someone could please tell me how to get my instructions to be on the screen |
|
|
Did you listen in class? If you did it shouldn't be too hard. No one will make your project for you. So if it is too hard, try to find a new game to work on. |
|
|
|
|
|
DemonWasp
|
Posted: Sat Jan 12, 2013 1:21 am Post subject: RE:if someone could please tell me how to get my instructions to be on the screen |
|
|
We won't help you make the code, and we won't do it for you. If you have specific problems, we'll help you understand them so you can fix them yourself.
Here's a hint for this problem: you have two loops near the end of your program. The second one will never be run, because there's no way to exit the first loop. You need to have one loop instead of two. It will look something like:
code: |
loop
Mouse.Where ( mousex, mousey, button )
if ( mouse is in area for "play" ) then
playgame()
elsif ( mouse is in area for "instructions" ) then
instructions()
end if
end loop
|
You should be able to figure out how to add your other screen, High Scores, based on this. |
|
|
|
|
|
|
|