Thread Tools Display Modes
02-22-16, 12:08 PM   #21
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Originally Posted by Resike View Post
Oh my bad, to be honest i'm so sick right now i'm glad i can even function.
One other thing and well first off get better but make sure you don't pull a pitbull unit frame and use GROUP_ROSTER_UPDATE for things like afk timers.

If you call that event it's perfect for dynamically updating raid member group numbers when members change groups and is the most efficient call I've found. They used it in their lua text module which made calling it anywhere else or using it break timers, when leaving a raid group or converting back to party, that they made for afk, dead, etc.

Just wanted to point that out but I can't remember if you have it in raid frames or not. Having the ability to sort raids by role and having a group number next to each raid member is extremely valuable anymore.


Would also love a decent built in pattern matching or text shortening routine. So many people want to be able to have the name of a super long npc shortened in a smart way. So Gargantuan Oversized Guardian would be shortened to fit the confines of the frame without some non dynamic gsub shenanigans.

Breaking a name into a table then using some logic to trim it based on how many words in a name or the length of a frame is much better than a super long logic statement with static gsub pattern matching.


Would also love to test this out and give feedback (I can be pretty thorough) as I have a soft spot for perl like frames even if I no longer use them.
  Reply With Quote
02-23-16, 01:00 PM   #22
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by ceylina View Post
One other thing and well first off get better but make sure you don't pull a pitbull unit frame and use GROUP_ROSTER_UPDATE for things like afk timers.

If you call that event it's perfect for dynamically updating raid member group numbers when members change groups and is the most efficient call I've found. They used it in their lua text module which made calling it anywhere else or using it break timers, when leaving a raid group or converting back to party, that they made for afk, dead, etc.

Just wanted to point that out but I can't remember if you have it in raid frames or not. Having the ability to sort raids by role and having a group number next to each raid member is extremely valuable anymore.


Would also love a decent built in pattern matching or text shortening routine. So many people want to be able to have the name of a super long npc shortened in a smart way. So Gargantuan Oversized Guardian would be shortened to fit the confines of the frame without some non dynamic gsub shenanigans.

Breaking a name into a table then using some logic to trim it based on how many words in a name or the length of a frame is much better than a super long logic statement with static gsub pattern matching.


Would also love to test this out and give feedback (I can be pretty thorough) as I have a soft spot for perl like frames even if I no longer use them.
I don't use roster update for anything but to create a sub event called GROUP_TYPE_CHANGED to update the group leader. Also currently testing if the party/raid needs an update or not when the group type changes from party to partyinstance or from raid to raidinstance (Like zoning into a battleground/arena/scenario/LFGinstance).

For everything else i use attribute based changes, and only update the changed frames like this: (Could add the group number changes to this funciton and it would be still very light.)

Lua Code:
  1. frame:SetScript("OnAttributeChanged", function(self, name, value)
  2.     --print(self:GetName(), name, value)
  3.     if name == "unit" then
  4.         if value then
  5.             if self.unit ~= value or self.guid ~= UnitGUID(value) then
  6.                 --[[if self.unit ~= value then
  7.                     print("UNIT", self.unit, value)
  8.                 elseif self.guid ~= UnitGUID(value) then
  9.                     print("GUID", value, self.guid, UnitGUID(value), UnitName(value))
  10.                 end]]
  11.  
  12.                 Raid:UpdateDisplay(self)
  13.                 Raid:RegisterUnitEvents(self, value)
  14.             end
  15.         else
  16.             self.events:UnregisterAllEvents()
  17.             --print(self:GetName(), value)
  18.             self.unit = nil
  19.             self.guid = nil
  20.         end
  21.     end
  22. end)

Currently i use individual event handlers for every frame, and i update/kill the events on the fly. I found this method to be pretty solid even in very big fights. However it's eats more resources when the group changes a lot.

I havn't decided about the name shortening yet, but it's a valid issue. I guess you want something like this? Training Dummy -> T. Dummy
  Reply With Quote
02-28-16, 10:55 AM   #23
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
I came up with this Raid Manager:



Nothing fancy, can be opened to both left and right.

Last edited by Resike : 02-28-16 at 10:58 AM.
  Reply With Quote
02-28-16, 10:58 AM   #24
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Really nice
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
02-28-16, 11:04 AM   #25
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by zork View Post
Really nice
I used some of your code Zork, but not fully. I might add a "Raid Disband" and some other buttons too.

The main problem is that the panel is pretty useless if you are not the leader/assistant. Is there any way to create a state handler to only pop when you can actually do something with it?
  Reply With Quote
02-28-16, 08:11 PM   #26
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
that raid manager looks really well laid out.

As for the shortening, I don't know the demand for it really. I hate just doing a quick pattern matching because it makes training dummy to be t. dummy but also makes alliance gunship cannon to be a.g.cannon which just comes off as cheap to me. I've played around with breaking long names into tables but where do you draw the line on how to truncate? Do you start wasting resources if you have it start calculating frame width, font size, number of words, etc?

I guess its too much work for too little pay off. Just wishful thinking is all.


The elimination of using the built in raid frame addon modules I think is the key suggestion.
  Reply With Quote
02-28-16, 11:20 PM   #27
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by ceylina View Post
that raid manager looks really well laid out.

As for the shortening, I don't know the demand for it really. I hate just doing a quick pattern matching because it makes training dummy to be t. dummy but also makes alliance gunship cannon to be a.g.cannon which just comes off as cheap to me. I've played around with breaking long names into tables but where do you draw the line on how to truncate? Do you start wasting resources if you have it start calculating frame width, font size, number of words, etc?

I guess its too much work for too little pay off. Just wishful thinking is all.


The elimination of using the built in raid frame addon modules I think is the key suggestion.
I don't think you have to calculate anything. If you anchor the fontstring topleft-bottomright way, then it will get resized automatically when you resize/scale the parent frame.
Then you just have to shorten fontstrings which returns true for the IsTruncated() call. You just need to avoid endless cycles.

The biggest issue that you don't really have any options which words to shorten smartly, you put the words into a table with their number of letters, and you shorten the longest/shortest/random one. Calculating stuff like letter lengths would be a waste of resources tho, like "MMM" is much wider then "III".
  Reply With Quote
03-03-16, 01:47 PM   #28
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Originally Posted by Resike View Post
I don't think you have to calculate anything. If you anchor the fontstring topleft-bottomright way, then it will get resized automatically when you resize/scale the parent frame.
Then you just have to shorten fontstrings which returns true for the IsTruncated() call. You just need to avoid endless cycles.

The biggest issue that you don't really have any options which words to shorten smartly, you put the words into a table with their number of letters, and you shorten the longest/shortest/random one. Calculating stuff like letter lengths would be a waste of resources tho, like "MMM" is much wider then "III".
LOL yeah I sort of gave up recently (after writing this to you in the first place) after a long time screwing around because I started to notice it would take too much effort for too little reward. letter length is a slight issue if you start to try and get anal retentive about it. The only issue with forcing anchoring like you describe is if users then want to justify their text to the right. For now I just use some complex reg ex style pattern matching with gsub and it fakes what I want.
  Reply With Quote
03-08-16, 03:35 PM   #29
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Inspired by Meorawr i always wanted to create such a debugging tools to development. The challanging part was more of to create such a dinamic table what you can alter however you want, but it's starting to look pretty nice now:

http://www.youtube.com/watch?v=M44zSNs6rqk
  Reply With Quote
03-09-16, 06:09 PM   #30
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Not sure what your playerUpdateCast does. I guess it is not for the castbar right?

If it is your castbar you could check the castbar code from rCompassCastbar because I do not understand why it is called so often.

I enable OnUpdate when a cast event fires and catch the casting info on the first frame. After that it is just for value updates with an exception to cancel it if no stop event is triggered.

https://github.com/zorker/rothui/blo...stbar.lua#L270
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
03-09-16, 06:35 PM   #31
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by zork View Post
Not sure what your playerUpdateCast does. I guess it is not for the castbar right?

If it is your castbar you could check the castbar code from rCompassCastbar because I do not understand why it is called so often.

I enable OnUpdate when a cast event fires and catch the casting info on the first frame. After that it is just for value updates with an exception to cancel it if no stop event is triggered.

https://github.com/zorker/rothui/blo...stbar.lua#L270
It's for the castbar, i don't see anything weird about it.

