smallbasic / SmallBASIC

SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes. SmallBASIC includes trigonometric, matrices and algebra functions, a built in IDE, a powerful string library, system, sound, and graphic commands along with structured programming syntax
https://smallbasic.github.io
GNU General Public License v3.0
209 stars 37 forks source link

Support running on the browser #223

Open ghost opened 5 months ago

ghost commented 5 months ago

Compiling to JS or WASM.

chrisws commented 5 months ago

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

Joe7M commented 4 months ago

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.

chrisws commented 4 months ago

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

Joe7M commented 4 months ago

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.

chrisws commented 4 months ago

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