SmallBASIC icon indicating copy to clipboard operation
SmallBASIC copied to clipboard

Support running on the browser

Open ghost opened this issue 1 year ago • 5 comments

Compiling to JS or WASM.

ghost avatar May 16 '24 22:05 ghost

Thanks for your suggestion, but it's already done: https://smallbasic.github.io/online/sbasic.html

chrisws avatar May 17 '24 02:05 chrisws

Is it possible to build an online version, which immediately starts a basic program? The basic program could be for example a self written game, which can then run in the browser.

Joe7M avatar Jun 16 '24 20:06 Joe7M

Perhaps it could take a URL argument, something like this?

https://smallbasic.github.io/online/sbasic.html?run=https%3A%2F%2Fraw.githubusercontent.com%2Fsmallbasic%2Fsmallbasic.samples%2Fmaster%2Fgames%25202%2Ffalling%2520blocks%2520-%2520tetris.bas

chrisws avatar Jun 17 '24 09:06 chrisws

That would be great, if I can just point to a .bas file on my own server or on Github and run that file. Much easier than to generate a special WASM version with an included .bas file.

Is the above link just an example, or is it supposed to work? At least on my computer it only starts the IDE.

Joe7M avatar Jun 17 '24 13:06 Joe7M

It's just an example, for now. I think I have a reasonable idea of how to implement this.

chrisws avatar Jun 17 '24 23:06 chrisws