Discussions

SmileBASIC Community

KalvinNoctise

06/08/2016 5:24 PM ·Spoilers

Open Closed

Pause

how do you make a pause button?

Advertisement

Comment

This post has no comments.

  • You can create one using spset and a sprite. If you want to make the functionality, then you need to skip your "update" code from your game cycle. I don't know if you used that in your game but that's how I do that. By the way, here is a page that explain the concept of "game loop": http://gameprogrammingpatterns.com/game-loop.html

    Yeahs1
    Played
  • There is a good tool kit on smilebasic source called ezSB It includes a pause function, as well as other functions.

    Yeahs1
    Played
  • It's rather simple, really. Within your game's main loop, you can have a certain button lead to another loop, which is a pause loop, in which you can do anything you want the pause to do until you unpause it. Unpausing is probably even simpler, since all you need to do is exit the pause loop and carry on with the game's main loop.

    Yeahs0
    Played
  • Example: WHILE GAME 'MAIN GAME LOOP 'DO GAME STUFF IF BUTTON() AND #Y THEN 'PAUSE WHEN Y IS PRESSED WHILE !(BUTTON() AND #Y):WEND 'SIMPLE LOOP THAT UNPAUSES WHEN PRESSING Y AGAIN ENDIF WEND

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-BXN-3HKN-UC4-23UR

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: