Jump to content



1

Multiple playfields?

How would i do this

5 replies to this topic

#1 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 293 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Thu Sep 29, 2011 11:24 AM

How would i have multiple screens on a game in bB?

I've tried:

playfield1

playfield:
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
end

if joy0right && player0x = 98 then goto playfield2

playfield2


playfield:
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
end

but that doesn't work for me

#2 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 293 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Thu Sep 29, 2011 11:53 AM

ANd i forgot to put drawscreens in that but yeah. you get the idea

#3 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Sep 29, 2011 11:53 AM

You have your main loop running, then when you want a new playfield, you jump to it using either gosub, goto, on . . . gosub or on . . . goto. At the end of each playfield, you use return if you used gosub or on . . . gosub to jump there or if you used goto or on . . . goto, you jump back into the main loop using a goto. It all depends on what you want to do.

#4 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 293 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Thu Sep 29, 2011 4:09 PM

uhhh can you explain it in code please?

#5 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Sep 29, 2011 4:40 PM

View Postesplonky, on Thu Sep 29, 2011 4:09 PM, said:

uhhh can you explain it in code please?

 
   playfield:
   ................................
   ................................
   ....XXXXXXXXXX....XXXXXXXXXX....
   ....X......................X....
   ....X......................X....
   ....X......................X....
   ................................
   ................................
   ....XXXX....XXXXXXXX....XXXX....
   ................................
   ................................
end
 
 
 
 
 
 
 
 
 
 
__Main_Loop
 
 
   if joy0right && player0x = 98 then gosub __Playfield_02
 
 
   drawscreen
 
 
   goto __Main_Loop
 
 
 
 
 
 
 
 
 
 
__Playfield_02
 
 
playfield:
................................
................................
....XXXXXX...X....X...XX...X....
.............X....X........X....
.............X....X........X....
....XX....XXXX....XXXX.....X....
................................
................................
....XX...XX..XXXXXX..XX...XX....
................................
................................
end
 
   return
 

Edited by Random Terrain, Thu Sep 29, 2011 4:42 PM.


#6 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 293 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Thu Sep 29, 2011 4:53 PM

Sweet! thx!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users