<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Making_an_FPS_Counter</id>
	<title>Making an FPS Counter - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Making_an_FPS_Counter"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Making_an_FPS_Counter&amp;action=history"/>
	<updated>2026-04-11T08:49:48Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Making_an_FPS_Counter&amp;diff=1758&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Making_an_FPS_Counter&amp;diff=1758&amp;oldid=prev"/>
		<updated>2022-07-21T08:33:15Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 11:33, 21 июля 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Making_an_FPS_Counter&amp;diff=1757&amp;oldid=prev</id>
		<title>scratch&gt;Dhuls: /* Timer Not in Use Method */ Used better Warning from Stop Detection#Method 2</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Making_an_FPS_Counter&amp;diff=1757&amp;oldid=prev"/>
		<updated>2021-08-21T06:00:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Timer Not in Use Method: &lt;/span&gt; Used better Warning from &lt;a href=&quot;/index.php/Stop_Detection#Method_2&quot; title=&quot;Stop Detection&quot;&gt;Stop Detection#Method 2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;FPS&amp;#039;&amp;#039;&amp;#039; (frames-per-second) is a value that shows the current [[Wikipedia:Frame rate|frame rate]]. Showing the current frame rate can be useful for debugging projects that may affect [[Scratch]]&amp;#039;s performance.&lt;br /&gt;
&lt;br /&gt;
==Making an FPS Variable==&lt;br /&gt;
&lt;br /&gt;
===Timer in Use Method===&lt;br /&gt;
If the timer is being used, the following script can be used:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when flag clicked&lt;br /&gt;
reset timer&lt;br /&gt;
set [Previous Timer v] to (0)&lt;br /&gt;
forever&lt;br /&gt;
 set [FPS v] to ((1)/((timer)-(Previous Timer)))&lt;br /&gt;
 set [Previous Timer v] to (timer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====How it Works====&lt;br /&gt;
When the flag is clicked, the timer is reset, a variable, in this example, &amp;quot;Previous Timer,&amp;quot; is set to 0 and and a forever loop starts. In this loop, another variable, in this example, &amp;quot;FPS,&amp;quot; is always set to 1 divided by the current value of the timer subtracted by the value of the &amp;quot;Previous Timer&amp;quot; variable, and the &amp;quot;Previous Timer&amp;quot; variable is set to the current timer. After this block&amp;#039;s script is run, the timer is reset. The value of the &amp;quot;FPS&amp;quot; variable is roughly the value of the current FPS.&lt;br /&gt;
&lt;br /&gt;
===Timer Not in Use Method===&lt;br /&gt;
{{caution|The following script given cannot be used if the timer is already used for other purposes since this could break the project, as it constantly resets the timer.}}&lt;br /&gt;
The current FPS can be shown with the following [[script]] if the [[timer]] is &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; being used:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when flag clicked&lt;br /&gt;
reset timer&lt;br /&gt;
forever&lt;br /&gt;
 set [FPS v] to ((1)/(timer))&lt;br /&gt;
 reset timer&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====How it Works====&lt;br /&gt;
When the flag is clicked, the timer is reset and and a forever loop starts. In this loop, a [[variable]], in this example, &amp;quot;FPS,&amp;quot; is always set to 1 divided by the current value of the timer. After this block&amp;#039;s script is run, the timer is reset. The value of the &amp;quot;FPS&amp;quot; variable is roughly the value of the current FPS.&lt;br /&gt;
&lt;br /&gt;
[[Category:Variables and List Tutorials]][[Category:Scripting Tutorials]][[Category:Game Design Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;Dhuls</name></author>
	</entry>
</feed>