Skip to content

poipole807/ScratchEverywhere

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

888 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scratch Everywhere! logo

3DS Nightly Build NDS Nightly Build Wii U Nightly Build Wii Nightly Build GameCube Nightly Build Switch Nightly Build Vita Nightly Build PSP Nightly Build PS4 Nightly Build PC Nightly Build Discord

A work-in-progress runtime made in C++ aimed to bring most Scratch 3 projects over to 6-8th-generation console and handheld platforms (and more)!

Runtime running a Scratch project on Wii U, Wii, and 3DS (Game shown is Hopper Heros by pepper-prepper)

Controls

Controls

Mouse

3DS: Glide your finger/stylus on the bottom screen to move the mouse, and tap the bottom screen to click.

Wii U GamePad: Use the touchscreen on the GamePad.

Wii Remote: Use the Wii sensor bar to control the mouse.

PS Vita: Use the front touchscreen.

Other Controllers: Enter Mouse Mode by holding L. Use the D-pad to move the mouse, and press R to click.

Unique Features

3DS Screen Modes

  • Any scratch project with an unmodified resolution setting will be displayed on the top screen only.
  • If using a modded Scratch client like TurboWarp, you can go into the projects' Advanced Settings and change the resolution.
    • Setting it to 400x480 will enable both the top and bottom screen.
    • Setting it to 320x240 will enable only the bottom screen.
    • Setting it to 400x240 will make the project perfectly fit to the top screen.
    • NOTE: make sure to click Store Settings In Project on TurboWarp to properly apply the settings.

Wii U Screen Modes

  • Currently, projects display exactly the same on both the TV and the GamePad, and there's no way to change screen modes.

Audio

  • A sound may take time to load if playing it for the first time.
  • [Non-3DS Platforms] If you play any sound from the Stage, the sound will play as a Streamed Sound and will not need to load.
    • Only one Streamed Sound can be playing at a time, so this is good for things like background music.
  • [Wii, GameCube] Sounds may fail to load if the length of the sound is too long, or if there's too many sounds loaded at once.
  • Audio on the NDS is currently experimental, and is not recommended to use at this time;
    • Only .wav is supported.
    • All audio must be in Signed 16-bit PCM wav format, with a recommended sample rate of 11025 Hz or below.
    • Only one sound can be playing at a time.

Framerate

  • When using a modded Scratch client like TurboWarp, you can enable the 60 FPS (Custom FPS) advanced option, and change the FPS to any value.

Differently Implemented Blocks

  • The Username block returns the 3DS's nickname, and the Wii U's current Mii name.
  • The Touching __? block uses simpler box collision, which may lead to projects working incorrectly.
  • The Stop 'All' block brings you back to the project menu.

Special Custom Blocks

Like TurboWarp, we have special custom blocks that only work on SE!. You can find a project containing and explaining them here: https://scratchbox.grady.link/project/K26OtTN2WDJ9

Project Linking Blocks

  • open (____) .sb3
  • open (____) .sb3 with data (____)
  • received data (variable)

These blocks make it possible to split a big game into smaller parts (e.g. a main game, a shop, or a cutscene project) and load them as needed. All paths are relative to the scratch-everywhere folder, so subfolders must be specified (e.g. MyGame/main.sb3). This helps avoid memory issues, keep projects modular, and makes it easier to manage large games.

You can find the blocks in this project: https://scratchbox.grady.link/project/twStEkSKjQaH

Note

In the future, this feature may be replaced by a dedicated extension once extension support is available.

Limitations

As this is in a very work in progress state, you will encounter many bugs, crashes, and things that will just not work.

