I am working on a game with a friend and noticing some odd hiccups using the love engine on my machine (not just in our game, but in any game/example I run using Love). As an example, I get a hiccup where the program freezes for about a second when running the zoetrope demo's sprite benchmark (http://libzoetrope.org/). I can get over 2000 sprites in the sprite benchmark at 60fps, but there are those hiccups when getting there. My machine is fairly new (Intel Core i7-2600 @ 3.4GHz, 8 GB RAM) and I am running Windows 7 Home Premium 64 bit. I can run games like Skyrim fine and get these hiccups even after doing a reboot so I don't think it's performance related.
What's even more confusing is it doesn't seem to be related to garbage collection. In our game I use collectgarbage('count') every frame to show memory usage and the sharp declines (when I assume it is garbage collecting) do not line up with the hiccups. That is sometimes it hiccups and the memory keeps rising, and sometimes it hiccups and there is a drop in memory use right after the hiccup.
When I run love programs on my laptop, which is older and less powerful but also uses windows 7 64 bit, I do not see these hiccups.
Has anyone had similar issues, or does anyone have any insights?
Love hiccups on decent computer
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Love hiccups on decent computer
Source code! Always source code. It helps immensely, without it it's pretty hard for us to pin down the cause of the "hiccups". As a side note I'd recommended not using the collectgarbage("count") call too much, I recall reading somewhere that repeated calls can impact performance.
Also I might as well throw out the "update your drivers?" solution. It has helped in some cases.
Also I might as well throw out the "update your drivers?" solution. It has helped in some cases.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
- Contact:
Re: Love hiccups on decent computer
I am eiyukabe's friend. I just wanted to add that I do not get any hiccups or freezes like he does when running the zoetrope sprite benchmark. I am running Ubuntu 12.10, Linux 3.5.0-19-generic, with four Intel Core i3 CPU M 350 @ 2.27GH processors and 4 GB RAM. I am also using LÖVE 0.8.0 compiled to use LuaJIT.
Re: Love hiccups on decent computer
I'm not sure I can provide useful source code. The problem isn't just with our game, it happens with the zoetrope demo I linked (which I did not write), and it happened with another love-based game I downloaded. It seems to have something to do with things written in love on my PC (but not my laptop). I can try to write some small programs and see which ones cause it to happen and then post that if that would be useful.
Thanks for the heads up on collectgarbage("count"), I'll remove it -- just wanted to see if the hiccups happened alongside garbage collection.
Thanks for the heads up on collectgarbage("count"), I'll remove it -- just wanted to see if the hiccups happened alongside garbage collection.
Re: Love hiccups on decent computer
Boolsheet informs me that I was mistaken.
Have you tried grabbing some stuff from Projects and Demos and seeing if they run alright? There might be a theme to problem if they do.<Boolsheet>Lafolie: You were probably thinking of collectgarbage("collect") when you recommended not to use "count" often. Getting the count is very fast as it just retrieves a integer.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Re: Love hiccups on decent computer
I'd blame the graphics driver and its OpenGL implementation. I don't think this is coming from LÖVE or Lua, they're usually fast enough that it has to wait for the vertical synchronization on every frame. If it is the vsync part of the graphics driver, you could check if love.graphics.present blocks unusually long. Save every dt value passed to love.update to a file and check if they're all around 16 ms. If there's a spike every 60 frame, we know there's something fishy going on.
Shallow indentations.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests