I'm new to the game and I'm trying to start a game. I understand PRINT, INPUT, LOCATE, WAIT, and CLS, but I don't understand anything else. Right now, I need to know how buttons work, so please try to help!
Buttons are read by using BUTTON() instruction. BUTTON returns what button is being pressed (aside from START and SELECT).
I strongly recommend you three things:
1.- Toying around with the example program
2.- Read the instruction manual (http://smilebasic.com/en/reference/)
3.- Tap the "?" button on the touchscreen when you're writting a command to see more information and examples.
so if you were to check the buttons it would go like this,
IF BUTTON() AND #A THEN BEEP 5
here when used in a loop it will beep when pressing the A button, there are many things like #R and other stuff like that, you can use numbers specified in the button thingy (on help bar for button command) but personally i use #A or stuff like that.
the () after button is useful, look at help tool 4 more
a loop is what keeps the game from ending, a normal one goes like this
WHILE 'begining
WEND 'end
so it goes from top to bottom over and over, see if this werent there the program would end right away.
you would put the button stuff in there.
another thing is VSYNC, it sets your programs speed and is very useful, without it you would zoom insanely fast through the program,it makes it good speed