I use the same method like you described. A 1 second cast should call it 60 times with 60 fps, and like add another 1 second (another 60 calls) for the cast success animation.
Thats like 150 calls for mounting up once (2.5 sec of animation) with 60 fps.

On another issue:
I'm still considering diching the StatusBar for the castbar and use a simple texture and update it with SetTextCoords. Because it looks much more smoother since it does not have locked value steps like the status bars.

It's only noticable with longer casts like over 10 seconds. However that would make the castbar even more expensive. Any tought on this?

You can see it on the video the upper old Z-Perl using this method, and the castbar is much more smoother.

Last edited by Resike : 03-09-16 at 06:46 PM.
  Reply With Quote
03-09-16, 07:10 PM   #32
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
About your addon, i think you should stop updating the castbar when the cast frame is not visible, else it can get called pointlessly.

I give you an example when you spam Battle Shout or any spells in between the global cooldown it triggers a lot of "UNIT_SPELLCAST_FAILED" events (even more if it's a macro with multiple spells) which runs your OnUpdate script, on every event calls at least once.

The best method is to create the onupdate script on the cast frame or the statusbar itself, then you don't even need to enable/kill the onupdate script. Since when the frame is visible it will run, when it's hidden it's killed automatically.

OnUpdate never runs on a hidden frame.
  Reply With Quote
03-10-16, 03:54 AM   #33
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Using textures instead of statusbars is sth I use myself in some cases. You need to do it if you are running animated statusbars anyway. Where you use a huge sliced texture with a ton of images that have sort of a flow animation. Needs a ton of images though for smooth progress.

Best to get sth like that is having a video of the animation and using a tool to create a gif from it or sth. else that gets you an image from each frame.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

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

Last edited by zork : 03-10-16 at 03:56 AM.
  Reply With Quote
03-10-16, 06:31 AM   #34
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Here is a better example:

https://www.youtube.com/watch?v=kIWsuMSPuCY

I'm not sure why but the texture method seems to be smoother then the statusbar one.
Or would it be just an optical illusion caused by the spark texture?
  Reply With Quote
04-16-16, 02:53 PM   #35
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Mostly i only done optimisations lately, but also added:

- Party pets
- Raid pets
- Player pet target

I currently experimenting a method instead of updating the unit target frames via OnUpdate:
Every time the unit changes target i run a scan which unit it could potentionally target: player/target/focus/party1-5/raid1-40 and, if i find a match with UnitIsUnit, then i register that unit and update the target frame based on that unit events rather then on every frame update. It seems to be working pretty good the difference is 0.25% CPU usage versus 0.01% per target frame. It's a pretty big difference in a 5 man party, where you have 5 target frames.

I also done some tweaks on the dev gui:
Instead of creating/anchoring/updating thousands of frames inside the scrollframe, i came up with a method to only draw the visible frames, and update them based on the scrollframe's offset, here the frame handles over 2200 frames and fontstrings updating in every second, and the usage is around 0.6%:

https://www.youtube.com/watch?v=NK_aenVIxAg

With this method i can also reanchor the columns in real time without any issues.

Last edited by Resike : 04-16-16 at 04:43 PM.
  Reply With Quote
04-17-16, 03:17 PM   #36
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
When i'm done with the party target module, then i'll copypaste the target/focus frame. Then the addon should be ready for beta testing. The arena and boss frames will have to wait a bit more.
  Reply With Quote
04-25-16, 09:48 AM   #37
Mythris9
A Kobold Labourer
Join Date: Sep 2012
Posts: 1
Can't wait for the Beta

Super excited for this. I've used X-Perl and now Z-Perl for a long time now so I can't wait to see this new version.
  Reply With Quote
04-27-16, 12:59 AM   #38
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I want to try it too. How doesn't want super fast unitframes.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
04-27-16, 06:07 AM   #39
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Very soon, i'll have exams in the next one and half month, but i hope for a beta release after that.
  Reply With Quote
04-30-16, 04:37 PM   #40
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Have you ever tought about that it would be nice to easily swap raid members directly from a raid frame while holding a specified modifier key?

Well here is it:
https://youtu.be/Cegn1W8SWFc

Only works out of combat, but i think it still coud be useful in some situations.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Alpha/Beta AddOns and Compilations » Z-Perl 2

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off