Note: All the programs listed below can be downloaded directly into Small Basic. Just import the programs using their published Id.
What started as a fun challenge in our Small Basic Forums, quickly turned into a repository of very interesting programs, all conforming to a 25-line limit. It is amazing to see enthusiastic participants come up with very creative patterns to embed complex logic in as few lines as possible.
The challenge started with the classic game of Rock/Paper/Scissors, written in 24 lines by Coding Cat and published as CTB433. This was meant to be just an example for the challenge, but within days, Jason Jacques posted a 9 line version of the same program, published as CTB433-1. And the race was on.
Recently Rushworks posted a trick to initialize Small Basic arrays in a single line. Hours later, Davey-Wavey came up with a feature-par version of the original Rock/Paper/Scissors in 3 lines flat! This version is published as CTB433-2.
And using a few tricks and assumptions about the size of the text window, Jason came back and posted the same program in just 2 lines! It is published as CTB433-5.
As this race was going on, litdev published the Swarm of Bees as MSH031 in 25 lines.
Simultaneously, Dudeson published a similar program, RRS083 which simulates an atom with the mouse center as the nucleus. And Grzegorz Tworek, published his Lissajou’s Curve simulator program as GQP876, in 11 lines.
Dudeson went back and improved his atom code to publish RPW587, which runs much faster.
Other programs that you’ll find on this forum:
(25 lines) by Jason Jacques: CGW786
(25 lines) by Coding Cat: KDN168 also by Davey-Wavey: KDN168-0
(20 lines) by Davey-Wavey: XDK444
SBace-Invaders is now improved, and shrunk to 18 lines: SPR072
I think this site is great. I'm just learning.
Rock paper, scissors shortened to 19 lines and better yet. use code
CTB433-16
Dictionary in 8 lines! use code BTP350
Dictionary in 7 lines and better yet! use code BTP350-1
Dictionary in 6 lines! Use code FKP983
Rock paper, scissors shortened to 12 lines!. use code CTB433-29
I'm looking for a sample program that creates multiple text input boxes in which you input numerical data. The data is read from each input box so calculations may be performed on the input.
where the hell are the full programs
how do i move an object that has already been printed from memory onto the screen? ie an animal has been printed on a blank screen and now i want to move it from one side of the screen to another using x and y coordinates. what is the command?
TextWindow.WriteLine(Dictionary.GetDefinition(TextWindow.Read()))
one line of code to get dictionary definition...