Online playground for Phaser #6881
hatemhosny
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
LiveCodes now has a starter template for Phaser:
https://livecodes.io/?template=phaser
LiveCodes is a feature-rich, open-source, client-side, code playground that supports 90+ languages and frameworks. The announcement post gives a general overview and you can find here what makes LiveCodes different.
Check starter templates: https://livecodes.io/?new
npm modules are automatically loaded (from CDNs) when imported in code (with typescript type definitions) without any
npm install
s. No bundling is needed. Type definitions provide great editor features like auto-completions and show info on hover even when using JS (TS is obviously also supported).These are examples for the official starter templates running in LiveCodes:
(based on https://phaser.io/sandbox/XyqPcjNr)
(based on https://github.com/phaserjs/template-vite-ts)
(based on based on https://github.com/phaserjs/template-react-ts)
(based on https://github.com/phaserjs/template-vue-ts)
(based on https://github.com/phaserjs/template-solid)
LiveCodes is a client-side app, with no backend. All processing (including compilation, code formatting, running tests and automatic loading of modules and types) occurs in the browser. This allows LiveCodes to be totally free for unlimited usage with no account required. It also allows self-hosting on any static file server.
Projects can be:
LiveCodes also has a guide for adding assets: https://livecodes.io/docs/features/assets
Playgrounds can be embedded in any webpage, using a powerful, yet easy-to-use, SDK.
This is an example for an embedded playground: (open in LiveCodes)
The SDK is also available for react, vue and svelte.
In addition, the SDK allows communication with the embedded playgrounds using multiple methods (e.g. set/get code or config, watch for code change or console output, run tests and get results, etc)
This allows making interactive tutorials. See the blog post: Let's Make an Interactive Coding Tutorial
LiveCodes is mobile friendly, has responsive (vertical vs horizontal) layout and supports multiple code editors: the powerful Monaco editor on desktop and the lighter-weight, touch-friendly codemirror6 on mobile. There are also light and dark modes.
I believe this can make it easier for more people to try Phaser and get started.
Disclosure: I'm the author of LiveCodes.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions