This extensions adds blocks to help you create your own carnival games in MakeCode Arcade using throwable balls, extra timer functions, and extra game-over options.

Overview

Usage

This extensions adds blocks to help you create your own carnival games in MakeCode Arcade using throwable balls, extra timer functions, and extra game-over options.

  • Setting Up a Ball
let myBall: Ball = null
myBall = carnival.create(assets.image`ball-yellow`, SpriteKind.Player)
myBall.setPosition(80, 90)
myBall.controlBallWithArrowKeys(true)
myBall.setIter(50)
myBall.setTraceMulti(carnival.Tracers.Full)

This snippet sets up a ball called myBall and allows you to control it with arrow keys. You'll also see that it has a trace marker that's set to 50% value.

  • Variable Power
let theTarget: Sprite = null
let throwBall: Ball = null
let myBall: Ball = null
scene.setBackgroundImage(assets.image`wildWest`)
myBall = carnival.create(assets.image`ball-yellow`, SpriteKind.Player)
myBall.setPosition(80, 90)
let statusbar = statusbars.create(120, 6, StatusBarKind.Health)
statusbar.setColor(5, 10)
statusbar.setBarBorder(1, 1)
statusbar.setPosition(80, 113)
let myBooth = sprites.create(assets.image`booth`, SpriteKind.Booth)
myBall.controlBallWithArrowKeys(true)
myBall.setIter(10)
myBall.setTraceMulti(carnival.Tracers.Cross)
myBall.variablePower(statusbar, 30, 50, 100)

This snippet adds to the code above by creating a statusbar that is used as a visual indicator of the power at any given time. The power varies between 30% and 50% of full power.

  • Tossing Projectile Balls
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
    throwBall = carnival.createProjectileBallFromSprite(assets.image`ball-blue`, myBall)
})

This snippet creates a ball of type projectile that emits from the parent ball using its angle and power settings.

  • Timer
carnival.startTimer()

This sets a timer that counts up throughout the game, or until carnival.startTimer() is called again.

  • Countdown
carnival.startCountdownGame(15, carnival.WinTypes.Timed)

This starts a countdown that launches an endgame state when completed. You can choose from win, lose, best time, best score, or multiplayer.

  • Game
    carnival.customGameOverExpanded("Great Job!", effects.confetti, music.powerUp, carnival.ScoreTypes.HScore, 0)

This allows for a custom game over message under circumstances of your choosing. You can change the message, the background effect, the music, the way score is judged (win, lose, time, score, or multiplayer.) You can also pass in a custom "score" to for judging success.

  • Label
carnival.addLabelTo("Target Practice", carnival.Areas.Top, 4)

This adds a label to your carnival booth, using a predetermined location near the top, middle, or bottom of the play area.

Use this extension

This repository can be added as an extension in MakeCode.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Blocks preview

This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.

A rendered view of the blocks

Metadata (used for search, rendering)

  • for PXT/arcade
<script src="https://makecode.com/gh-pages-embed.js"></script><script>makeCodeRender("{{ site.makecode.home_url }}", "{{ site.github.owner_name }}/{{ site.github.repository_name }}");</script>
You might also like...

Collection of Rowy's templates for cloud functions cod snippets - including for derivative, action columns and extensions.

Collection of Rowy's templates for cloud functions cod snippets - including for derivative, action columns and extensions.

Rowy Templates Collection of Rowy's backend templates and code snippets for cloud functions - including for derivative, action columns and extensions.

Nov 16, 2022

e-ONG, an authorial project, whose objective is to help ONGs to find people who need help or would like to help them

This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: npm start Runs the app in the developmen

Nov 11, 2022

PokemonNFT started as Buildspace Project - "Create your own mini turn-based NFT browser game" - ROSE Emerald Paratime Testnet

PokemonNFT started as Buildspace Project -

Welcome to PokemonNFTGame 👋 Buildspace Project - Create your own mini turn-based NFT browser game ✨ Demo Install npm install Usage npm run dev Blockc

Oct 3, 2022

coc-pyright-tools is a coc-extension that adds its own functionality to coc-pyright for coc.nvim. Currently the "Inlay Hints", "CodeLens" and "Test Framework commands" feature is available.

coc-pyright-tools !!WARNING!! Inlay hints feature of coc-pyright-tools, have been ported to coc-pyright itself. https://github.com/fannheyward/coc-pyr

