LoginLogin

[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.

There's already a (more useful) tutorial on this: How To Program #2

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
i said it was unfinished tho

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
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.

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
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

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
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.

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
did you have to post that while i was in the middle of submitting my ESRB ratings?

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
*shrugs*

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
also i don't know how to make saves

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
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.

Please don't copy me with my really bad unfinished tutorial

Replying to:answer
Please don't copy me with my really bad unfinished tutorial
i'm trying to actually complete the tutorial, it's just i'm adding a few (usally 1) sections/commands at a time

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
*Saving the game you said saveing the game

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
I know it was wrong, it was the title of the thread so I left it.

Replying to:kitesinpowerlines
There's already a (more useful) tutorial on this: How To Program #2
oh. ok

finally the first up vote is here! I KNEW SOMEONE WOULD LIKE MY TUTORIAL!

This makes me think we need a doc here: https://learnxinyminutes.com/

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.

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.
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.

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.
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.

This is literally the most confusing thing I've read