プレイ日記
BeefJerkey SuperBeefJerkey
A couple questions: How do I get rid of the console words when I run the program? How do I delay an action (sword slash or kick) without delaying everything else?
0そうだね
プレイ済み
返信[1]
親投稿
mystman12 mystman12
Just add CLS (Or ACLS, which clears almost everything and loads all the default graphics) to the beginning of your program. (Or anywhere else you need to clear console text.) As for a delay, there are a few different ways you could go about it. One simple way is to use a variable as a sort of timer. Say you want an 8 frame delay after punching. You could have variable DELAY and set it to...
0そうだね
プレイ済み
返信[2]
親投稿
mystman12 mystman12
8, and then have a function that decreases the value by 1 each frame whenever it is greater than (>) 0. While DELAY is greater than 0, the player shouldn't be allowed to move. Note, if you don't currently have a VSYNC 1 in your game loop, the timing for these sorts of things will be very unreliable and inconsistent. (Especially on O3DS vs. New3DS) Make sure you add one, to either the very...
0そうだね
プレイ済み
返信[3]
親投稿
mystman12 mystman12
beginning or end of your code. It doesn't matter too much, but if you find something isn't displaying properly just try moving it to the other side. If you don't have one and do add one, it may seem to slow your game down since you would have originally programmed your game to run without it, but VSYNC really is a vital command to get proper timing and control over a game.
0そうだね
プレイ済み
返信[4]
親投稿
BeefJerkey SuperBeefJerkey
Wow, thanks for the help! By the way, I'm having trouble with sprite collision detection... I'm posting a screenshot right now.
0そうだね
プレイ済み