Solarus-Games English Forum

Solarus => Development => Topic started by: GregoryMcGregerson on January 27, 2015, 07:12:39 PM

Title: frames per second technical question
Post by: GregoryMcGregerson on January 27, 2015, 07:12:39 PM
Something I've been wondering for awhile. Does Solarus recognize decimal points in frame delay? For example 16.67ms which is one frame in 60fps. The animation editor does not allow such a number but it can be put into the dat file manually. Does it actually work in-game or is it rounded down to 16? Thanks so much.
Title: Re: frames per second technical question
Post by: Renkineko on January 28, 2015, 07:19:23 AM
If the animation editor does not allow it, it's highly probable the decimal are not recognize. You can test by setting the decimal value in the .dat and then print the getter from the game to see if it's truncated or not ( http://www.solarus-games.org/doc/latest/lua_api_sprite.html#lua_api_sprite_get_frame_delay ).
Title: Re: frames per second technical question
Post by: Christopho on January 28, 2015, 08:37:08 AM
It is truncated. Only entire milliseconds are supported.