Need help? Ask us anything! [CLOSED] [12/21/2020 - 1/8/2021]

I hope you are able to find a way to fix this, as I really do want to use tilemaps; even if there is a trade off on how big the tilemap can be and/or how many sprites to place on it. Good luck Joey. :+1:

Hello.
I am beginner and i am sure this is pretty simple task but i have a bit problem with execution.
I am currently working on space shooter (with a tutorial help).
Is there any way to stop both of my enemies spawning at score “120” and then spawn one big enemy with bigger hp as a boss?

I will appreciate any help. Thanks.!
arcade-gun-game-final-ver (3)

Yes. Put all regular enemies inside an “while” block and put a comparison with the score variable. Then, in “on update”, put and if block with another comparison for the boss and summon it. Use the status bar and set the score. Make this new boss a different category that is not enemy, like “boss”. Set up the life bar however you want it, add a on two sprite collision block with projectile and boss. And then deplete the health.

Question on the forums…
Why does the system automatically delete quotes?

Perhaps if you share your game, we take a look at what you already have made.

Click the ‘Share’ icon, publish the project, copy and paste the URL of the project and post it here.

image
image

Can you put a lot of dialogue using the story extension without it lagging?

If it is not too much trouble, can someone from the makecode team make a shop extension that will allow players to make a shop system for upgrades, weapons, etc?

3 Likes

My unfinished game for the ocean jam, but it has a Menu and an inventory system(The inventory is only to equip submarines and it is in the shop)

1 Like

Hello.
After creating a project that includes blocks, JavaScript and Python, is there any way to remove the blocks and Python from the project?

1 Like

Create a new JavaScript project. Copy the JavaScript from the old project into the new one. Add back all extensions.

How to create a JS project:

2 Likes

@GameGod’s method will only allow JavaScript mode, but that requires creating a new project, copying over the code, and importing the extensions again. If you just want to disable blocks you can do so by deleting main.blocks in the explorer while in TypeScript mode:

image

1 Like

Thank you, @GameGod and @UnsignedArduino , for your replies!
I understand about the two solutions.
I will try both of them.

As you mentioned extensions in your answer, I have a question about the Github workflow when using extensions.
Since the theme is different from this thread, I will make it a separate thread.

1 Like

Here it is.
No boss yet… kinda lost :confused:

I tried it buy it starts bugging at boss spawn so here is no boss version that works.
Any help is appreciated! Thanks.

2 Likes

Hi! I have some stuff to add to makecode Arcade!
1: Make something like the wall thing as in the tilemaps but for sprites to make a hitbox!
2: @mmoskal Do you know how to use the Meowbit SD Card slot?
3: About the streams! I live in Austria so the advanced streams begin at 10pm for me! The time is not really the biggest problem but… Twitch says that you go live today… so I go to the timetable thing and it is not crossed out! I come back when the stream starts… but it doesn’t! With that I wanted to say that you should make some kind of Topic on the forum where you say if there is a stream today!
Thanks!

2 Likes

The SD card slot is currently not supported. No timeline on supporting it. Sorry…

2 Likes

Can you help me? Please! Two days ago i get my Meowbit. And it is disconnecting when copying UF2 files. And i’m just can’t get any game on it:/

2 Likes

Hmmm… Make sure you are using the cable that was with the meowbit! Plug it in and turn it on!
Then take the uf2 file and drag it over!
If that does not work then try other games! If that also does not work then open the editor for the game, next to the big download buton press the 3 Dots, press select hardware, press meowbit, then press the 3 buttons again after it loaded and press pair device! Follow the instructions and pair it! Then a symbol should appear next to the big download button to indicate that you are connected, press download and wait!
If that does not work as well either the USB slot is damaged or the meowbit broken (which does not make much sense because you just got it) I am not a professional but I hope this helps! If it does not ask @mmoskal!

2 Likes

How hard would it be to make a RNG extension so you can have multiple RNGs as objects and you can set a seed?

@UnsignedArduino we actually have this in the JavaScript

// 123 is the seed
const myRandom = new Math.FastRandom(123);

const randomInteger1 = myRandom.next() // could be any integer between 1 and 65535
const randomInteger2 = myRandom.randomRange(0, 10)
const randomBoolean1 = myRandom.percentChance(50)
const randomBoolean2 =  myRandom.randomBool()
const randomFruit = myRandom.pickRandom(["apple", "orange", "blueberry"])
myRandom.reset() // resets the state back to the starting seed

Ironically, this is actually slower than using the regular random APIs despite the name (but still very, very fast)

1 Like

Nice!

This is what I currently have so far after fiddling around in the MakeCode playground:

//% blockNamespace=Random color="#FF8000"
class FastRandomBlocks {
    _rng: FastRandom

    constructor(seed: number) {
        this._rng = new Math.FastRandom(seed)
    }

    /**
     * Return the next number between 1 and 65535
     */
    //% block="%Random(rng) get next number"
    nextNumber() {
        return this._rng.Next()
    }

    /**
     * Returns a random number between two numbers
     * @param minimum The minimum number, ex: 1
     * @param maximum The maximum number, ex: 10
     */
    //% block="%Random(rng) get a random number between $minimum| and $maximum"
    //% inlineInputMode=inline
    randomRange(minimum: number, maximum: number) {
        return this._rng.randomRange(minimum, maximum)
    }

    /**
     * Returns a boolean based on the percent passed in
     * @param percent The percentage of the time the boolean returned will be true.
     */
    //% block="%Random(rng) get a random boolean with %percent| percent chance"
    percentChance(percent: number) {
        return this._rng.percentChance(percent)
    }

    /**
     * Returns a boolean with a 50% chance of being true
     */
    //% block="%Random(rng) 50/50 chance"
    randomBoolean() {
        return this._rng.randomBool()
    }

    /**
     * Pick a random element from the array passed in
     * @param elements The array to choose from, ex: ["apples", "oranges", "pears"]
     */
    //% block="%Random(rng) choose a random element from %elements"
    //% elements.shadow="lists_create_with"
    randomElement(elements: Array) {
        return this._rng.pickRandom(elements)
    }

    /**
     * Reset the RNG
     */
    //% block="Reset %Random(rng)"
    resetRNG() {
        this._rng.reset()
    }
}


//% color="#FF8000"
namespace Random {
    /**
     * Create a RNG object
     * @param seed The seed for the RNG, ex: 1234
     */
    //% block="create RNG || with seed $seed"
    //% blockSetVariable=rng
    //% expandableArgumentMode="toggle"
    export function createRNG(seed: number = 0): FastRandomBlocks {
        return new FastRandomBlocks(seed);
    }
}

For some reason, the simulator inside the playground never finishes loading, so I can’t test it. But are there any big no noes that stand out to you? (And should I create a new thread for this?)