Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fps changes from 50 to 6 in unknown reason #48

Closed
zhagsenkk opened this issue Jul 29, 2015 · 40 comments
Closed

fps changes from 50 to 6 in unknown reason #48

zhagsenkk opened this issue Jul 29, 2015 · 40 comments
Labels
Milestone

Comments

@zhagsenkk
Copy link

I use the stone make a sqare to surround the enemy,and there are more than forty "enemy_kamikaze".I shoot randomly,and during a period of time,fps comes down to 7 or 6.

@erik90mx
Copy link
Collaborator

@bojidar-bg maybe is something about that every bullet has a fixed process running at the time? @zhagsenkk what are your hardware specs?

@bojidar-bg
Copy link
Contributor

@erik90mx it's the bullet lights! (Will open an issue about it in a sec :) )

@erik90mx
Copy link
Collaborator

@bojidar-bg okidoki, well I'm working with the bullet and gun xml and scripts for the casings, I make some minor changes to them, I will try to commit them today if is possible, in order to fix this after.

@bojidar-bg
Copy link
Contributor

@zhagsenkk BTW, what happens when you have like 100 spiders (kamikadze or not) on the screen at once?

@erik90mx
Copy link
Collaborator

@bojidar-bg yep good point, they have lights attached too :)

@bojidar-bg bojidar-bg added the Bug label Jul 29, 2015
@zhagsenkk
Copy link
Author

@erik90mx GT-630m/win8.1/i5-3210m

11
22
33
44

@zhagsenkk
Copy link
Author

software named "Fraps" to show fps.

@erik90mx
Copy link
Collaborator

First to all @zhagsenkk thanks for take the time to make that tests 👍 we really appreciate that, I understand better the scenario, I will try to reproduce it now.

@bojidar-bg: I'm thinking that maybe has something to do with the colliders.

@zhagsenkk
Copy link
Author

@erik90mx Best wishes to you!
:)

@bojidar-bg
Copy link
Contributor

@erik90mx I think that physics and collisions will have negligible impact on the FPS. Low FPS comes from the lights, I think. 😃
@zhagsenkk Thanks for providing those screenshots!

@bojidar-bg bojidar-bg added this to the Version Alpha milestone Jul 29, 2015
@erik90mx
Copy link
Collaborator

@zhagsenkk just a quick thing that will be helpful to make more test (show actual FPS in the console) I will try to know how to integrate the FPS number natively in the screen.

@bojidar-bg l will try to make the same tests than in the screenshots to know exactly what and why >:)

@zhagsenkk
Copy link
Author

s
Light!But the reason that fps comes down still unknown.
@erik90mx
FPS in the console { FPS: 82FPS: 82FPS: 80FPS: 80FPS: 82FPS: 82 },it's the same as the number shown in game.
tools: http://www.fraps.com/

@bojidar-bg
Copy link
Contributor

@zhagsenkk You made this screen by disabling/removing the lights from the bullet and spider scenes, right?

@bojidar-bg
Copy link
Contributor

@erik90mx It's not hard to do it, just make an FPSLabel.gd that extends Label 😄

@zhagsenkk
Copy link
Author

@bojidar-bg just set the light disabled.Nothing is removed.

@bojidar-bg
Copy link
Contributor

@zhagsenkk I was asking just to make sure no black magic is involved 😉

@erik90mx
Copy link
Collaborator

@bojidar-bg and @zhagsenkk well now FPS is in a label (for now always activated, it will be important in this debug stage): 2ec9253

@bojidar-bg
Copy link
Contributor

@zhagsenkk HoooHoohoo.... KOBUGE never dies 😈 We are just sometimes somewhat busy... somehow 😃

@erik90mx
Copy link
Collaborator

@zhagsenkk well we were in this issues: #19 and
#47
they are a little time consume, but will be needed to focus the dev :)
PD: After that FPS label, now I will try to make a workaround to get lights with performance in bullets and spiders.

@erik90mx
Copy link
Collaborator

