PERFORMANCE FOR [R-161]!

Bugs will be moved here once resolved.

Post » Thu Feb 13, 2014 2:25 am

CLICK THE LINK DIRECTLY BELOW THIS LINE TO DOWNLOAD CONSTRUCT 2 PERFORMANCE TEST FOR R-161:

https://drive.google.com/file/d/0B_4xfuagH96ramUxdUlSY3ZaYWM/edit?usp=sharing

Steps to reproduce:
1. Run .Capx in debug mode. (little bug button next to preview button)
2. Point the little arrow guy to the right by using the mouse cursor and shoot for 30 seconds.
3. Simply hold down the mouse button and keep a close watch on the Frames Per Second

Observed result:
Incredibly low Frames Per Second on my computer...is yours different than mine???

Expected result:
60 Frames Per Second----

Browsers affected:
Chrome: Yes.
Firefox: Yes.
Internet Explorer: Not Confirmed

Operating system & service pack:
Windows 7 64-bit (Professional Edition)

Construct 2 version:
R-161STARTECHSTUDIOS2014-02-13 11:37:20
B
82
S
32
G
7
Posts: 281
Reputation: 10,685

Post » Thu Feb 13, 2014 3:54 am

It's not a bug, it's bad coding. Add the condition If bullet is not on screen > destroy bullet
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Thu Feb 13, 2014 4:47 am

@Burvey

Great suggestion!! And I would've done that, except for the fact that I need the bullet to continue to hit objects no matter where they are on the layout.

It's intentional, quite necessary, and it's producing very slow framerate.

Good to know it was slowing down on your machine too though, thanks for the feedback.
B
82
S
32
G
7
Posts: 281
Reputation: 10,685

Post » Thu Feb 13, 2014 5:01 am

In that case my suggestions would be to make the layout smaller or use less bullets. Less enemy objects may help as well. Also another type of trigger for your every tick events may help. Probably all things you don't want to do but it's still not a bug. :)
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Thu Feb 13, 2014 5:08 am

I'll come up with a better .Capx then, a simpler one, according to your suggestions.

B
82
S
32
G
7
Posts: 281
Reputation: 10,685

Post » Thu Feb 13, 2014 5:19 am

Another suggestion, since you want the bullets to destroy anything they hit on that large of a layout would be to check collisions only with objects that are in line of sight of the bullets. I haven't tested that though so I'm not sure if/how much it may help.

Edit: Also, did this issue only pop up after installing r161? If you run the capx in r160 it runs at 60fps or no?Burvey2014-02-13 05:42:36
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Thu Feb 13, 2014 6:01 am

One problem here is that you posted a capx from r161. So...how are we supposed to try it in another version? At least upload a caproj, so it can be modded to boot in an older version.

Edit: or, better yet, an identical capx from an earlier version.TiAm2014-02-13 06:02:52
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Thu Feb 13, 2014 6:25 am

I have:
1 - Considerably Reduced the Layout Size by 33%. --   
2 - Greatly reduced the number of Objects Present.---
3 - Removed ALL 'Every Tick' events; (had to leave update angle & fps).
- I'd rather not change the firing rate because that is what makes it feel fun, it feels like a Machine Gun and that is what keeps that visceral awesome feeling alive...More Machine Gun, less like a pea-shooter.... :).-


Here is the simplified .capx...Thanks for your help and feedback...


https://drive.google.com/file/d/0B_4xfuagH96rOGZ5M19nTVJNUUU/edit?usp=sharing

(This clearly shows an issue here.)



STARTECHSTUDIOS2014-02-13 07:39:24
B
82
S
32
G
7
Posts: 281
Reputation: 10,685

Post » Thu Feb 13, 2014 1:21 pm

Closing because the problem is you collision test with objects on parallaxed layers. To find out more why this is a bad idea read this blog post: https://www.scirra.com/blog/ashley/6/collision-cell-optimisation-in-r155. In short, this disables the collision cells optimisation, *and* adds extra overhead on each collision check, since it must convert between layer positions taking in to account the parallax before it can even do the fast bounding box check.

Almost all the CPU is being spent in the last event checking for a collision with 'Enemy2'. There are 70 of these objects on a parallaxed layer. Change the layer parallax to 100,100 and it barely goes above 1% CPU.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 10 guests