Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
i cant really understand
i = 0 -- this is before any functions
function onTick()
if i == X then -- set X to a number
--add something here
end
i = (i + 1)%Y -- set Y to the tick on which the counter will reset (Y must be greather than X)
end
If performance is bad, ingame time slows down so the 60 ticks are constant.
That beeing said, lua in sw basically works with event scripts, there is no point trying to use delays there.
My game runs at 62.5 ticks per second.
You've replied this to about 5 irrelevant threads now. Your physics is reporting 62FPS because it's 62 physics iterations per second. Ticks are still 60/s because they're hardwired to do so.
no i counted up ticks, via a micro controller, for minutes and divided that by seconds. For example, 18750 tick was exactly 5 minutes.
That's one late reply!
I'm happy to admit i was wrong in that reply. I did some tests at some point after that, and while the ticks absolutely should be hardcoded in an async way from other stuff, it looks like they're strictly tied to the physics update rate.
Which means they can do 62 ticks / s. I tested this by using a handheld stopwatch and noticed the game's timer was running slow when using 60 tick/s
Performance issues would mess up logic if that wasn't the case.
True to a degree. It'd just need sanitization or handling, though admittedly that would need an extra line for inputs. You could opt for either with "wait for sync" or just not bothering. Speedo for instance could run asynch just fine.