I do not claim to be or to have ever been a 'real' programmer.
The quality of the code here certainly is debatable to say the least.
I am just doing this for fun and think it would be nice if other would get some satisfaction from these little programs... Feel free to use them as you want.
Type of Program
BTK-256 Demo Programs
These are some programs that I wrote to try to show that Basic-256 can already be used to write quite nice looking programs. They use the BTK-256 subroutines to handle the graphical interface making it easier to concentrate on the functionality of the programs.
- Basic Paint (click to download)
- Well, after my initial tries at writing programs with a more or less normal-looking GUI, I decided to go one step further and write enough functionality for a real program instead of the one-off graphical demos I did till now. Of course, the program still make intensive use of the updated BTK routines
So, without further ado, I present you with Basic Paint, a basic paint program written in Basic-256. Of course, the functionality on offer here is pretty.... basic.
- Critters! (click to download)
- You might remember my Pondlife program.Well, after Basic265 v0.9.9.1 came out with functions and subroutines, I decided to rewrite my BTK routines to use subroutines instead of gosubs and to add my new interface items as controls for Pondlife. Thus Critters! was born. It's important to note that Basic-256 version HAS to be 0.9.9.1 for this program to work. (v0.9.9.1 is backward compatible so my older programs also keep working)
- Perlin Mountains (click to download)
- Here is a little something I made the other day after coming across some text talking about Perlin Noise (link in the code and in the output). I posted it some time back without a GUI. You can find it hereand, as promised back then, here is the GUIfied version.
Life!(click to download)
- The other day, I was looking through my links when I found a site talking about Life, the cellular automaton. So I decided to try it out in Basic-256... This turned out to be pretty easy and a basic, text-input program resulted which can be found here I read about other veriants to Life and decided to incorporate some of them as well. For this, I started to build a simple GUI framework around it with basic action buttons and a 'settings' button. This one can be looked at here The settings screen turned out to be too small for all the options I wanted to put in and the radio buttons were too limited. So I created a new BTK element, the spinner box, and rewrote the interface with a lot more options. The basic program can be found here Finally I created a Splash screen with some info and tried to optimize the program. The final result is the Life! program above....
- MANDELBROT-256 (click to download)
- Mandelbrot-256 aims to be a fun little program which shows that Basic-256 is already able to create full-featured programs if you so want....
It is not intended to be a 'real' fractal program, but just uses the Mandelbrot set as a foundation to give you a 'visual' Basic-256 experience based on BTK-256
It's not really an intuitive program, so I have written a short manual that can be found in PDF format here or, if you want to look at it online, there's a .html version here
- DOL BOL L-Systems (click to download)
- This program features some examples of Deterministic and Bracketed Context-free L-Systems.
It also features a slide-out menu system.
The parameter strings can easily be changed for experimentation.
These and other examples can be found in the seminal book "The Algorithmic Beauty of Plants" by Aristid Lindenmayer and Przemyslaw Prusinkiewicz. A free (not pirated) .pdf can be found here
BTK-256 Widgets v2
Although Basic-256 is quite a simple basic dialect and does not have the concept of a widget based layout, nothing stops you from creating your own
widgets in Basic-256 itself! That is what I tried to do when I created BTK-256, a set of subroutines to draw standard buttons, radio-buttons, spin-boxes,
sliders, tab-bars, 3D groupers and canvas elements for text & graphics output. This lets you concentrate on the program logic and leaves most of the drudgery of painting widgets
to these routines.
The first release of BTK-256 was based entirely on GOSUB/RETURN because, well, there wasn't anything else...
As of Basic-256 v0.9.9.1 however, the CALL/SUBROUTINE functionality has been implemented, bringing the much desired advantages of local & global variables. In view of this major development, I decided to rewrite my BTK-256 subroutines, using the CALL/SUBROUTINE exclusively and even eliminating BASIC's much hated GOTO's. I also took advantage of this rewrite to improve the functionality (Buttons especially saw an overhaul: very small buttons are now possible, you don't need to specify button borders and buttons now have 3 states (off, on and in/out). The other elements also were improved)
The first mini-program here is a demo grouping all BTK-256 v2 GUI elements in a single, simple program. The mini-programs following this each illustrate a separate widget with comments embedded in the code for easier understanding.
- BTK-256 v2 Demo Program (right-click to download)
- This mini program of simple, lighthearted functionality, aims to show that all elements can be easily pulled into a single program. I hope to entice people to use these to give their sample programs a bit more flourish.
- Push Button (right-click to download)
- The humble pushbutton.... Each widget comes in a functional program with inline comments so you can understand how to use it. This program uses the new call subroutine() statement
I love simple particle systems: they're pretty easy to program and can be made to look rather impressive. At least I think so... Here are some of my favorites. Mind you, the simple screenshot do not do them justice as they offer pretty dynamic visuals
- Particle Pointer (click to download)
- Particle Pointer shoots a stream of particles from your mouse locatio. As they age they fade from white to red while falling and bouncing. It has a calming, mesmerising feel to it. The screenshot shows only part of the screen. This example is pretty well documented.
- Polygon Particles (click to download)
- Polygon Particles fires a dual stream of yellow, star shaped polygons that fade to red. It has a lot more energy than the particle pointer effect. It has to be seen in action. The screenshot doesn't do it justice
- Diffusion limited Aggregation (click to download)
- This is a less whimsical program and it takes a lot of time to run!! Diffusion-limited aggregation (DLA) is the process whereby particles with Brownian motion stick to the sides of their 'container' to form aggregates of such particles. This leads to rather organic forms being created
This program predates the BTK-256 toolkit and still uses the text area to gather user input.
- Particle Text (click to download)
- The text and the button turn to sand and desintegrate.... Not much of a wow factor but pretty nice to embed somewhere else (like in the Mandelbrot-256 splash screen....)
- Photo Effect 1 (click to download)
- The .7z file contains 3 files. Just extract and dump them in the same directory and run the particle203.kbs file. The others are just renamed .png files. This silly transition is one effect of many I'm going to try in a series of 'image manipulation' effects. These are to be incorporated in a larger, single program.
Here are some programs that are neither BTK-256 centric (although they might use some BTK-256 elements) nor particle related. There just some programs that I like the feel of. Some of them even are based on code snippets from other free Basic dialects
- Pliant Grid (click to download)
- I found this program as a samle LUA program in a Löve project. I loved it and just HAD to get it into Basic-256. Not obvious as they are different beasts... The code has been formatted to give you easy access to the different tunable parameters. I might come around to GUI-fying the parameters so they can be changed on the fly, but we'll see... In the mean time, enjoy!
- Spinning Sphere (click to download)
- This program shows a sphere with hidden line removal which can be rotated manually around its X- and Y-axis with the sliders. It can also be set to auto-rotate along any of its three axes (or a combination of axes) at variable speeds with the push butttons.
- Dancing Tentacles (click to download)
- This program came about more or less by accident as I was looking at Bezier curve generation. I kept adding things like animation, a second, mirrored tentacle and shadows. In the end it has a nice 3D-look with a soothing movement (well, until it explodes...). This was one of the fist Basic-256 programs that I was proud to show off....