# Multiple games installed at the same time

**URL:** <https://forum.makecode.com/t/multiple-games-installed-at-the-same-time/26124>\
**Category:** micro:bit\
**Created:** [January 19, 2024, 9:09pm UTC](https://forum.makecode.com/t/multiple-games-installed-at-the-same-time/26124 "2024-01-19T21:09:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ohio](https://avatars.discourse-cdn.com/v4/letter/o/54ee81/32.png) [@Ohio](https://forum.makecode.com/u/Ohio)\
**Post date:** [January 19, 2024, 9:09pm UTC](https://forum.makecode.com/t/multiple-games-installed-at-the-same-time/26124/1 "2024-01-19T21:09:50Z")

</div>

I want to have multiple applications installed on my micro:bit

---

<div class="post-metadata">

**Author:** ![robotosaurus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robotosaurus/32/19294_2.png) [@robotosaurus](https://forum.makecode.com/u/robotosaurus)\
**Post date:** [January 19, 2024, 9:30pm UTC](https://forum.makecode.com/t/multiple-games-installed-at-the-same-time/26124/2 "2024-01-19T21:30:52Z")

</div>

Not possible!

---

<div class="post-metadata">

**Author:** ![Man](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/man/32/13125_2.png) [@Man](https://forum.makecode.com/u/Man)\
**Post date:** [January 22, 2024, 7:59pm UTC](https://forum.makecode.com/t/multiple-games-installed-at-the-same-time/26124/3 "2024-01-22T19:59:37Z")

</div>

It’s possible. You can add as many applications that the micro:bit can store.  
Here’s an example in Javascript:

```auto
// This is the game selector
input.onButtonPressed(Button.A, function () {
    if (Menu_selector > 0) {
        Menu_selector += 1
    }
})
// This opens the selected game then clears the screen and disables the menu inputs
input.onButtonPressed(Button.B, function () {
    if (Menu_selector == 1) {
        Menu_selector = 0
        basic.pause(300)
        basic.clearScreen()
        game1 = 1
    }
    if (Menu_selector == 2) {
        Menu_selector = 0
        basic.pause(300)
        basic.clearScreen()
        game2 = 1
    }
})
let game2 = 0
let game1 = 0
let Menu_selector = 0
Menu_selector = 1
basic.forever(function () {
    // This is the menu selector
    if (Menu_selector == 1) {
        basic.pause(300)
        led.toggle(1, 2)
        led.plot(3, 2)
    } else if (Menu_selector == 2) {
        basic.pause(300)
        led.toggle(3, 2)
        led.plot(1, 2)
    } else if (Menu_selector > 2) {
        Menu_selector = 1
    }
    // This is the same as the "on start" block
    if (game1 == 1) {
        basic.showLeds(`
            . # . # .
            . . . . .
            . . . . .
            # . . . #
            . # # # .
            `)
        basic.pause(1000)
        game1 = 2
    }
    // This is the same as the "forever" block 
    if (game1 == 2) {
        basic.showLeds(`
            . . . . .
            . . . . .
            . . . . .
            # . . . #
            . # # # .
            `)
        basic.showLeds(`
            . # . # .
            . . . . .
            . . . . .
            # . . . #
            . # # # .
            `)
        basic.pause(1000)
    }
    // This is the same as the "on start" block
    if (game2 == 1) {
        basic.showLeds(`
            . # . # .
            . . . . .
            . . . . .
            . # # # .
            # . . . #
            `)
        basic.pause(1000)
        game2 = 2
    }
    // This is the same as the "forever" block 
    if (game2 == 2) {
        basic.showLeds(`
            . . . . .
            . . . . .
            . . . . .
            . # # # .
            # . . . #
            `)
        basic.showLeds(`
            . # . # .
            . . . . .
            . . . . .
            . # # # .
            # . . . #
            `)
        basic.pause(1000)
    }
})

```

---

<div class="post-metadata">

**Author:** ![ALittleBitOfEverythi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alittlebitofeverythi/32/15418_2.png) [@ALittleBitOfEverythi](https://forum.makecode.com/u/ALittleBitOfEverythi)\
**Post date:** [May 23, 2024, 4:48pm UTC](https://forum.makecode.com/t/multiple-games-installed-at-the-same-time/26124/4 "2024-05-23T16:48:08Z")

</div>

It is possible