Aug 23, 2022

A jQuery plugin that creates a countdown timer in years, months, days, hours and seconds in the form a bunch of rotating 3d cubes

CountdownCube is a jQuery plugin that is in the form of a bunch of rotating 3D cubes. It uses CSS transitions to create the 3D rotating cube effects.

Mar 6, 2022

Aergo Timer Service schedule smart contract function calls

Aergo Timer Service ⏰ Create timers to call functions on your smart contracts Schedule calls based on time interval or on specific date-times For a sm

Mar 10, 2022

Todo List, Pomodoro Timer, Daily Receipt.

Todo List, Pomodoro Timer, Daily Receipt.

Daily Receipt - 하루 영수증 🖨 Print your time ⏱ Todo List, Pomodoro Timer, Daily Receipt. Daily Receipt는 당신의 시간을 정산해드리는 애플리케이션입니다. 🎙 서비스 기획의도 매일 더 성장한 나를

Dec 30, 2022

Um timer feito para ser usado para cronometrar os intevralos entre as aulas da Trybe, desenvolvido em Electron

electron-quick-start Clone and run for a quick way to see Electron in action. This is a minimal Electron application based on the Quick Start Guide wi

Nov 27, 2022

Want to *contribute* to *open source*? Participate in **HacktoberFest 2022** *Beginner friendly* *First Timer*

Want to *contribute* to *open source*? Participate in **HacktoberFest 2022** *Beginner friendly* *First Timer*

# HacktoberFest 2022 (No Longer Participating in hacktoberfest) THIS REPO IS NO LONGER CONSIDERED IN HACKTOBERFEST. YOU CAN STILL USE THIS REPOSITORY

Nov 12, 2022
Comments
  • Updated to newest versions

    Updated to newest versions

    Review request as FYI…I'll merge when tests pass.

    The original copy didn't pull the latest changes, so I copied them over and I'm updating again. Will update tags after I merge.

    opened by kiki-lee 0
Owner
Microsoft
Open source projects and samples from Microsoft
Microsoft
This extensions will prompt you to remove any other extensions that we found as being broken and unmaintained.

octarine vscode extension This extensions will prompt you to remove any other extensions that we found as being broken and unmaintained. We do expect

42picky 4 May 27, 2022
This is a boilerplate for creating your own languages for various use cases. You can even create your own programming language from scratch!

Bootstrap compiler This is a bootstrap compiler that can be used to compile to compiler written in the target language. You can write a compiler in th

Kaan 3 Nov 14, 2022
Ett MakeCode-projekt

Öppna denna sida på https://hectorbergman.github.io/uppochner/ Använd som tillägg Denna databas kan läggas till som ett tillägg i MakeCode. öppna http

null 2 Sep 8, 2022
Bookmarklet exploit that can force-disable extensions installed on Chrome. Also has a very fancy GUI to manage all extensions!

ext remover Bookmarklet exploit that can force-disable any extension installed on Google Chrome Instructions Here are the instructions to using this e

Echo 124 Jan 6, 2023
Functions Recipes is a library of examples to help you getting started with Salesforce Functions and get used to their main features.

Functions Recipes Introduction Salesforce Functions lets you use the Salesforce Platform for building event-driven, elastically scalable apps and expe

Trailhead Apps 172 Dec 29, 2022
📝 You Can Create Your Own Short Notes With The Help of Sticky-Notes Website.

Hi ?? , I'm Sneh Agrawal A passionate Web developer from India ?? I’m currently working on Chatting Website Chit-Chat ?? How to reach me on My Gmail A

Sneh (Smilyboyy) 1 Feb 23, 2022
With this plugin, you can easily make a stopwatch or timer on your site. Just init, style and enjoy.

TimezZ With this plugin, you can easily make a stopwatch or timer on your site. Just init, style and enjoy. Features Typescript support Support all en

Valery Strelets 37 Dec 5, 2022
Theme Redone is a custom WordPress theme starter/framework with its own Gutenberg blocks solution and a CLI that speeds up the block creation process.

Theme Redone The Framework for Developing Custom WordPress Themes with its own Gutenberg Blocks creation solution. Theme Redone is a custom WordPress

null 103 Dec 30, 2022
This React-Based WebPage allows the client/user system to create their own blog, where users can publish their own opinions.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Gauri Bhand 4 Jul 28, 2022