playMaker

Author Topic: 100 Orcs WIP  (Read 37823 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: 100 Orcs WIP
« Reply #60 on: July 29, 2014, 09:12:09 PM »
I'm guessing you're on Unity free? Have you used your 30 Trial of Unity Pro so you can access the profiler?

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: 100 Orcs WIP
« Reply #61 on: July 29, 2014, 09:37:29 PM »
I am using Unity Free. And I have thought about that. But I am hesitant because I can't seem to reproduce the problem on my end. Not in the editor nor my two computers. I fear that even if I had the profiler I wouldn't be able to tell a difference but perhaps I am ignorant to what the profiler does. I will need to reseach a bit.

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: 100 Orcs WIP
« Reply #62 on: July 30, 2014, 12:04:41 AM »
Here's a screenshot of someone else using the profiler:
http://s8.postimg.org/9sd0xn5sl/test.jpg

Basically, you'd play your game in the Editor, making sure you triggered as much as possible, then pause the game and check out what's listed as the most expensive. You can then drill down to see if anything is consuming a little too much.

I'm still a Unity noob, but it allowed me to track down some framerate issues caused by the collision and triggers I was using, and also some superflous drawcalls with the GUI.

Maybe someone with more experience can comment on whether this would help you even though performance isn't a problem on your machines.

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: 100 Orcs WIP
« Reply #63 on: July 30, 2014, 01:45:25 PM »
I put up another build late last night. Some people have said the issue has been resolved for them. Any change on your end Jess?

http://bit.ly/100orcs

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: 100 Orcs WIP
« Reply #64 on: July 30, 2014, 07:04:43 PM »
Nope, unfortunately it's still the same. Sorry :/

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: 100 Orcs WIP
« Reply #65 on: July 31, 2014, 09:29:10 AM »
How disappointing. I keep thinking I'm so close! I'm wondering now if it has to do with the number of sprites being rendered on the screen. I may have to go back to a sprite sheet kind of animation system.

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: 100 Orcs WIP
« Reply #66 on: July 31, 2014, 10:40:49 AM »
I went ahead and did the profiler. Any ideas what this means? I'm a bit lost with what to do with this data.


jess84

  • Hero Member
  • *****
  • Posts: 515
Re: 100 Orcs WIP
« Reply #67 on: July 31, 2014, 11:24:05 AM »
I'm no expert, but it looks like the OnTriggerStay stuff is causing some of the problem.

I stopped using it on my project - replacing them with OnTriggerEnter/Exit and bools to check for current status, and that made a more than 4x difference to my frame rate.

You might want to ask someone more knowledgeable about the other expensive calls.

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: 100 Orcs WIP
« Reply #68 on: July 31, 2014, 12:04:20 PM »
Defiantly reduced the numbers by doing so!



Try the webplay now and let me know if you see improvement!

http://bit.ly/100orcs

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: 100 Orcs WIP
« Reply #69 on: July 31, 2014, 12:31:25 PM »
Yep, that seems to have fixed it! It was always hovering around the 55fps for me, even with all the orcs surrounding me.

The only time it went lower, was 45fps when I had all of the orcs around me, and I killed about 10 in one go. (I guess all of those animations simultaneously), but it recovered after less than a second back to 60fps.

So, I'm guessing it was the OnTriggerStay? I honestly don't see the point of that action - it's so bloody expensive, that it's unusable for any type of gameplay!!

Btw, there's a weird jittering of the player character sometimes, when walking. That's new, but I guess minor and easy to fix.

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: 100 Orcs WIP
« Reply #70 on: July 31, 2014, 12:40:23 PM »
Yay! That's wonderful news!

Last test until I call this bug gone for good! This is over kill but I've updated the allowed spawn count of orcs to 60 so if you have the chance to play it again, let it sit for awhile until there are a lot of orcs on screen and let me know what you get!

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: 100 Orcs WIP
« Reply #71 on: July 31, 2014, 12:46:03 PM »
That's fine. All 60 orcs surrounding me, never below 51fps, but averaging 55fps.

It's annoying that you spent so much time playing around with things before then trying the profiler, right? :)   I wish I'd used it earlier. I managed to not only fix the major frame rate problem, but also other inefficient things whilst I was at it!

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: 100 Orcs WIP
« Reply #72 on: July 31, 2014, 12:47:06 PM »
Truth be told. I was just ignorant of what it does. But I am grateful for your insight! Thank you so much! Now I can move on finally!

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: 100 Orcs WIP
« Reply #73 on: July 31, 2014, 12:47:20 PM »
Btw, you might want to resize the game window back to how it was... it looked much better bigger ;)

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: 100 Orcs WIP
« Reply #74 on: July 31, 2014, 12:48:27 PM »
Truth be told. I was just ignorant of what it does. But I am grateful for your insight! Thank you so much! Now I can move on finally!

Ha ha, enjoy the 30 days with it. When you get bored of doing one task, you can always dip back into it to see if there's other things that might be a bit too heavy :)