Resources for SmileBASIC
Category: Code Snippets
Drawing Ellipses on SmileBASIC
DEF ELLIPSE X,Y,SX,SY
FOR I=0TO 360:R2=R
Array insert and remove functions
These will work on any type of 1D array.
DEF INSERT ARRAY,POS%,VALUE
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...
In 3.3, ACLS accepts 3 arguments, which disable some things when not 0
ACLS skipGraphics, skipSp...
Deterministic Pseudorandom Number Generator
The same random number, every time.
faster FOR loop
Often people use something like FOR I=0 TO LEN(ARRAY)-1 to loop through an array, but this isn't...
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.
Limit Variable to Range
variable=MIN(MAX(variable, minimum), maximum)[/b]
Drawing a filled ellipse
I'm totally not adding to the one-upsmanship of filled shapes going on around here.
Convert Hz. to MML note
Getting MML DATA
MML DATA is usually formatted like:
DATA "more MML"
Rotate graphics 90 degrees
Function to rotate graphics.
Basic text adventure framework
As the title implies, here I will be going over a few basic text adventure frameworks.
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