-
Notifications
You must be signed in to change notification settings - Fork 0
Build
Developers of Blockly Games need to build the project in order to make changes.
- Open the github repo in codespaces
- Install liveserver from plugins
- Install dependencies/setting up the env
sudo apt update
sudo apt-get install subversion
make deps
- Build the entire game for the first time
make games
- After making changes to the maze game
make maze
First, download the source code. Git is the easiest:
git clone https://github.com/kgex/blockly-games.git
Or use Subversion:
svn checkout https://github.com/kgex/blockly-games
Or just download a ZIP:
https://github.com/kgex/blockly-games/archive/master.zip
Enter the Blockly Games directory you just created, and get/build the dependencies (Blockly, Closure Compiler, JS-Interpreter, Babel, Ace, SoundJS):
cd blockly-games/
make deps
The next step is to build all the games:
make games
It takes about two minutes. There shouldn't be any errors.
While developing a game, it is nice to be able to quickly recompile only a single game. Here are the build commands for the existing games:
make index
make puzzle
make maze
make bird
make turtle
make movie
make music
make pond-tutor
make pond-duck
make gallery
The previously mentioned make games is just a shortcut for all the above commands.
Point a browser at blockly-games/appengine/index.html and you should
see all the games.
To avoid having to recompile after small changes, visit
/admin
(or blockly-games/appengine/admin.html if being served directly off a file system)
to switch to uncompressed mode.
Now you can just press reload in the browser to get the latest
version after most changes. Note that changes to dependencies
(goog.require) still require a recompile.