Quantcast WoWInterface - View Single Post - Nameplate FPS drop research
View Single Post
06-29-13, 03:46 AM   #6
A Pyroguard Emberseer
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,723
Thanks semlar. The difference in FPS is hilarious btw. You can even see how the fontstrings move point-by-point.

I never used an OnUpdate script that runs on every frame before though.

So semlars solution to this is:

Instead of putting all your frames on the nameplate itself we create a new frame on the Worldframe that still has a link to the corresponding Blizzard nameplate. On every frame update we hide our plate first, do our calculations and show it thereafter.

Two things in his example will lag you out by a mile.
  • Adding frames directly to the Blizzard nameplate
  • Not hiding our new nameplate frame before doing calculations

If you want the fastest nameplates on the planet you need to build them like semlar posted.
To make it clear... on the screenshot are 500 fontstrings per nameplate. Not 5. And it still runs smoothly.

This also has a major bonus. Since we are living in the environment of OnUpdate we can do all the calculations we want. (color calculation etc.)

Thanks alot semlar that was exactly what I was looking for.

Sidepoint...if some needs the current nameplate regions. Here we go:

Lua Code:
  1. --do dat
  2.     local f = NamePlate1
  3.     f.barFrame, f.nameFrame = f:GetChildren()
  4.     f.healthbar, f.castbar = f.barFrame:GetChildren()
  5.     f.threat, f.border, f.highlight, f.level, f.boss, f.raid, f.dragon = f.barFrame:GetRegions()
  6.     f.name = f.nameFrame:GetRegions()
  7.     f.healthbar.texture = f.healthbar:GetRegions()
  8.     f.castbar.texture, f.castbar.border, f.castbar.shield, f.castbar.icon, f.castbar.name, f.castbar.nameShadow = f.castbar:GetRegions()
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 06-29-13 at 04:38 AM.
  Reply With Quote