Archiverse Internet Archive
投稿のみ 投稿と返信
前のページ(最近)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
次のページ(過去)
返信[9]
親投稿
raimondz raimondzz
Nope, VAR/DIM is used for every kind of variable(Number, strings or array). The difference with A=B-C is that your example is an implicit declaration of the variables meanwhile DIM/VAR do a explicit declaration.
0そうだね
プレイ済み
返信[1]
親投稿
raimondz raimondzz
What is the current progress of this project?
0そうだね
プレイ済み
返信[7]
親投稿
raimondz raimondzz
DIM/VAR let you declare a variable. This sentence is useful when you create a function with DEF because the variable you use is based on the context. Example: 'Global variable VAR X$="WORLD" DEF showX VAR X$="HELLO" 'Varible that exist only inside showX ? X$; END showX ? X$
1そうだね
プレイ済み
返信[4]
親投稿
raimondz raimondzz
DEF readData VAR S$ RESTORE @LAB WHILE 1 READ S$ IF S$=="" THEN BREAK ? S$ WEND RETURN @LAB DATA "h","e","l","l","o" DATA "" END readData
1そうだね
プレイ済み
返信[3]
親投稿
raimondz raimondzz
You need to put data below a label. Then, use restore to put the pointer on the first data of the label. After that, use read to get the data.
0そうだね
プレイ済み
返信[16]
親投稿
raimondz raimondzz
- Don't use goto or gosub. Use DEF instead of gosub. - Don't repeat yourself. Try to create functions (Using DEF) instead of copy paste. That way, you have to do less changes in the future. Finally, I recommend search in google "game programming patterns". I know this is not a OOP language but there are useful information to make things with less code, easier to understand and faster.
0そうだね
プレイ済み
返信[15]
親投稿
raimondz raimondzz
I don't recommend use : as new line because the code became hard to read. Try to organize your code in a way that is easy to read. Some tips: - Use commentaries to separate parts of your code. - Try to write what your code do on process that are complex. - Avoid programming in one line. Try to keep the length of each line less than 40 char to have a clear view of whats going on. ...
0そうだね
プレイ済み
返信[2]
親投稿
raimondz raimondzz
Check SmileBasicSource. There is a lot of tutorials and behaviors not documented by smilebasic. The manual of the game has some tutorials too.
1そうだね
プレイ済み
返信[5]
親投稿
raimondz raimondzz
Motivation: In Smilebasic, arrays let you store a "dynamic" amount of elements. A static defintion is something like this: VAR SP1,SP2 You see, there are two elements. You need to write another variable to create another. With array: VAR SP[0] Here is an array with 0 elements, but if you use PUSH then you can have a dynamic number of variables without changing the code.
3そうだね
プレイ済み
プレイ日記
raimondz raimondzz
More attacks. I ended making other another array pool to handle them. Now I'm going to work again on the screen to build the folder since I haven't made code for inventory.
5そうだね
プレイ済み
返信[4]
親投稿
raimondz raimondzz
I think Person(JP) explanation isn't clear. What AND does is compare the bit representation of two values and return the value build by the logic operator AND. For example if you compare 3 AND 6 it will pass. 3 in bit is &b011 and 6 is &b110, and since the second bit match the returned value will be &b010 aka 2. If you compare 3==6 you will get false since they are not the same number
3そうだね
プレイ済み
返信[16]
親投稿
raimondz raimondzz
FYI the file exported on LitterBox only contains the text of the MML You need to use BGMPLAY to hear the song. EXAMPLE: VAR S$=LOAD("TXT:[nameOfYourSong]",0) BGMPLAY S$
1そうだね
プレイ済み
返信[1]
親投稿
raimondz raimondzz
1. Load a custom sprite sheet using LOAD "GRP4:[nameOfFile]" 2. Use SPDEF to define the properties of the sprite. 3. Display the sprite using the definition number used on step 2. Example: VAR SP LOAD "GRP4:MYSPRITES" SPDEF 50,0,0,32,32,16,16,1 ... SP = SPSET(50)
1そうだね
プレイ済み
プレイ日記
raimondz raimondzz
I've done a lot since the last time but there still things left to be done. One thing I want to do are "attacks" that are alive(Example: thunderball that move slowly on the map or boomerang). By the way, I don't know if I'll enter to smilebasicsource's contest. I want to do a game that use the gyro sensor but I'll see if can do something this weekend.
9そうだね
プレイ済み
返信[6]
親投稿
raimondz raimondzz
Another way to handle camera movement is to set an sprite that will serve as the camera and link all the entities to it with splink (Except the player since he's always on the middle of the screen.) The you just need to move the camera sprite to move everything else. Note that you need to ensure that the management number of each sprite is greater than the one used by the camera.
0そうだね
プレイ済み
返信[5]
親投稿
raimondz raimondzz
Well, I haven't seen your new code yet but you need to iterate the tree array on each loop and call spofs for each of them. Since I see spset on the first pic, I assume that the code you posted is part of the initialization of your game.
0そうだね
プレイ済み
返信[2]
親投稿
raimondz raimondzz
You should use "TH GRP Editor" to edit sprites. It has way more features than the one provided by smilebasic paint. The program is in japanese, but is not hard to figure out what each option do. V1.8.2 KEY:[KEJ23C3] Miiverse id-name: thanks_0u0
0そうだね
プレイ済み
返信[4]
親投稿
raimondz raimondzz
Smilebasic is a "game" where you can make programs using a modification of the language "Basic". Also, you can download the programs made by other people for free. The pic that you see above is my attempt to do a game similar to megaman battle network.
2そうだね
プレイ済み
返信[7]
親投稿
raimondz raimondzz
By the way, use the parameters of the sprites instead of hard coding the box parameters on the "if" posted by @*J.P.*[P]£. (USE SPCHR to get those parameters) If your sprite won't be on the middle of the screen(or if the image will change) then you must obtain the parameters and compare them with the coordinates of TOUCH.
1そうだね
プレイ済み
返信[2]
親投稿
raimondz raimondzz
There are two ways: 1. Make a sprite that follow the touch event(TOUCH out TT,TX,TY) and has the propertie to collide with other sprites. 2. Get the properties of the sprite with "spchr out x,y,w,h,a" and check if the touch event is inside the rectangle formed with x,y,w and h
0そうだね
プレイ済み