Trying out ceramic by making a small game
Without ceramic vscode extension:
ceramic clay run web --setup --assets
With vscode extension:
CTRL
+ Shift
+ B
(CMD
+ Shift
+ B
on Mac)
From NotBilly's ceramic discord bot:
This setup comes configured to allow full sys access, adjust if needed
-
make sure you have a global electron installation (
npm install -g electron
if you use npm) -
grab the following files: main.js and preload.js
- place the files in
.../projectroot/project/web
- place the files in
-
grab launch.json
- place it in your
.../projectroot/.vscode
folder
- place it in your
-
at the bottom of the vscode window
- change the build task to
clay / Build Web
- change from
variant: Release
tovariant: Debug
- change the build task to
-
go to vscode's
Run and Debug
tab, selectElectron: All
from the dropdown -
press
Start Debugging (F5)
, debugging controls will appear (play, pause, step into ecc) -
wait for all adapters to connect, it will take a little bit of time on the first launch. A dropdown list will appear beside the controls when completed
-
when the dropdown list has appeared, select
Electron: Renderer
-
now when you hit your
Restart debug
shortcut or button it will just reload inside of the window, rather than relaunch the entire electron instance -
add this nice shortcut to vscode's keybindings (
File > Preferences > Keyboard Shortcuts > Open Keyboard Shortcuts (JSON)
) if you want{ "key": "ctrl+shift+b", "when": "!inDebugMode", "command": "workbench.action.tasks.build" }, { "key": "ctrl+shift+b", "when": "inDebugMode", "command": "workbench.action.debug.restart" },