
-----------------------------------
hotsnow
Wed Jan 21, 2009 4:29 pm

i'm making  a game
-----------------------------------
hey guys, so I have my final project due for Turing in about 2 days, and I have my game basically done. my game has levels and after every level i have to exit the game and restart to get to the next level - b/c u get a password after u finish each level-- so at the title screen you enter that password and you go the level you were on.  the problem is that I want to move to the next level ,after i finish one level, without having to exit the game ( which is very annoying...trust me -_- )  but i cant do it b/c then i will have to copy paste the whole game like ...a lotta times....

I really hope you guys know what m trying to say...
any help would be appreciated...
thanx....

P.S. I would show you guys my code but there a lot of ppl who go on this site in my class so i dun wan dem to take it and plus my teacher go on dis site as well, dun wanna get in that kinda shyt..

-----------------------------------
Ethan3210
Wed Jan 21, 2009 4:58 pm

Re: i'm making  a game
-----------------------------------
I can't explain it very well, but if you know how to use procedures...

You can put every level in a procedure, and at the top of the program, put "include "-insertfilename-"" and then you go to the end of each level, put the procedure name for the next level at the end, and it should run automatically through them all.(?)

-----------------------------------
hotsnow
Wed Jan 21, 2009 5:35 pm

Re: i'm making  a game
-----------------------------------
I can't explain it very well, but if you know how to use procedures...

You can put every level in a procedure, and at the top of the program, put "include "-insertfilename-"" and then you go to the end of each level, put the procedure name for the next level at the end, and it should run automatically through them all.(?)


I kinda have an idea of what you are saying but see the thing is..m basically done and this thing is due in like 1.5 days, if I use procedures then i'll have to recode a whole lotta stuff...which would take 4ever...
but I really appreciate your help...thanx alot man

please feel free to give other suggestions

-----------------------------------
Insectoid
Wed Jan 21, 2009 5:38 pm

RE:i\'m making  a game
-----------------------------------
Posting code on this site isn't bad. As long as your teacher knows that you posted it (ie knows your username), you should be fine. If someone tried to steel it, just point to this. Problem solved. 

We really can't help all that much without the code.

-----------------------------------
hotsnow
Wed Jan 21, 2009 6:04 pm

Re: RE:i\'m making  a game
-----------------------------------
Posting code on this site isn't bad. As long as your teacher knows that you posted it (ie knows your username), you should be fine. If someone tried to steel it, just point to this. Problem solved. 

We really can't help all that much without the code.

ya..i guess..well heres the code
BUT  you have to click the little empty box on the right hand side to start from level1 
and please donate bits if u liked my game..wud be much appreciated =)

var title, subt1, subt2, subt3, subt4, wrongpass : int % title and subtitle  font variable
var password1, winnerloser : int %password font
var pass1, pass2, pass3, pass4, pass5 : string
var x, y, button : int


%An assert statement is used to make sure that a certain requirement is met.
%This requirement is given by the trueFalseExpn.
%The trueFalseExpn is evaluated. If it is true, all is well and execution continues.
%If it is false, execution is terminated with an appropriate message.
%below are the variables for the fonts
%winner or loser font
winnerloser := Font.New ("Arial:45:bold")
assert winnerloser > 0
%password font
password1 := Font.New ("Arial:20:bold")
assert password1 > 0
title := Font.New ("Swis721 Ex BT:35:bold")
assert title > 0
subt1 := Font.New ("Swis721 Ex BT:12:bold")
assert subt1 > 0
subt2 := Font.New ("Swis721 Ex BT:13:bold")
assert subt2 > 0
wrongpass := Font.New ("Chiller:20:bold")
assert wrongpass > 0
subt3 := Font.New ("Swis721 Ex BT:20:bold")
assert subt2 > 0
subt4 := Font.New ("Swis721 Ex BT:10:bold")
assert subt4 > 0
setscreen ("offscreenonly")



loop
    mousewhere (x, y, button)
    %the gray background at the title screen
    drawfillbox (0, 0, maxx, maxy, grey)
    %draws the font
    Font.Draw ("Invisible Walls Maze", 30, 320, title, black) % Title
    drawbox (245, 200, 325, 230, black) %exit box
    Font.Draw ("Press any button on Printer Port Interface to start", 60, 250, subt1, black)

    Font.Draw ("L2 Password:", 20, 160, subt2, black) %password font
    Font.Draw ("L3 Password:", 20, 130, subt2, black) %password font
    Font.Draw ("L4 Password:", 20, 100, subt2, black) %password font
    Font.Draw ("L5 Password:", 20, 70, subt2, black) %password font
    drawbox (155, 155, 250, 175, black) %password box for L2
    drawbox (155, 125, 250, 145, black) %password box for L3
    drawbox (155, 95, 250, 115, black) % password box for L4
    drawbox (155, 65, 250, 85, black) % password box for L4

    drawbox (500, 155, 550, 175, black) %delete at school

    Font.Draw ("EXIT", 252, 205, subt3, black) %the exit button font
    Font.Draw ("Created by HotSnow", 190, 20, subt4, black) %credit font
    % tells the computer to exit if the exit button is pressed
    if button = 1 and 245 