Installations
npm install pxt-arcade
Releases
Unable to fetch releases
Developer
Developer Guide
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
No
Node Version
16.20.2
NPM Version
8.19.4
Statistics
484 Stars
3,768 Commits
209 Forks
32 Watching
199 Branches
84 Contributors
Updated on 27 Nov 2024
Languages
TypeScript (95.79%)
C++ (1.38%)
CSS (1.12%)
HTML (1.03%)
Less (0.27%)
JavaScript (0.25%)
Batchfile (0.14%)
Shell (0.01%)
Total Downloads
Cumulative downloads
Total Downloads
848,455
Last day
306.6%
2,590
Compared to previous day
Last week
51.9%
5,229
Compared to previous week
Last month
39.4%
16,270
Compared to previous month
Last year
-10.8%
239,840
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Optional Dependencies
1
Casual game editor using Microsoft MakeCode
- Try it https://arcade.makecode.com
- Forum
This repo contains the Arcade editor built with Microsoft MakeCode (PXT).
Creating and editing a package
In the editor, you will find a GitHub icon next to the save icon. Use the GitHub integration to build a library package. You do not need to install the local dev server; everything can happen in the editor.
Local server setup
This setup gives you a local version of the editor and the ability to load packages from your machine. This is the setup to develop new packages.
Setup
- install Node.js 8+ (you might need to restart afterwards so all your environment variables are applied correctly)
- clone https://github.com/microsoft/pxt-arcade to
pxt-arcade
folder. For example, from a git bash
git clone https://github.com/microsoft/pxt-arcade
- go to
pxt-arcade
and run
cd pxt-arcade
npm install
Don't forget to periodically git pull
and npm install
to get the latest changes.
git pull
npm install
Launching the server
This command launches a local web server. Note that this web server is meant for development purposes only. It was not designed or secured to be run on a web server.
npm run serve
Refreshing the community.md file
Run this command, then patch description, improve the screenshot (or record gifs) if necessary.
pxt ddt featured-game --md docs/community.md
This command requires ImageMagick (https://imagemagick.org/index.php) to be installed and available at the command line as "magick".
Updating pxt-arcade-sim version
When changing the version of pxt-arcade-sim referenced by pxt-arcade, you need to change the version in three places:
package.json
.github/workflows/pxt-buildmain.yml
.github/workflows/pxt-buildpush.yml
In the two yml files, you'll find the version in the ref
field under the step that checks out pxt-arcade-sim.
Update playlists in markdown
Get a Google API key and store it in the GOOGLE_API_KEY
environment variables (turn on data from the app).
pxt downloadplaylists
How to create sprite packs
Packs of images can be added to the editor using PXT packages. To create a package of images.
- Create a package (see steps above)
- Prepare your sprites in a spritesheet: All sprites in a sheet must be the same size and arranged in a grid with no gaps. Spritesheets must be PNG files. An example spritesheet is located here
- Inside the package directory, create a subdirectory where the assets will be placed and copy the spritesheet containing your images into it.
- Create a file named
meta.json
in the directory you created. An examplemeta.json
can be found here and documentation on all of the options can be found here - Create another
.json
file with the same basename as the spritesheet. - Inside that file add a single property called
frames
which maps to an array of names for the sprites. Indices start in the top left of the sheet and proceed left to right. For a sample file see here - From the root of your package, run the command
pxt buildsprites SUBDIR
whereSUBDIR
is the name of the directory containing the assets. - Two files will be generated in the package root, one with the extenstion
.ts
and one with the extension.jres
. Add both to the package'spxt.json
- You're done! The images will show up in the Image category when the package is added to a project
Local Dev setup
These instructions allow you to test changes to pxt-core and pxt-common-packages. They are more involved as you need to clone and link 3 repos.
- install Node.js 8+ (you might need to restart afterwards so all your environment variables are applied correctly)
- (optional) install Visual Studio Code
Automated setup
- Download setup.cmd to your local machine and place it on the folder you'd like to do your development work
- Run the following command
1setup.cmd /firsttime
This call should automatically do the steps outlined in the manual setup and will clone and link all three repos.
Manual setup
- install the pxt command line tool
[sudo] npm install -g pxt
In a common folder,
- clone https://github.com/microsoft/pxt to
pxt
folder - clone https://github.com/microsoft/pxt-common-packages to
pxt-common-packages
folder - clone https://github.com/microsoft/pxt-arcade to
pxt-arcade
folder - go to
pxt
and run
npm install
npm run build
- go to
pxt-common-packages
and run
npm install
npm link ../pxt
- go to
pxt-arcade
and run
npm install
npm link ../pxt
npm link ../pxt-common-packages
to run the local server
From root github folder,
cd pxt-arcade
pxt serve --rebundle
More instructions at https://github.com/microsoft/pxt#running-a-target-from-localhost
to watch for changes
To rebuild automatically when changes are made, we need gulp.
Install gulp:
npm install -g gulp
and in a seperate terminal from pxt serve
and in the pxt/ folder, run:
gulp watch
Using setup.cmd
Instead of having to go to each repo, pull and link each one individually you may now use the setup.cmd
file. The usage is outlined as follows with these options:
/firsttime
Sets up developer environment - will clone 3 repos (pxt, pxt-arcade, and pxt-common-packages) and then run /link option
/pull
Does a git pull on 3 repos (pxt, pxt-arcade, and pxt-common-packages)
/link
Runs npm install and links the 3 repos
/run
Runs local server and watches for changes using gulp
Viewing documents
Documents are rendered at the server and are viewable when received by the browser. Special styles and extended formatting are used which prevent them from rendering properly as generalized Markdown. While you can browse them here in the repo, they are not meant to render properly as GitHub document.
Contributing
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Trademarks
MICROSOFT, the Microsoft Logo, MAKECODE, and MAKECODE ARCADE are registered trademarks of Microsoft Corporation. They can only be used for the purposes described in and in accordance with Microsoft’s Trademark and Brand guidelines published at https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general.aspx. If the use is not covered in Microsoft’s published guidelines or you are not sure, please consult your legal counsel or MakeCode team (makecode@microsoft.com).
No vulnerabilities found.
Reason
30 commit(s) out of 30 and 13 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
no vulnerabilities detected
Reason
security policy file detected
Details
- Info: security policy detected in current repo: SECURITY.md:1
Reason
license file detected
Details
- Info: : LICENSE:1
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/playlists.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/playlists.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/playlists.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/playlists.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/playlists.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/playlists.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pxt-buildmain.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildmain.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pxt-buildmain.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildmain.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pxt-buildmain.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildmain.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pxt-buildpr.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildpr.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pxt-buildpr.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildpr.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pxt-buildpush.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildpush.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pxt-buildpush.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildpush.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pxt-buildpush.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildpush.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/playlists.yml:24
- Warn: npmCommand not pinned by hash: .github/workflows/playlists.yml:25
- Warn: npmCommand not pinned by hash: .github/workflows/pxt-buildmain.yml:28
- Warn: npmCommand not pinned by hash: .github/workflows/pxt-buildmain.yml:29
- Warn: npmCommand not pinned by hash: .github/workflows/pxt-buildpr.yml:23
- Warn: npmCommand not pinned by hash: .github/workflows/pxt-buildpr.yml:24
- Warn: npmCommand not pinned by hash: .github/workflows/pxt-buildpush.yml:28
- Warn: npmCommand not pinned by hash: .github/workflows/pxt-buildpush.yml:29
- Info: Dockerfile dependencies are pinned
- Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles
- Info: no insecure (not pinned by hash) dependency downloads found in shell scripts
Reason
GitHub code reviews found for 19 commits out of the last 30 -- score normalized to 6
Details
- Warn: no reviews found for commit: 5a87f87883ad159644f7c8c5938736b3b36d7bb1
- Warn: no reviews found for commit: d6a4fa30fce2bf7a9612ce9f145a9cdfe9ff1ea3
- Warn: no reviews found for commit: 59fb31bca771bbf02324350dbf33698e8a6bd551
- Warn: no reviews found for commit: 1359b8f7ea84f809df1a2d0139d8562336561033
- Warn: no reviews found for commit: 7a6da8f3a5d43c861e7833f2bb4a55f44eb1b7d5
- Warn: no reviews found for commit: 71eadf6eb737a789335ca3f3b33dba999461a23b
- Warn: no reviews found for commit: a8c87617b50d7a5a2c0a5896d4fdb5d1981fc4de
- Warn: no reviews found for commit: 2c936e54eab635c4a85b26355e2a626dab70de05
- Warn: no reviews found for commit: 55f160789f899cb55ea016122f8cf6a1baa74f43
- Warn: no reviews found for commit: c47bb53898d40dd11defa851b8ed33c311e32e25
- Warn: no reviews found for commit: 455a7c88f7b6d3556a64d5017df79a77294e8057
Reason
branch protection is not maximal on development and all release branches
Details
- Info: 'force pushes' disabled on branch 'master'
- Info: 'allow deletion' disabled on branch 'master'
- Info: status check found to merge onto on branch 'master'
- Warn: number of required reviewers is only 0 on branch 'master'
Reason
no badge detected
Reason
non read-only tokens detected in GitHub workflows
Details
- Warn: no topLevel permission defined: .github/workflows/playlists.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/playlists.yml/master?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/pxt-buildmain.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildmain.yml/master?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/pxt-buildpr.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildpr.yml/master?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/pxt-buildpush.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/liuyuchenzh/webpack-upload-plugin/pxt-buildpush.yml/master?enable=permissions
Reason
no update tool detected
Details
- Warn: dependabot config file not detected in source location. We recommend setting this configuration in code so it can be easily verified by others.
- Warn: renovatebot config file not detected in source location. We recommend setting this configuration in code so it can be easily verified by others.
Reason
project is not fuzzed
Score
6.1
/10
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More