Merkoth wrote:But to be honest, I'm not really sure what was going on. In fact, one of the bugs fixed in 0.3.1 is the sleep() function which was causing trouble on Linux (surprisingly, 0.2.1 worked fine) so I'm kinda confused right now, hehe.
love.timer.sleep was dll-exported in 0.3.0 (not before), which caused a conflict with sleep
in unistd.h. The function ended up referring to the latter one, and thus sleeping for 1000 times too long.
cag wrote:Love already has some sort of cpu-letting mechanism hard-coded into it, so my tests indicated that adding sleep either matched or actually (!) hindered performance, and that Love works fine without all that sleeping-mabobers. That's nice though, hiding all that gritty detail from new programmers...Course, if it's different on other OS's/systems, then it's different, and I'm wrong.
This is ... not completely
true. LÖVE tries to get "vertical sync" if possible, and if it does, the FPS will be capped at 60FPS (edit: or your monitor refresh rate) and the CPU spared from horror. In my experience, vertical sync (as implemented by SDL) works most often on Windows with nVidia drivers, but is *supposed* to work everywhere. Of course, any feeble requests of vsync can be ignored by the graphics driver (it is usually a setting in the control panel), so yes it depends on the host system.
About flickering: I didn't notice any flickering, but if you like to set the display mode in Lua instead of the config file (nothing wrong with that), set the display_auto
config option to false
. See this page
for an example. (Should probably have the same example at the page love.graphics.setMode(), *ahem*).