A simple game lagging tremendously on sprite animation

Get help using Construct 2

Post » Thu Jul 28, 2016 12:03 pm

Message: abhishekgametion can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I am a new on construct2. I have attached my simple game. here the bird flies on the mouse click.
But as the flying animation starts, the game lags too much. The fps is 55-60 all the time.
the lag can be observed on the parallax background.
I dont know whether its fault of my GPU or i have written a buggy game...
So, kindly help me please.


https://www.dropbox.com/s/2k3n56gr4yy7t1x/test.capx?dl=0
B
6
S
2
Posts: 8
Reputation: 468

Post » Thu Jul 28, 2016 12:17 pm

abhishekgametion wrote:I am a new on construct2. I have attached my simple game. here the bird flies on the mouse click.
But as the flying animation starts, the game lags too much. The fps is 55-60 all the time.
the lag can be observed on the parallax background.
I dont know whether its fault of my GPU or i have written a buggy game...
So, kindly help me please.


https://www.dropbox.com/s/2k3n56gr4yy7t ... .capx?dl=0


Please remove non-standard behavior by Zed2100 or users may not be able to help.

I'd also recommend testing with the latest release as many bugs have been fixed since the version you are using.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,558
Reputation: 60,460

Post » Thu Jul 28, 2016 12:39 pm

Message: abhishekgametion can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
https://www.dropbox.com/s/qxtctu8thzrpm11/test.capx?dl=0

This is the capx without any non-standard behaviors...
B
6
S
2
Posts: 8
Reputation: 468

Post » Thu Jul 28, 2016 1:24 pm

Here it is fixed in the way you started: https://drive.google.com/file/d/0BwT_0lczDpc9Vndva1ktMlgtUnM/view?usp=sharing

But just FYI, it is not the best approach for a flappy bird. You should use platform behaviour for the bird instead of physics (physics are much more CPU consuming, so use it only when you really need physics behaviour). Also background should move infinitely and player should remain in one position (X position I mean). So you just make an illusion that player is moving forward.

There is an example template built-in in C2, you should check it out and investigate. That will give you a better picture.
ImageImageImage
B
33
S
19
G
82
Posts: 1,039
Reputation: 46,257

Post » Fri Jul 29, 2016 4:44 am

Message: abhishekgametion can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
BackendFreak wrote:Here it is fixed in the way you started: https://drive.google.com/file/d/0BwT_0lczDpc9Vndva1ktMlgtUnM/view?usp=sharing

But just FYI, it is not the best approach for a flappy bird. You should use platform behaviour for the bird instead of physics (physics are much more CPU consuming, so use it only when you really need physics behaviour). Also background should move infinitely and player should remain in one position (X position I mean). So you just make an illusion that player is moving forward.

There is an example template built-in in C2, you should check it out and investigate. That will give you a better picture.



Thanx Thanx BackendFreak, You saved me, The issue has been solved....and i will surely look into behaviors more deeply...
B
6
S
2
Posts: 8
Reputation: 468


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 25 guests