Somebody helps me out with the performance problem?

Show off your games, demos and other (playable) creations.
User avatar
liyonglove2d
Prole
Posts: 38
Joined: Sun Mar 29, 2015 7:06 am

Re: Somebody helps me out with the performance problem?

Post by liyonglove2d »

I failed to upload the .love file, but you can download it here :) : http://pan.baidu.com/s/1qWsQiRU
User avatar
arampl
Party member
Posts: 248
Joined: Mon Oct 20, 2014 3:26 pm

Re: Somebody helps me out with the performance problem?

Post by arampl »

Nice game!

Gives 60 FPS (100-120 if vsync is off) on my system (about 4 years-old, CPU: AMD Athlon II X4 640, RAM: 12 GB, VIDEOCARD: Nvidia GeForce GTX 560 Ti, OS: Xubuntu 14.10 64 bit). Not very powerfull at these days as you see.

At first launch it loads a long while, at second - almost immediately. Perhaps you bake resources at first launch?

So I didn't encountered any problems with performance.
User avatar
liyonglove2d
Prole
Posts: 38
Joined: Sun Mar 29, 2015 7:06 am

Re: Somebody helps me out with the performance problem?

Post by liyonglove2d »

arampl wrote:Nice game!

Gives 60 FPS (100-120 if vsync is off) on my system (about 4 years-old, CPU: AMD Athlon II X4 640, RAM: 12 GB, VIDEOCARD: Nvidia GeForce GTX 560 Ti, OS: Xubuntu 14.10 64 bit). Not very powerfull at these days as you see.

At first launch it loads a long while, at second - almost immediately. Perhaps you bake resources at first launch?

So I didn't encountered any problems with performance.
thank u~
As I mentioned above that I reduced the count of animals and plants a lot, it's now not that bad anymore :)
And I do not bake any resources now coz it's hardly finished yet. The OS does the thing I guess...

I found that the library that I use to draw spriter animations uses a 1000x1000 canvas to do the work, and that can be a problem definitely, and surely contributes to the bad performance. And I found that there's memory leak or something in the game, which I never thought of before.... Too much work still has to be done :death:

Anyway thank you guys~
User avatar
liyonglove2d
Prole
Posts: 38
Joined: Sun Mar 29, 2015 7:06 am

Re: Somebody helps me out with the performance problem?

Post by liyonglove2d »

Another problem of this game...... :x
I want your help so much!
http://love2d.org/forums/viewtopic.php?f=4&t=79948

THANKS A LOT!
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: Somebody helps me out with the performance problem?

Post by qubodup »

I recorded some gameplay:


As far as I know, a method used in 3d games is using level of detail models: low-poly & smaller-texture models for objects in the distance. I imagine 2d games use the same. So what you might want to do is: instead of scaling down big images when zooming out, you pre-render smaller images and use those instead.

Also there doesn't seem to be a use of supporting zoom levels which allow making the world much smaller than the window.

Regarding git:
code.csdn.net appears to be extremely slow at times when used from Germany. :( It is often offline (again, from Germany) and it took me at least 10 tries at different times to pull your repository (91MB).
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Somebody helps me out with the performance problem?

Post by Jasoco »

We can't help you much without a .love file. Are you making sure to not draw everything in the map at once? Only draw what's inside the camera view.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Somebody helps me out with the performance problem?

Post by davisdude »

liyonglove2d wrote:Another problem of this game...... :x
I want your help so much!
http://love2d.org/forums/viewtopic.php?f=4&t=79948

THANKS A LOT!
By the way, not to be rude, but this section of the forum is for showing off your games, not requesting help. With that in mind, you should primarily post updates about your code here.

Also, if you post something in Support and Development, chances are it will be read by the same users who read this post. If you think nobody's answered it in too long (i.e. it goes to the next page, as a decent bookmark), then you can "bump" the question.

That being said, I do like your game! Good luck! :)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
liyonglove2d
Prole
Posts: 38
Joined: Sun Mar 29, 2015 7:06 am

Re: Somebody helps me out with the performance problem?

Post by liyonglove2d »

qubodup wrote:I recorded some gameplay:


As far as I know, a method used in 3d games is using level of detail models: low-poly & smaller-texture models for objects in the distance. I imagine 2d games use the same. So what you might want to do is: instead of scaling down big images when zooming out, you pre-render smaller images and use those instead.

Also there doesn't seem to be a use of supporting zoom levels which allow making the world much smaller than the window.

Regarding git:
code.csdn.net appears to be extremely slow at times when used from Germany. :( It is often offline (again, from Germany) and it took me at least 10 tries at different times to pull your repository (91MB).
What you said is absolutely right. I'll limit the scaling operation when the game is done, so it wont be a big problem :)
And I'm in China, you know, code.csdn.net is much faster than github. And I feel bad for the inconvenience :brows:
Last edited by liyonglove2d on Wed Apr 01, 2015 6:13 am, edited 2 times in total.
User avatar
liyonglove2d
Prole
Posts: 38
Joined: Sun Mar 29, 2015 7:06 am

Re: Somebody helps me out with the performance problem?

Post by liyonglove2d »

davisdude wrote:
liyonglove2d wrote:Another problem of this game...... :x
I want your help so much!
http://love2d.org/forums/viewtopic.php?f=4&t=79948

THANKS A LOT!
By the way, not to be rude, but this section of the forum is for showing off your games, not requesting help. With that in mind, you should primarily post updates about your code here.

Also, if you post something in Support and Development, chances are it will be read by the same users who read this post. If you think nobody's answered it in too long (i.e. it goes to the next page, as a decent bookmark), then you can "bump" the question.

That being said, I do like your game! Good luck! :)
Oh I'm so sorry, I just realized that my post is in a wrong section! I'll be more careful next time! :death:
User avatar
arampl
Party member
Posts: 248
Joined: Mon Oct 20, 2014 3:26 pm

Re: Somebody helps me out with the performance problem?

Post by arampl »

Hi there, it's me again.
liyonglove2d, if you accept, two advices:

1. If you ever plan to translate your game onto other languages, or give that chance to others, you'd better organize all text messages in separate files as variables. This way people who will translate your game will not have to deal with source code at all (and you can keep it closed if you want).

2. At first launch screen freezes for several seconds. It would have more professional look, if you first load and draw some splash screen then load all other stuff. And during loading also show progress bar. I see you already use coroutines, so you should know how to implement this.

Best regards.
Post Reply

Who is online

Users browsing this forum: No registered users and 72 guests