@zhagsenkk well after a little time, I got the cage http://prntscr.com/7yf1hc , now I will try yo make some tests.

@zhagsenkk
Copy link
Author

Good jod,man.You can copy more spawners.
Sleep............22:41,guess where I am
.
.

@bojidar-bg
Copy link
Contributor

@zhagsenkk North/South America 😄

@erik90mx
Copy link
Collaborator

@zhagsenkk probably in an Asian country :)

@ObaniGemini
Copy link
Member

@zhagsenkk probably on Earth. But I can mistake :)

@erik90mx
Copy link
Collaborator

@bojidar-bg and @zhagsenkk in this commit I added a second label, this one will count every enemy that is in the scene, and submit the test map (edited the forest), right now when there are 200 kamikazes the FPS is in 5... so maybe there is other issue more than the lights.
-I try to delete the animationPlayer that scale the lights in the enemies but the problem persisted.
-I try to drop some animation frames in the spiders (and just have 3), but the same
-I delete the lights in the enemy scene, and the problem persist (I can't have more than 200, because FPS was afected)
-The last thing that I try was all the mention tests in one, but same problem.

@bojidar-bg maybe we need to refactor the enemy classes?

9b27da7

@bojidar-bg
Copy link
Contributor

@erik90mx maybe you can disable the fixed_process ?

@erik90mx
Copy link
Collaborator

@bojidar-bg where do you mean? and what will be the consecuences?

@bojidar-bg
Copy link
Contributor

@erik90mx I was thinking to remove the logic in the spider script, so we can check if it is dropping the framerate.

@zhagsenkk
Copy link
Author

Maybe there would not exist so much kamikazes when you play.You can limit the number of enemy on screen at one time.

@bojidar-bg
Copy link
Contributor

@zhagsenkk ~ Well, yeah, it is quite strange(and unfortunate) if they get to 200 enemies on-screen.

@erik90mx Quick question. does your FPS go up when you go away from the spiders? E.g. when you have 200 spiders, but they are off-screen?

@erik90mx
Copy link
Collaborator

@bojidar-bg I try that, but is the same, even when I disable the sprite (so its a process problem)

@bojidar-bg
Copy link
Contributor

@erik90mx (an image is worth a thousand words...)
screenshot.

This is with visibilityEnabler, so the spiders aren't fixed_processed while out-of-screen. Only when I go near them my FPS goes down to 5, but that's another story 😄. I'll commit it soon.

@erik90mx
Copy link
Collaborator

erik90mx commented Aug 3, 2015

@bojidar-bg this way the enemy will not move until we reach them?, do you think it will affect the gameplay some how?

I will read the commit for sure :) it is interesting the use of it.

@bojidar-bg
Copy link
Contributor

@erik90mx No, I don't think this will be a problem, because it will be unrealistic for the spider to see the player when the player can't see it (unfair advantage). Also, we thought to make spiders target only players in some distance, not all players. 😃

BTW, for the record, the commit this was added is 41e1498

@erik90mx
Copy link
Collaborator

erik90mx commented Aug 3, 2015

@bojidar-bg so it was a Godot UI option? :)

@erik90mx
Copy link
Collaborator

erik90mx commented Aug 3, 2015

@bojidar-bg I I refer to that, because just saw .xml files in that commit :) http://s23.postimg.org/ow5v6dpcr/screenshot_337.png

@bojidar-bg
Copy link
Contributor

@erik90mx No, there is just some build-in node called VisibilityEnabler2D. 😸

@erik90mx
Copy link
Collaborator

erik90mx commented Aug 3, 2015

@bojidar-bg got it, I need to test it in my computer :)

@erik90mx
Copy link
Collaborator

erik90mx commented Aug 5, 2015

@bojidar-bg well the problem is solved when the player is not seeing the enemies, do you think it will be necessary to lock the enemy quantity?

@bojidar-bg
Copy link
Contributor

@erik90mx no, now only the other issue (the one about the effects #49) is left

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants