Archiverse Internet Archive
投稿のみ 投稿と返信
前のページ(最近)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
次のページ(過去)
返信[26]
親投稿
Stewart segludian1
READ/DATA is used to add data in with your code. If you were using a different language you might just read from file instead. However BASIC was made back in the days of puch cards and tape drives so file access was not always possible. When you first start a program, READ will find the first DATA statement and return the first value it finds then move to the next bit of data.
1そうだね
プレイ済み
返信[18]
親投稿
Stewart segludian1
If you get the math right you can have a fast and slow machine animate the same thing in the same amount of time. The fast machine just gets more frames of animation shown and thus has smoother movement and more responsive gameplay.
1そうだね
プレイ済み
返信[17]
親投稿
Stewart segludian1
What you want to do is keep track of how much time passes between frames and update the game world by that much. Think of it like a physics simulation if that helps.
1そうだね
プレイ済み
返信[11]
親投稿
Stewart segludian1
You should normally call vsync once per frame just to make sure everything you draw actually shows up on screen and doesn't disappear before you get a chance to see it. If you have a game that is slower than the screen refresh rate, then vsync is unecessary and may be slowing your game down. However most of the time you want it and don't need to pass in any parameters.
0そうだね
プレイ済み
返信[10]
親投稿
Stewart segludian1
When you call vsync you are telling the 3DS to wait for the current screen to finish drawing. In the tube tv example this is when the electron beam is moving back to the top left after finishing a frame. Sine the 3DS wants to refresh the screen 60 times per second this automatically limits you to a maximum of 60 frames per second. If you pass a number to vsync it waits that many screen refreshes.
0そうだね
プレイ済み
返信[9]
親投稿
Stewart segludian1
For computers, the information of what to draw to the screen is held in a block of memory called the screen buffer. If you write out to the screen while it is being filled you can get bad artifacts like tearing where the screen has parts of two different frames of the game. So you want to send over the next frame after the current frame finishes but before the next one starts drawing.
0そうだね
プレイ済み
返信[8]
親投稿
Stewart segludian1
VSYNC stands for Vertical Sync. Think of an old tube TV. The inside of the tube is coated with phosphors that glow momentarily when hit by an electron beam. In the back of the tube an electron beam is bent by large electro-magnets that move the beam left to right for each row of pixels and from top to bottom for each row. When it finishes a screen full, the beam is moved back to the top left.
0そうだね
プレイ済み
返信[8]
親投稿
Stewart segludian1
If you look at all the button constants (#A, #B,#UP, etc) they are powers of 2, a consequence of this binary math. So as stated by others when you use == you check for equal to which matches a specific state for all the buttons not just one. if button() == (#A + #B) for example would only be true if the A and B buttons are pressed and nothing else. You use AND to check buttons individually.
1そうだね
プレイ済み
返信[7]
親投稿
Stewart segludian1
When you call Button() you get back not a number, but a set of on/off bit flags encoded into a number. If you look at the number in binary you get a 1 or 0 for each button. So when you AND it with a number or constant (Please use the #A, #LEFT, etc. constants it makes your code more readable) you are really just isolating that bit to see if it is False (0) or True (not 0) or released/pressed.
1そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian1
Happy Birthday!
1そうだね
プレイ済み
返信[2]
親投稿
Stewart segludian1
Here is a load/save sample I made a while back, hope it helps.
0そうだね
プレイ済み
返信[4]
親投稿
Stewart segludian1
and part 2 to finish it up.
0そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian1
Part 1 of a Demo I made for that sort of thing.
0そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian1
What are you currently looking for help with? Also, welcome back.
1そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian1
I hope your 2DS will recover in full.
0そうだね
プレイ済み
返信[2]
親投稿
Stewart segludian1
If you want more than one statement on a line of code you need to seperate them with colons (:). However, unlike its predecessor you can have multi-line if statements in smile basic. Something like: IF magic$ =="ALAKAZAM" THEN PRINT "A MAGIC BOLT FIRES!" BEEP 42 WAIT 10 ELSE PRINT "THAT ISN'T THE SPELL" BEEP 13 WAIT 6 ENDIF Also, the GOTO's frighten me. DEF, WHILE/WEND, REPEAT/UNTIL
0そうだね
プレイ済み
返信[10]
親投稿
Stewart segludian1
Looks super cool, I will look forward to playing it when it is finished.
0そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian1
Wow! That looks awesome!
2そうだね
プレイ済み
返信[8]
親投稿
Stewart segludian1
Played with it a bit more, added bg and sprite rotation.
2そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian1
You can hold the left or right shoulder button and click the save button on the top row of the lower screen for a nicer save screen. This works with LOAD too. If you would rather type SAVE "FILENAME" and LOAD "FILENAME".
0そうだね
プレイ済み