LoginLogin
Might make SBS readonly: thread

[OLD] Ralsei's SmileBASIC Tutorial

Root / Submissions / [.]

IAmRalseiCreated:
Welcome to my SmileBASIC Tutorial.

TABLE OF CONTENTS AND BOOKS

Book 1 - BASICs

Chapter 1 "Let's begin!" Chapter 1.1 "Commands" Chapter 2 "End of book 1" [COMING SOON]

Book 2 - Graphics [COMING SOON]

Book 3 - Advanced [COMING SOON]

Book 4 - MML [COMING SOON]

Other TutorialsRandomous' tutorial VG_Lover's MML Tutorial

Book 1, Chapter 1

So if you've just gotten SmileBASIC you might be wondering "How do i create a program?" Here is a step-by-step guide:
step-by-step guideStep 1:Create a project by using the "Manage Projects/Files button" and tapping "Add Project Folder" (Optional) Step 2:Go back to the main menu and choose "Create Programs with SmileBASIC" Step 3:Tap the "Edit" button with a 0 on it

Book 1, Chapter 1.1

Now that you've gone to edit let's add some BASIC commands PRINT "Text String" - use to print a text string. change the text string if you want. PRINT NumValue - Print a number value PRINT StringValue$ - Print a stored string ACLS - You should always put this at the start of your program
What it does it clears the following things: Sprites BG images Things cleared with GCLS SPDEFinition numbers Fonts However, it does NOT clear variables and BGM-Related things
LOCATE X,Y,Z (Z is optional) - use to locate text COLOR Color -
list of included colorsThe included colors are #TBLACK #TBLUE #TCYAN #TGRAY #TGREEN #TLIME #TMAGENTA #TMAROON #TNAVY #TOLIVE #TPURPLE #TRED #TTEAL #TWHITE #TYELLOW
how to use RGBRGB(R,G,B) R, G and B and be numbers or a number value (see equals)
==, =, !=, >, >=, < & <= - = is a version of LET from conventional BASIC, the rest are for IF, which will be explained later on == is for testing if a number value or string is a certain value or string. >= is for the same as equals except it's equal to or greater than, > is just greater than and nothing else. <= is equal to or less than. < is less than. != is NOT equal to GCLS - clear the graphic screen CLS - clear the console screen END - Stops the game prematurely (before reaching the last line) or ENDs a DEF (DEFs will be in the advanced tutorial (the third one) ) FADE Color - Use THESE colors for this:
list #BLACK #BLUE #CYAN #GRAY #GREEN #LIME #MAGENTA #MAROON #NAVY #OLIVE #PURPLE #RED #TEAL #WHITE #YELLOW
GOTO and GOSUB @labelname - use in combination with @label. GOTO - goes to the label. RETURN doesn't work. GOSUB - Same as GOTO, but RETURN works @label - the label can be anything that doesn't include spaces. explained in GOTO and GOSUB. RETURN - Returns to the line after GOSUB was used after using GOSUB. Not using GOSUB and this being used leads to a nasty error. This was never finished but i'm going to make a brand new tutorial.

Replying to:IAmRalsei
coming soon:VAR, DIM, PUSH, POP, SHIFT & UNSHIFT! a foolish snail once said you could not add or remove elements from an array. There were wrong. let me introduce you to shift, unshift, push & pop! tney change the amount of elements in an array. WHO'S LAUGHING NOW, SNAIL_?
^yeah but I also highly doubt you can explain all those commands correctly with correct meanings and stuff

Replying to:IAmRalsei
coming soon:VAR, DIM, PUSH, POP, SHIFT & UNSHIFT! a foolish snail once said you could not add or remove elements from an array. There were wrong. let me introduce you to shift, unshift, push & pop! tney change the amount of elements in an array. WHO'S LAUGHING NOW, SNAIL_?
Perhaps snail maybe even taught them to you

Replying to:IAmRalsei
coming soon:VAR, DIM, PUSH, POP, SHIFT & UNSHIFT! a foolish snail once said you could not add or remove elements from an array. There were wrong. let me introduce you to shift, unshift, push & pop! tney change the amount of elements in an array. WHO'S LAUGHING NOW, SNAIL_?
no i learned them through the built-in manual

Replying to:SaladFingers
There are a number of reasons why I disliked:
  • you described the command by using its name. That’s not explaining, that’s repetition.
  • ACLS shouldn’t be “always” used at the beginning of the program.
  • END doesn’t necessarily end the program prematurely. Using END at the end of a DEF statement doesn’t end the program. STOP will end the program.
  • Labels cannot be anything.
  • I felt that you implied the RGB function could be used with COLOR because you mentioned it right after COLOR.
  • you go from explaining how to print, to operators.
  • there is no “regular BASIC.”
Also it’s rude to correct people’s spelling mistakes, especially when you have your own. Edit: frick, I didn’t realize how old this is, I just look at stuff in the trending.
the built-in manual actually refers to a conventional BASIC oops

SpoilerWow, Comic Sans!
Other than that, this is a good tutorial. Covers more than Randomous did on his first tutorial but I'm sure that shouldn't be too much for beginners.

Replying to:IAmRalsei
coming soon:VAR, DIM, PUSH, POP, SHIFT & UNSHIFT! a foolish snail once said you could not add or remove elements from an array. There were wrong. let me introduce you to shift, unshift, push & pop! tney change the amount of elements in an array. WHO'S LAUGHING NOW, SNAIL_?
I'd delete this if I could. (The comment, not the page.)

I'm thinking of making a new SB tutorial, but this one will stay up for archival purposes and because many comments and votes would not be accurate to the new tutorial. Edit:I've decided I AM going to make it