Archiverse Internet Archive
投稿のみ 投稿と返信
前のページ(最近)
1 2 3 4 5 6 7 8
次のページ(過去)
返信[3]
親投稿
Stewart segludian
looks like you are missing a then on 204 and a endif a few lines above. See screenshot for details.
0そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian
PetitModem is hard to get working. Make sure to choose the slowest speed, and the two way communication mode (duplex if I remember). Also make sure the settings on the computer and smile basic sides match. Packing and unpacking files is also fairly cryptic. If you have the special cable try plugging mic into headphone and headphone into mic. If not turn things up obnoxiously loud and hope.
2そうだね
プレイ済み
返信[2]
親投稿
Stewart segludian
You can load an image and put it on the drawing page with something like the attached. If you just want to change the background tileset you could add something like load "grp5:<filename>", false. The background would ideally not just be random stuff too. You would be better of reading that from file or data statements instead.
1そうだね
プレイ済み
プレイ日記
Stewart segludian
Here is an attempt at background scolling. I thought it might be useful to others. Let me know if you see any bugs.
7そうだね
プレイ済み
返信[5]
親投稿
Stewart segludian
Attached is a small program that animates a rotating spaceship that you can move around with the circle pad. The "I" option does keyframe animation. The data is loaded up from a data statement at the end of the code. The first number is the number of frames. After that you have two numbers per frame. The first is duration in 1/60ths of a second, the second is the sprite definition number to show.
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そうだね
プレイ済み
返信[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そうだね
プレイ済み
返信[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そうだね
プレイ済み
返信[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そうだね
プレイ済み
返信[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そうだね
プレイ済み
返信[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そうだね
プレイ済み
返信[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そうだね
プレイ済み
返信[10]
親投稿
Stewart segludian
Same thing, just remove the code for the layers you don't want. In my demo here, layer 3 had all of the interesting tiles.
0そうだね
プレイ済み
返信[8]
親投稿
Stewart segludian
That is just one map, but it has four layers. If you put everything on a single layer, you can skip the other three. For multiple layered maps, you can move the layers at different rates to get a nice parallax effect.
0そうだね
プレイ済み
返信[2]
親投稿
Stewart segludian
Looks super nice, I can't wait to download it.
0そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian
If you go to the smile tool and then the spdef tab, you can scroll through them. The top screen tells you the number of the selected tile. However, it is really just a 16x16 pixel grid numbered left to right top to bottom starting at zero.
1そうだね
プレイ済み
返信[6]
親投稿
Stewart segludian
You probably want to change 64, 32 to 64, 64 in the code since I was only using the top half of the map. If you do it right you can get something like the attached image. Truthfully however, I might just skip the map editor and use read/data commands to design things since you can't choose any size other than 64x64 in the map editor.
0そうだね
プレイ済み
返信[5]
親投稿
Stewart segludian
Here is a demo of what I mean. You can skip the grp5 load if you don't have custom bg tiles. While you still want to save in the map editor so you can edit things. The layer files you get from the sc save command. Change the file names as appropriate.
0そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian
It sounds like you are trying to parse a command line. Perhaps the attached code's split function will help. You pass in a string, a delimiter, and an array to fill. It chops up the string wherever it finds the delimiter putting the vales in the array. [warning, it emptys the array first].
2そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian
use sc save instead of save in the map editor. This will create a file per layer. For each layer, load that as a dat: file into an array then pass that array to bgload. If you have custom tiles load that as grp5:filename.
0そうだね
プレイ済み