Example Programs

Here you can link to screenshots and demos etc. of programs made using BBC BASIC
Hated Moron

Example Programs

Post by Hated Moron »

The example programs supplied with BBC BASIC for SDL 2.0 are intended both as a showcase of what the language can achieve, and as code templates which can be adapted to suit the requirements of somebody trying to write an application in BBC BASIC.

As such the intention is that almost every genre of application is represented, although inevitably it doesn't include those whose output cannot be made 'interesting' through being represented graphically or by means of sound, music etc. ;)

The question is: are there any missing categories? Are there any applications or techniques which could usefully be illustrated by means of an example, but aren't at the moment?

Please provide some feedback one way or the other, even if it's to say you are happy with the current set of examples.
Hated Moron

Re: Example Programs

Post by Hated Moron »

On 17/08/2023 20:40, stevef@sensigent.com wrote (cross-posted from the Discussion Group):
I would like to get an example of communication between 2 programs running independently. I have a several related programs with one part dedicated to getting data from a number of sensors and processing that data, and another part handling human interaction including pushbuttons that need to be handled in real time. I realize this may be too specialized to entertain but you asked.
Not at all "too specialized", indeed there is already a pair of example programs supplied which communicate in this way: client.bbc and server.bbc, both in the examples/general directory.

It's possible that you didn't consider these as meeting your requirements, because 'network' communication may suggest connecting two different machines over a LAN or WAN. But it is also an excellent method of communicating between two programs running on the same machine.

You have a choice of using TCP (which is what client.bbc and server.bbc use) or UDP (which is what lanchat.bbc uses) depending on the kind of communication you need.

If you can't immediately see how you might apply this, provide a specification of a simple example program that would be a better fit.
Hated Moron

Re: Example Programs

Post by Hated Moron »

On 18/08/2023 19:07, Mark Moulding wrote (cross-posted from the Discussion Group):
That particular example (of inter-process communication) would be very interesting to me as well...
As I said to the OP, if you cannot see how to adapt client.bbc and server.bbc to do what you want, provide a specification of a simple example program which would illustrate the kind of application you have in mind.
DDRM

Re: Example Programs

Post by DDRM »

Hi Richard,

>Please provide some feedback one way or the other

It's a pretty comprehensive set of examples, I have found. Sometimes I struggle to find the one I want, but it's usually there somewhere! :-)

Best wishes,

D
Hated Moron

Re: Example Programs

Post by Hated Moron »

DDRM wrote: Sun 20 Aug 2023, 13:48 It's a pretty comprehensive set of examples, I have found. Sometimes I struggle to find the one I want, but it's usually there somewhere! :-)
It's a pity that nobody has submitted any example program candidates for a long time.

It wasn't always like that, many of the current examples were written by other users, including three by you: triples.bbc (in examples/games), knots.bbc (in examples/graphics) and trebuchet.bbc (in examples/physics).

Knots is possibly my favourite of all the examples, it's certainly near the top. It's featured in the screenshots that accompany the iOS App Store and Android Play Store listings for BBC BASIC for SDL 2.0! If you have any other suggestions for examples I'd like to see them.