プレイ日記
Alex Terrarian987
Im entirely new!How do i make games?
2そうだね
プレイ済み
返信[1]
親投稿
Pkyoshi19 Pokeyoshi19
You can either check out the official tutorials on smilebasic.com Or ask the community on smilebasicsource.com Good luck!
1そうだね
プレイ済み
返信[2]
親投稿
Alex Terrarian987
Thank you!
1そうだね
プレイ済み
返信[3]
親投稿
Imposs Imposs1221
or watch petitprofessor on youtube
0そうだね
プレイ済み
返信[4]
親投稿
Stewart segludian
When you first start programming, it is customary to begin with a hello world program. Type the attached code in the editor then switch to the run window, type RUN and hit enter to get the program to execute. The print command prints out the text between the double quotes, in this case Hello World. Try modifying the code to write something different to the screen.
1そうだね
プレイ済み
返信[5]
親投稿
Stewart segludian
As you move on you will want to save things in variables. Line one - option strict - turns on requiring variable declarations which is useful. Line 2 - var - declares two variables name$, and age%. In SmileBasic you set the type of variable by the symbol on the end of the variable name. % is for whole numbers, # for numbers with a decimal point, and $ for strings which hold text/words.
0そうだね
プレイ済み
返信[6]
親投稿
Stewart segludian
Lines 4 and 5 let you ask the user for data and save it into a variable. One we are finished with that we make a decision in the code with IF. Between IF and THEN you write an expression that evaluates to true or false in the case we compare age% to a set number. If the expression is true the next block of code is evaluated otherwise it is skipped. You can add extra checks with elseif.
0そうだね
プレイ済み
返信[7]
親投稿
Stewart segludian
if you use else it runs only when the original if and any elseif statements were never executed. endif says you are done with the if command. For each condition we print out some text. Note how we can glue bis of text together with +. On numbers that would do addition instead. str$ changes a number into a string. I hope that all makes sense.
0そうだね
プレイ済み
返信[8]
親投稿
Stewart segludian
Attached is a small number guessing game. You get a random number between 0 and one less than the number entered in parenthesis with the rnd() function. The repeat/until command will execute a block of code over and over until a condition is true. Otherwise everything else in the code should look familiar. Let me know if you have questions or want more examples.
0そうだね
プレイ済み
返信[9]
親投稿
Alex Terrarian987
Something like this? Please don't judge if its wrong...
0そうだね
プレイ済み
返信[10]
親投稿
Stewart segludian
The first half looks ok, but after that, I think you want something like: var name$ input "Give our hero a name"; name$ if name$ =="2" then print "That's a cute name." endif
1そうだね
プレイ済み
返信[11]
親投稿
Alex Terrarian987
Thanks!And...How would i able to run a "test-drive" to ensure my game is running exactly how i want it to be?
0そうだね
プレイ済み
返信[12]
親投稿
zero TeamZRO
Stewart, you are awesome for giving so much time and effort into helping Alex. On behalf of the human race, I thank you for existing.
4そうだね
未プレイ
返信[13]
親投稿
Oscar PwnageBlock
I'm glad to see other people helping out! Keep up the good work!
1そうだね
プレイ済み
返信[14]
親投稿
Stewart segludian
Thanks. To run the program there are two buttons on the bottom left display [I think], and edit switch from edit to display [I think] then either type run or click the run button in the upper right of the bottom screen and hit enter to run what you typed in in edit mode. Hold down the L button and click the save or load button to save/load what you wrote in edit mode.
0そうだね
プレイ済み