New releases of BB4W and BBCSDL, and other updates, will be announced here
- Posts: 43
- Joined: Mon 02 Apr 2018, 17:13
I have hacked my downloading process so that it will now accept shared Dropbox links
Ok thanks. I just need to get a Dropbox account..
Here's another of David Williams's games which runs nicely in a suitable browser: Rainbow Snake
Something to note: if you use SYS "SDL_SetWindowTitle" ensure that you include @memhdc%
as the last parameter; that's necessary anyway for it to work reliably in MacOS but the in-browser edition crashes if you don't!
- Posts: 101
- Joined: Sat 23 Jun 2018, 19:52
I improved my program using the Task Manager and got between 0.2 and 0.9% and then used a drop box link to use the web version and it worked awesome.
https://bbcbasic.co.uk/bbcsdl/wasm/bbcs ... 202020.bbc
I am still working on isolating the draws, but 0.9 % of CPU usage is a big improvement.. I didn't try the task manager on this link yet but I will try it.
UPDATE: when running this program in the web the trading app takes 9% of CPU. Compared to the Forum that uses around 2% on EDGE
The program DEFINITELY needs to be improved further for efficiency.. I am working on your suggestions to suppress the redraws.
*Thankfully I used the most inefficient version of the stock trader on my gaming computer* i7 ROG gaming laptop. Had I known how bad it was I would have started modifications earlier.
Question though. With a drop box link, would I link a folder for this if I had other files that the program needed? Have you tried that yet?(for drop box)
Focus is on code subject. Feel free to judge the quality of my work.
mikeg wrote: ↑
Thu 24 Sep 2020, 03:48
With a drop box link, would I link a folder for this if I had other files that the program needed?
There's no way of loading an entire folder. If you've got more files than can conveniently be loaded individually, I suggest you adopt the same approach as I did for Tyoob
(which uses more than 500
resource files - no I'm not kidding!) which was to pack them into a single data file which you unpack after loading. That's why there's tyoob_loader.bbc
which does the unpacking: each of the dots it prints is a separate file. Rainbow Snake
uses the same technique, except that David Williams built it into the program itself, so no explicit loader/unpacker is required.
The latest program to be ported to the in-browser edition of BBC BASIC is mandel
which displays the Mandelbrot Set and allows you to pan and zoom it. This runs best in Firefox, in the other browsers it occasionally crashes with a 'WebGL context lost' error (as it works in Firefox I assume this is not my fault!).
The in-browser edition currently starts up at the immediate-mode prompt if no URL parameter is specified; to run the supplied example programs you must change directory (e.g. *cd examples/graphics) and then CHAIN the program you want. Would it be better for it instead to run the 'touch IDE' at start-up, as do the Android and iOS editions (despite its name it can be used with a keyboard and mouse)?
RichardRussell wrote: ↑
Thu 24 Sep 2020, 22:37
Would it be better for it instead to run the 'touch IDE' at start-up, as do the Android and iOS editions?
There's been disappointingly little feedback, but what I have received has been positive so I've made the change experimentally. Here is the revised version
, let me know what you think (if you're not familiar with the Touch IDE there's a brief description here
). I can easily switch it back to how it was if necessary.
- Posts: 398
- Joined: Mon 02 Apr 2018, 18:04
I like it! I think it's much more friendly.
DDRM wrote: ↑
Sat 26 Sep 2020, 09:01
I like it! I think it's much more friendly.
I've never considered the in-browser edition to be a platform on which you would develop BBC BASIC software, not least because there's no way of exporting or backing up what you've written! Rather it's more of a run-time engine, giving you an option for deploying
programs that you've written and tested conventionally on a desktop platform. As such it seemed to me that 'user friendliness' wasn't really an important attribute.
So whilst I'm pleased that you like the new interface, my view is that it's really only of value for browsing and running the supplied examples rather than as a practical IDE. I intend to add more examples, but they will be downloaded 'on demand' rather than supplied with the package, to keep it small. In the latest update 'snake' (in the games directory) and 'clock' (in the graphics directory) are in that category.