List of Known Limitations:

  • Text and embedded bitmap images will not show up on vector images containing it.
  • Most Extensions (e.g. music extension) are not yet supported.
  • Only the Pen extension is supported.
  • Some blocks may lead to crashing/unintended behavior (Please open an issue if you know of a block that's causing problems).
  • Performance is poor when using many (~50+) clones (memory management issue).
  • [Wii, Switch, PSP, Vita, PS4] Cloud Variables aren't currently supported, but likely will be in the future.
  • [Wii, Wii U, GameCube, Switch] The first controller connected will be the only one that will work.
  • [Wii] If you're using a PAL Wii, you must use 50Hz.
  • [GameCube] Cloud Variables will not be supported.
  • [GameCube, NDS] These platforms have very little memory, so try to keep projects small.
  • [NDS] Dual screen mode will not be supported.
  • [3DS] Performace is poor when lots of blocks are running at once.
  • [3DS] If you have a bunch of large images, some may not load.
  • [PSP] Images cannot be over 512x512.
  • [Vita] Back touch will not be supported.
  • [PS4] The software keyboard isn't currently supported.

Unimplemented blocks

  • All say and think blocks (#393)
  • Most costume effects;
    • Only the Ghost and Brightness costume effects are supported
  • Pitch and Pan left-right sound effects
  • When loudness > ___
  • All color touching blocks
  • Loudness

Roadmap

Runtime

  • Bug fixing and Scratch parity
  • Get all blocks working
  • Support most TurboWarp extensions (#210)

Wii U

  • Dual screen support
  • Improved controller support (multiple controllers)

SDL2 Platforms

  • Improved controller support (multiple controllers)

Wii

  • Cloud Variable support (not possible due to licensing issues)

Vita

  • Cloud variable support

Other

  • Make vector images not/less pixelated
  • Download projects from the Scratch website (previously #331)
  • Translations (see #333)
  • Improved Collision (previously #375/#57)
  • Browser extension to send projects directly to a testing device from the editor (not really possible to my understanding)

Note

For info about planned/unplanned platform support, please check issue #166. Do not make an issue if your platform is already there.

Installation

Scratch Everywhere! is Homebrew software and requires a hacked/modded console. There are two methods to install the runtime:

  • Download the release or nightly build (easy), or
  • Build the file yourself (harder)

Note

Nightly builds are significantly more unstable than releases and should probably only be used if you are instructed to do so in a bug report or if you know exactly what using nightlies implies.

Get up and running for 3DS

Download the .cia file or .3dsx in the Releases tab or nightly build.

Note

Scratch Everywhere! for 3DS is also on Universal Updater, so you can just download it there and keep it updated that way!

.cia (Installable app)

Place the .cia file in the cias/ folder of your 3DS SD card. Open the FBI application and navigate to the cias/ folder and install the .cia file.

Put your Scratch projects in 3ds/scratch-everywhere and open the Scratch Everywhere application on your Home screen.

.3dsx

Place the .3dsx file in the 3ds/ folder of your 3DS SD card, put Scratch projects in 3ds/scratch-everywhere.

Then it should be as simple as opening the Homebrew Launcher on your 3DS and running the app!

Get up and running for NDS

Download the .nds file in the Releases tab or nightly build.

Place the .nds file in your SD card, and put Scratch projects in sd:/scratch-ds/.

Then it should be as simple as running the app!

Get up and running for Wii U

Download the scratch-wiiu.zip file in the Releases tab or nightly build.

Note

Scratch Everywhere! for Wii U is also on the Homebrew App Store, so you can just download it there and keep it updated that way!

Unzip the file in your sdcard:/wiiu/apps/ folder.

Place the scratch projects you want in sdcard:/wiiu/scratch-wiiu/.

Then it should be as simple as opening the app on the Wii U Menu or in the Homebrew Launcher on your Wii U!

Get up and running for Wii

Download the scratch-wii.zip file in the Releases tab or nightly build.

Note

Scratch Everywhere! for Wii is also on the Open Shop Channel, so you can just download it there and keep it updated that way!

Unzip the file and put the apps folder inside of the root of your SD card.

Place the Scratch projects you want in sdcard:/apps/scratch-wii/.

Then it should be as simple as opening the app in the Homebrew Menu on your Wii!

Get up and running for GameCube

Download the scratch-gamecube.dol file in the Releases tab or nightly build.

Put your Scratch projects in the scratch-gamecube folder in your storage device.

Then it should be as simple as opening the app on your GameCube!

Get up and running for Nintendo Switch

Download the scratch-nx.nro file in the Releases tab or nightly build.

Note

Scratch Everywhere! for Nintendo Switch is also on the Homebrew App Store, so you can just download it there and keep it updated that way!

Place the Scratch projects you want in sdcard:/switch/scratch-nx/.

Then it should be as simple as opening the app on your Nintendo Switch!

Get up and running for Vita

Note

Scratch Everywhere! for PS Vita is also on VitaDB, so you can just download it directly from your Vita using VitaDB Downloader! Do note however, the build on VitaDB might be a few versions behind.

Download the scratch-vita.vpk file from the releases tab or nightly build, transfer it over to the Vita's storage, and install it using VitaShell on your Vita.

Put your Scratch Projects in ux0:data/scratch-vita/ (you will need to create the folder yourself).

Then it should be as simple as opening and starting the app from your Vita's LiveArea homescreen!

Get up and running for PSP

Download the scratch-psp.zip file from the releases tab or nightly build, and put it in your PSP's memory card in PSP/GAME.

Put your Scratch Projects in PSP/GAME/scratch-psp/scratch-everywhere/ (you will need to create the folder yourself).

Then it should be as simple as opening the app on your PSP!

Get up and running for PS4

Note

Scratch Everywhere! for PS4 is also on PKG-Zone, so you can just download it there or directly from the PS4 HB-Store and keep it updated that way!

Download the scratch-ps4.pkg file from the releases tab or nightly build, then install it using your preferred HEN, like GoldHEN, Mira, etc.

Place your Scratch projects in /data/scratch-ps4, if the folder doesn't exist, create it.

Then it should be as simple as opening the app on your PS4 from the XMB!

Building

In order to embed a Scratch project in the executable, you'll need to compile the source code.

If you would like to change the name of the app or any other information you can edit one of the Makefiles.

  • For the 3DS, you need to edit Makefile_3ds and change APP_TITLE, APP_DESCRIPTION and APP_AUTHOR to whatever you please.
  • For the Wii U, you need to edit Makefile_wiiu and change APP_NAME, APP_SHORT_DESCRIPTION, APP_LONG_DESCRIPTION and APP_AUTHOR to whatever you please.
  • For the Wii, you need to edit Makefile_wii and change anything under Application Info to whatever you please.
  • For the Vita, you need to edit the properties under # METADATA/CONFIG to whatever you please. Do note however, if you're going to use custom LiveArea images, you must run them through pngquant (install with your package manager) with --posterize set to 4 first before packaging.
  • For the PS4, you need to edit Makefile_ps4 and change anything under Package metadata to whatever you please.

Docker

The recommended way to compile Scratch Everywhere! is with Docker.

We have written a step-by-step guide with pictures (for Windows) that explains the build process very simply, you can find it here: https://ScratchEverywhere.github.io/docker To compile with Docker all you need installed is Docker and Buildx.

  • To compile for the 3DS, run docker build -f docker/Dockerfile.3ds --target exporter -o . ..

  • To compile for the Wii U, run docker build -f docker/Dockerfile.wiiu --target exporter -o . ..

  • To compile for the Wii, run docker build -f docker/Dockerfile.wii --target exporter -o . ..

  • To compile for the GameCube, run docker build -f docker/Dockerfile.gamecube --target exporter -o . ..

  • To compile for the Nintendo Switch run docker build -f docker/Dockerfile.switch --target exporter -o . ..

  • To compile for the Vita, run docker build -f docker/Dockerfile.vita --target exporter -o . ..

  • To compile for the PSP, run docker build -f docker/Dockerfile.psp --target exporter -o . ..

  • To compile for the PS4, run docker build -f docker/Dockerfile.ps4 --target exporter -o . ..

Manual

Warning

We are currently migrating our build system from standalone Makefiles to a centralized CMakeLists.txt so documentation in this section might be outdated.

Note

We recommend using Docker for PS4 because of how absolutely messy the environment is.

If you are compiling with cloud variables, you will need to have DevkitPro's SDKs, Mist++, and a modified version of libcurl (instructions in mistpp-packages repo) installed.

  • For the 3DS, you will need the DevkitARM toolchain and libctru.
    • If you want to compile with audio support, you will also need a 3DS compiled version of SDL3 and SDL3_mixer. See the Nightly Build commands for a reference on how to compile SDL3 3DS for yourself.
  • For the Wii U, you will need the DevkitPPC toolchain, WUT, all SDL2-wiiu libraries, and libromfs-wiiu..
  • For the Wii, you need the DevkitPPC toolchain, libogc, all SDL2-wii libraries, and libromfs-ogc..
  • For the GameCube, you need the DevkitPPC toolchain, libogc, all SDL2-gamecube libraries, and libromfs-ogc..
  • For the Switch, you need the DevkitA64 toolchain, libnx, and all SDL2-switch libraries.
  • For the Vita, all you need is the vitasdk toolchain. It includes every SDL2 thing you might need.
  • For the PSP, all you need is the PSPSDK toolchain. It includes every SDL2 thing you might need.
  • For the PS4, you will need the OpenOrbis toolchain, PacBrew portlibs which include SDL2, and our fixed packages.

Note

DevkitPro's install instructions are available at: https://devkitpro.org/wiki/Getting_Started

Download the source code from the releases tab and unzip it.

Make a romfs folder inside the unzipped source code and put the Scratch project inside of that.

  • The Scratch project MUST be named project.sb3, all lowercase.
  • For faster load times/less limitations, you can also unzip the sb3 project file and put the contents into a new folder called project.

Then you need to compile the projects into proper Homebrew packages.

  • For the 3DS, you simply need to run make. Then copy the Scratch-3DS.3dsx file like you normally would.
  • For the Wii U, you need to run make PLATFORM=wiiu and then copy the build/wiiu/scratch-wiiu folder into the sdcard:/wiiu/apps folder on your sd card.
  • For the Wii, you need to run make PLATFORM=wii package, then find the zipped file in build/wii/scratch-wii.zip. Unzip it and put the apps folder inside the root of your Wii SD card.
  • For the GameCube, you need to run make PLATFORM=gamecube, then find the .dol file at build/gamecube/scratch-gamecube.dol.
  • For the Switch, you need to run make PLATFORM=switch, then find the .nro file at build/switch/scratch-nx.nro.
  • For the Vita, run make PLATFORM=vita, then transfer the VPK at build/vita/scratch-vita.vpk over to your Vita.
  • For the PSP, run psp-cmake -B build/psp -S . -DSE_SYSTEM=ON -DSE_CLOUDVARS=OFF && make -C build/psp, then unzip the scratch-psp.zip file at build/psp and transfer the scratch-psp folder over to your PSP.
  • For the PS4, you will need to run make PLATFORM=ps4, then find the .pkg file at build/ps4/scratch-ps4.pkg.

Compilation Flags

Warning

We are currently migrating our build system from standalone Makefiles to a centralized CMakeLists.txt so documentation in this section might be outdated.

Compilation flags are used to select which features will be enabled in the compiled version of Scratch Everywhere!. To use a compilation flag simply add it to the end of the make command (e.g. make ENABLE_LOADSCREEN=0).

  • ENABLE_LOADSCREEN (default: 1): If set to 1, the loading screen is enabled, if set to 0 the screen is simply black during that time.
  • ENABLE_AUDIO (default: 1): If set to 1, Audio will be enabled. If set to 0, it will be disabled.
  • ENABLE_CLOUDVARS (default: 0): If set to 1, cloud variable support is enabled, if set to 0 cloud variables are treated like normal variables. If your project doesn't use cloud variables, it is recommended to leave this turned off. If you run into errors while building try turning this off and see if that fixes the errors.
  • [Old 3DS] RAM_AMOUNT (default: 72): the amount of RAM, in megabytes, the old 3DS should be using. Can be set to 32, 64, 72, 80, or 96.

Disclaimer

This project is not affiliated with Scratch, the Scratch Team, or any of the supported platforms' parent companies or organizations.

About

Custom Scratch Runtime made in C++!

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 71.1%
  • C 28.0%
  • Other 0.9%