プレイ日記
NagatoYuki newtonyic1
can someone help me do a very clean fps counter?
3そうだね
プレイ済み
返信[1]
親投稿
Josh josh.h7
I made a fps counter for anyone to use. You can use the code in it :) Key [QDX513MD]
1そうだね
プレイ済み
返信[2]
親投稿
NagatoYuki newtonyic1
k thanks
0そうだね
プレイ済み
返信[3]
親投稿
amihart khoraski
Use MILLISECOND, not TIME$. Subtract the current MILLISECOND from the previous MILLISECOND, divide it by a thousand, then put that all under 1 and you will get your FPS.
2そうだね
プレイ済み
返信[4]
親投稿
NagatoYuki newtonyic1
ok
0そうだね
プレイ済み
返信[5]
親投稿
NagatoYuki newtonyic1
can you write it in smile basic?
0そうだね
プレイ済み
返信[6]
親投稿
NagatoYuki newtonyic1
how you do previous milisecond with current milisecond
0そうだね
プレイ済み
返信[7]
親投稿
amihart khoraski
MILLISECOND gives you the amount of time in milliseconds that has passed since your program started. You just need to find a difference in milliseconds. VAR FPS,PMILLI @LOOP FPS=1/((MILLISECOND-PMILLI)*1000) PMILLI=MILLISECOND [...] GOTO @LOOP
1そうだね
プレイ済み
返信[8]
親投稿
NagatoYuki newtonyic1
it says 'cant devide by zero' i'm sorry could you finish the three dots i'm just learning
0そうだね
プレイ済み
返信[9]
親投稿
NagatoYuki newtonyic1
it says 'cant devide by zero'
0そうだね
プレイ済み
返信[10]
親投稿
amihart khoraski
You have nothing in your loop, so your loop is taking 0 milliseconds, and that calculation would give you an infinite amount of frames so it's giving you an error. You need to actually put something in your loop, like a "WAIT 1".
1そうだね
プレイ済み