Jump to content
IGNORED

Multiple playfields?


esplonky

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...