HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Solved] GUI lag  (Read 2333 times)

LastJudge

  • General Accounts
  • *
  • Posts: 215
    • View Profile
[Solved] GUI lag
« on: Jan 05, 12, 04:23:21 AM »

I'm trying to make my own GUI. So far I have created a new window and also the ability bar. The ability bar is still the same from the clean engine with changed textures (I'm using DXT5 texture). It's working, I have no problem with clicking on abilities and using them, but the moment I move my mouse onto GUI, my framerate drops drastically (from around 160fps to 20-30fps).

Does anyone have an idea what the problem can be?
« Last Edit: Jan 05, 12, 02:43:22 PM by LastJudge »
Logged

Gothrek

  • General Accounts
  • *
  • Posts: 92
    • View Profile
Re: GUI lag
« Reply #1 on: Jan 05, 12, 05:05:23 AM »

i do the same but i dont have your problem. sorry
Logged

sdbaynham

  • General Accounts
  • *
  • Posts: 11
    • View Profile
Re: GUI lag
« Reply #2 on: Jan 05, 12, 11:27:01 AM »

I'm trying to make my own GUI. So far I have created a new window and also the ability bar. The ability bar is still the same from the clean engine with changed textures (I'm using DXT5 texture). It's working, I have no problem with clicking on abilities and using them, but the moment I move my mouse onto GUI, my framerate drops drastically (from around 160fps to 20-30fps).

Does anyone have an idea what the problem can be?

It's possible that you have a script set to run on mouse move that's more expensive than you thought?
Logged

LastJudge

  • General Accounts
  • *
  • Posts: 215
    • View Profile
Re: GUI lag
« Reply #3 on: Jan 05, 12, 12:34:51 PM »

You might have a point. I didn't change or add any scripts (at least not any scripts that have something to do with GUI). I only changed textures of the default ability bar and resized it of course to fit my textures. I'm not 100% sure of the default behavior of it but I highly doubt it caused such a fps drop. If there any way to debug stuff? I'd like to see what scripts run when I do something.
Logged

sdbaynham

  • General Accounts
  • *
  • Posts: 11
    • View Profile
Re: GUI lag
« Reply #4 on: Jan 05, 12, 01:31:34 PM »

This is definitely outside my current expertise, but try http://wiki.heroengine.com/wiki/Profiling_HSL and let me know how it goes?

EDIT:  Oh, hey, http://wiki.heroengine.com/wiki/The_Performance_Panel looks really cool.
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: GUI lag
« Reply #5 on: Jan 05, 12, 01:52:46 PM »

LastJudge:
Check your console for error messages (all client-side ones go to the console).  You said "I'm using DXT5 texture".  That might be it: I have previously gotten errors saying only DXT3 was supported for gui textures, so the slowdown might be due to message spamming.

Btw, DXT3 is only for those images used as gui textures.  Model textures should still be DXT5.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

JoshHalls

  • Founding Professional
  • *****
  • Posts: 335
    • View Profile
    • The Repopulation
Re: GUI lag
« Reply #6 on: Jan 05, 12, 01:54:34 PM »

Scott beat me to it, check your console for any errors and check if you are using DXT5 textures.  If you still don't see anything use the profile tools to check if anything funny is going on with the client side scripts when you move the mouse. 
Logged
Co-Owner/Programmer - The Repopulation

LastJudge

  • General Accounts
  • *
  • Posts: 215
    • View Profile
Re: GUI lag
« Reply #7 on: Jan 05, 12, 02:31:59 PM »

Scott, I know model textures should be either DXT1 or DXT5 ... so I thought the same would apply to GUI textures, I'm gonna try and reexport them.

I tried performance panel and it didn't really help me at all. I only have HeroScript Exec widget there and from what I can see, the graph slowed down significantly when I put my mouse or a piece of my GUI. I left it open and went AFK for some time, now I came back and I see my client crashed with a Ouf Of Memory Exception, so I probably have a crazy big memory leak somewhere (I hope that making GUI with DXT3 will solve this somehow :) ).

So I'm gonna reexport now and if it doesn't help, I'll try those profiling tools.
Logged

LastJudge

  • General Accounts
  • *
  • Posts: 215
    • View Profile
Re: GUI lag
« Reply #8 on: Jan 05, 12, 02:43:05 PM »

Reexporting it as DXT3 solved the problem.

Scott, if we ever meet, remind me to buy you a beer ;)
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: [Solved] GUI lag
« Reply #9 on: Jan 05, 12, 09:13:23 PM »

heh, indeed. Glad to help. 8)
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.