? Toad's SmileBASIC Tutorial ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Toad's SmileBASIC Tutorial

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]

Randomous' 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 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 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 - The included colors are #TBLACK #TBLUE #TCYAN #TGRAY #TGREEN #TLIME #TMAGENTA #TMAROON #TNAVY #TOLIVE #TPURPLE #TRED #TTEAL #TWHITE #TYELLOW RGB(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: #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. to be finished...maybe.
Author
ToadIsTheBest
Updated
Rating
19 votes
Categories
Keywords
  • BASIC
  • SmileBASIC
  • Tutorial
49 Comment(s) Plancake Plancake Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Reading I like to read books! Hobbies Wow, 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. ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength 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_? snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! Night Person I like the quiet night and sleep late. Express Yourself can i see where i said this ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength i forgot where you said it but i remember you saying it AnswerXOX AnswerXOX Great Page Hidden Achievements RNG Hidden Easter Eggs Second Year My account is over 2 years old Website I really doubt someone with as much experience as Snail would say that SwanBot SwanBot Halloween 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Halloween 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength First Year My account is over 1 year old Website ^yeah but I also highly doubt you can explain all those commands correctly with correct meanings and stuff Warrior Warrior Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies Perhaps snail maybe even taught them to you ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength no i learned them through the built-in manual CyberYoshi64 CyberYoshi64 Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Hey! 1. These "fade colors" are basically for actual graphics on the graphics screen. 2. By the way you forgot #FUCHSIA in the color codes. SwanBot SwanBot Halloween 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Halloween 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength First Year My account is over 1 year old Website gosh cool color i never knew this existed... thanks! CyberYoshi64 CyberYoshi64 Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself There you go! =) EDIT: I forgot #AQUA and #SILVER. 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website #FUCHSIA is the exact same color as #MAGENTA (and it's harder to spell) #AQUA and #CYAN are the same, too. What's that, you want #ORANGE? nah, take these 2 duplicate colors instead... use &HFFFF8000 I guess CyberYoshi64 CyberYoshi64 Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Although custom colors could be used too... ORANGE=&HFFFF8000 BROWN=&HFF804000 Edit: But #SILVER is merged with #GRAY and #WHITE. (#SILVER="&HFFC0C0C0") 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website Oh right, there's no brown either. CyberYoshi64 CyberYoshi64 Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Or maybe more light versions: LRED=&HFFFFC0C0 LGREEN=&HFFC0FFC0 LBLUE=&HFFC0C0FF LYELLOW=&HFFFFFFC0 LMAGENTA=&HFFFFC0FF LCYAN=&HFFC0FFFF Or a darker gray: DGRAY=&HFF404040 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website colors look better when they aren't "pure" also: &HFFFF0000 vs &HFFDD1100 ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength impurity is always the enemy even with colors and crystals spaceturtles spaceturtles Video Games I like to play video games! Hobbies Avatar Block I didn't change my avatar for 30 days. Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength How do you convert the rgb numbers into hex in sb? CyberYoshi64 CyberYoshi64 Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself It's like: ? HEX$(#RED) The parts are &H A R G B &H - Tells SB that it is hexadecimal A - Alpha (Transparency) R - Red G - Green B - Blue Don't write it like this: &H255128640 But rather: &HFF804000 If you can't calculate decimal (what RGB uses) into hexadecimal, use: ? HEX$(Number you need). Note: IDK if this happens to you but using a color with alpha less than &HFF it stays not-transparent (as it was &HFF the whole time.) CyberYoshi64 CyberYoshi64 Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself 12Me21 For me, these are the same: FFDD1100H FFFF0000H Definitely! 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website You can also use RGB() RGB(red,green,blue) RGB(alpha,red,green,blue) But since it's a function rather than a constant, it won't work in DATA. spaceturtles spaceturtles Video Games I like to play video games! Hobbies Avatar Block I didn't change my avatar for 30 days. Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good job for taking the time I guess? AnswerXOX AnswerXOX Great Page Hidden Achievements RNG Hidden Easter Eggs Second Year My account is over 2 years old Website This is literally the most confusing thing I've read ninjagnu ninjagnu Yes, the formatting of the "article" doesn't help either. SaladFingers SaladFingers There are a number of reasons why I disliked:
  1. you described the command by using its name. That’s not explaining, that’s repetition.
  2. ACLS shouldn’t be “always” used at the beginning of the program.
  3. 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.
  4. Labels cannot be anything.
  5. I felt that you implied the RGB function could be used with COLOR because you mentioned it right after COLOR.
  6. you go from explaining how to print, to operators.
  7. 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.
ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength 1. i don't get what you mean 2. how not 3. i said it ENDs a DEF 4. i know i forgot to add that you can't do spaces 5. well ok 6. how else am i gonna get print out of the way? 7. i meant traditional BASIC. SaladFingers SaladFingers I was just saying that you go from the basics to something a lot more complicated. You use the command in it description here, “Locate… use to locate text.” There is no traditional BASIC either. ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength The built-in manual refers to a traditional BASIC spaceturtles spaceturtles Video Games I like to play video games! Hobbies Avatar Block I didn't change my avatar for 30 days. Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength There isn't exactly a traditional basic out there because of variants but there is an original. ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength the built-in manual actually refers to a conventional BASIC oops
ninjagnu ninjagnu This makes me think we need a doc here: https://learnxinyminutes.com/ ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength finally the first up vote is here! I KNEW SOMEONE WOULD LIKE MY TUTORIAL! Shelly Shelly There can be a variety guys, people learn differently so its better for there to be options, at least in my opinion. Actually, I'll shut up. Randomous and Lumage can decide. kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website I think the (currently) -7 votes says otherwise Shelly Shelly Well I just think its bad to pounce on a tutorial for this, when some people may genuinely like it. Some people learn differently. But like I said, Lumage and Randomous should make determinations on what's good, since their opinions are what matter. AnswerXOX AnswerXOX Great Page Hidden Achievements RNG Hidden Easter Eggs Second Year My account is over 2 years old Website Please don't copy me with my really bad unfinished tutorial ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength i'm trying to actually complete the tutorial, it's just i'm adding a few (usally 1) sections/commands at a time kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website There's already a (more useful) tutorial on this: How To Program #2 ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength i said it was unfinished tho kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website I think one tutorial on how to print text is enough... but also randomouscrap has 8 tutorials for beginners that are already incredibly useful. I would recommend creating a tutorial for something that there isn't already a resource for. ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength i guess i could make a tutorial on how to use my ESRB ratings but a tutorial is included in the code of the README so it'd be kinda pointless kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website Instead of a resource for that, you could create a thread in the "Talk about programs" forum and describe how to use it there. If you would like to contribute more to resources, there are still some things that can be done in Smilebasic that does not have formal resource page for them (not that I saw, anyways). Examples would be saving and loading in-game data, using spanim, etc. These examples aren't particularly difficult to do, but many users do not know how to do them. ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength did you have to post that while i was in the middle of submitting my ESRB ratings? kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website *shrugs* ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength also i don't know how to make saves kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website saveing the game Saving and Loading String Arrays The forums are a good place to go find questions about programming that could be made into a resource. ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength *Saving the game you said saveing the game kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website I know it was wrong, it was the title of the thread so I left it. ToadIsTheBest ToadIsTheBest Avatar Taboo I didn't change my avatar for 180 days Website Video Games I like to play video games! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength oh. ok