Resources for SmileBASIC
Category: Code Snippets
Perfectly Filled Circles
A lightweight function to fill a circle regardless of its position.
Array insert and remove functions
These will work on any type of 1D array.
DEF INSERT ARRAY,POS%,VALUE
Drawing Ellipses on SmileBASIC
DEF ELLIPSE X,Y,SX,SY
FOR I=0TO 360:R2=R
In 3.3, ACLS accepts 3 arguments, which disable some things when not 0
ACLS skipGraphics, skipSp...
Even More Perfectly Filled Circles
Pick this one lol
Simple Trigonometric Hue
Some hue algorithms can appear overly choppy when dealing with color blending.
Text-Only Loading Bar
A progress/loading bar, made from only text.
It's accurate to the nearest pixel
DEF TEXTBAR LENG...
Detect sleep mode or home menu
MILLISEC is a millisecond (1/1000) timer. It uses the 3DS's internal clock, which runs constantl...
faster FOR loop
Often people use something like FOR I=0 TO LEN(ARRAY)-1 to loop through an array, but this isn't...
Limit Variable to Range
variable=MIN(MAX(variable, minimum), maximum)[/b]
EPICYCLOID OriginX, OriginY, CentralRadius, TangentialRadius, ScaleFactor, ColorDEF EPICYCLOID X...
Deterministic Pseudorandom Number Generator
The same random number, every time.
ISINSTR (String Searching)
DEF block that produces a list of locations a substring appears in a string.
IBLUR (Instant Blur!)
Instantly blur graphics!
Auto Print Text On Screen
This is how to make a function that prints text out on the screen one character at a time.
Alternate uses for (R)SORT
If you pass multiple arrays to SORT, it will sort the first array, then sort the others in the s...
Saving and Loading String Arrays
You can't easily save string arrays into a DAT file, but here's a way to convert a string array...
Color to Black and White Converter
color to black and white
Drawing Filled Circles
A function that draws a filled circle with a selectable color.
DEF FCIRCLE X,Y,R,L...
Drawing a filled ellipse
I'm totally not adding to the one-upsmanship of filled shapes going on around here.