Page 2 of 4
Re: Implementing: Achievements
Posted: Sun Oct 21, 2012 9:49 am
by John Adams
alfa, no translated to english complaining either
Try typing /test.
Until we figure out slowness and crashes, Achievements will not pop into the window just yet.
And Xinux, what did you change? I realize it was 7:30am, but a little more detail would be nice 
and good detective work, regardless.
Edit: I gotcha, you changed the achievement_id int32's to the PK auto-increment ID value. We'll check the code, but pretty sure our element for achievement_id matches the values below max int32 value.
Re: Implementing: Achievements
Posted: Sun Oct 21, 2012 10:00 am
by alfa
/test pop me the pet options windows :p
Re: Implementing: Achievements
Posted: Sun Oct 21, 2012 10:02 am
by John Adams
That's because it is a /test command with other things in it. All you should care about is that you saw achievements list.
Re: Implementing: Achievements
Posted: Sun Oct 21, 2012 12:14 pm
by John Adams
A little more analysis for you, Z & Jab.
I added a ton of ACHIEVEMENT__TRACE loggers to almost every function in Achievements*.cpp, and started my world. Things were going along fine, tho slower than I hoped, while I watched my system memory skyrocket (1.2GB fro EQ2World.exe (Debug|Win32)).
Here's the interesting part though. It went through 1469 of our Achievements with no problem (except slowness), and when it got to the for() of achievement # 1470, everything stopped dead. Attaching my log for analysis.
2012-10-21_eq2world_5940.zip
Note: I cannot promise this is not related to queued logging, because I have never sent so much to it before - but it seems a real coincidence that the world stops responding on 1470, doesn't it?
Edit: Well shit, there goes that theory. In Release|Win32, it blew right passed 1470 without stalling. However didn't appear to actually process anything:
...
12:21:56 T Achievements: Start Achievement packet for id: 1469
12:21:56 T Achievements: Start Requirement for: '100 Goblin Slain'
12:21:56 T Achievements: Start Achievement packet for id: 1470
12:21:56 T Achievements: Exit: 'MasterAchievementList::CreateMasterAchievementListPacket'
12:21:56 I Titles: Loading Titles...
12:21:57 D World: Loaded 471 Titles
...
Could DEBUG be halting because 1470 has no data? Grasping at straws now. Sorry.
Re: Implementing: Achievements
Posted: Sun Oct 21, 2012 12:43 pm
by John Adams
Yet more info... then I'll get back to Pets

On the advice of Xinux, I added one last Requirement, in case it was getting stuck there... but apparently it is not about the req/rew for's... the server is dying on the Safe Deletes.
World Debug|Win32 -
12:39:25 I Achievements: Loading Achievements...
12:39:25 T Achievements: Enter: 'WorldDatabase::LoadAchievements'
12:39:26 T Achievements: Enter: 'MasterAchievementList::AddAchievement'
12:39:26 T Achievements: Exit: 'MasterAchievementList::AddAchievement'
12:39:26 T Achievements: Enter: 'WorldDatabase::LoadAchievementRequirements'
12:39:26 T Achievements: Enter: 'Achievement::AddAchievementRequirement'
12:39:26 T Achievements: Exit: 'Achievement::AddAchievementRequirement'
12:39:26 T Achievements: Enter: 'WorldDatabase::LoadAchievementRequirements'
12:39:26 T Achievements: Enter: 'WorldDatabase::LoadAchievementRewards'
12:39:26 T Achievements: Exit: 'WorldDatabase::LoadAchievementRewards'
.
.
.
12:41:39 T Achievements: Start Achievement packet for id: 1470
12:41:39 T Achievements: Start Requirement for: 'One-Shot John Adams'
12:41:39 T Achievements: Serializing data...
12:41:43 T Achievements: Creating new masterPacket...
12:41:43 T Achievements: safe_delete(packet)...
12:50:20 T Achievements: safe_delete(data)...
12:50:20 T Achievements: Exit: 'MasterAchievementList::CreateMasterAchievementListPacket'
12:50:20 I Titles: Loading Titles...
So, 2:13 to process all the achievements data (still wayyyy too slow imo) and an another 8:37 to delete the packet.
I saw this same behavior in PacketParser last week while I was messing with it. Can't remember the specifics, but if I see it again I'll post something. But it was exactly here, safe_delete(something) in Parser, too.
PS: As I just tried to say in IRC, I removed every achievement except category=Exploration, and now there are no more unknowns (blank cat's) and all nodes of Exploration achievements show up perfectly.
Re: Implementing: Achievements
Posted: Sun Oct 21, 2012 3:40 pm
by John Adams
Just because nothing else made sense, I went back to PacketParser and ran raw data against a 1096 log, generating the expected 1,169 Achievements, imported them into my world, and Achievements look perfect.
achievements1096.jpg
I'll let you figure out why. I'll leave my server up for a while, if you want to come see.
The Data:
achievements1096.zip
Re: Implementing: Achievements
Posted: Sun Oct 21, 2012 3:48 pm
by Zcoretri
Well, that is what I was trying to do. I wanted to get just 1096 data into my table, but you beat me too it, because my parser was outdated

Re: Implementing: Achievements
Posted: Mon Oct 22, 2012 9:16 am
by Zcoretri
So I think we came to the conclusion last night that the client can handle only a fixed amount achievements. So i say we go with parsed 1096 data. So what is next for achievements is figuring out how to hold updates for various achievements, which I think will tie in to the player history stuff you were talking about John.
Re: Implementing: Achievements
Posted: Mon Oct 22, 2012 10:49 am
by John Adams
Okay, I will replace the data on PatchServer with the 1096 stuff above. This will require everyone to drop their Achievements-related tables to re-patch with the new ones. I won't bother making new minor versions for this since no one but us devs have this code yet.
As for Player History, I definitely want to try and put all these things together into a single system, but I dont' want to hold you up on creating player achievements. If you want to go ahead with what you had planned, go for it. We'll change it around once we spec out how history will best be tracked.
Let me see if there is already a post about this, or I can start another discussion where we can come up with ideas.
Re: Implementing: Achievements
Posted: Sat Oct 27, 2012 11:42 am
by John Adams
BTW, parsing the 1188+ logs, there are now 1,592 achievements
Do you think the client (1096) is hard-coded to only recognize a certain number of achievements, and that's why the data we send from AoD+ gets screwed up? I was hoping it would be a little more dynamic than that (size-wise)
Re: Implementing: Achievements
Posted: Sat Oct 27, 2012 9:16 pm
by Zcoretri
John Adams wrote:BTW, parsing the 1188+ logs, there are now 1,592 achievements
Do you think the client (1096) is hard-coded to only recognize a certain number of achievements, and that's why the data we send from AoD+ gets screwed up? I was hoping it would be a little more dynamic than that (size-wise)
Yeah that is the conclusion Jabantiz, Xinux and I came to...when Xinux removed about 300 records from the AoD achievements, the window populated fine.
Re: Implementing: Achievements
Posted: Wed Jan 02, 2013 7:28 pm
by Zcoretri
Lethal, can you do us a big favor and look at how the achievements was implemented and improve upon my work please
After seeing what you did with the analyzer packet loading time, I would imagine you can help the achievements list.
Right now it takes a long time when world is starting up to process the data.
Thanks a bunch in advance.
Re: Implementing: Achievements
Posted: Mon Apr 01, 2013 11:06 pm
by Jabantiz
Looked into this issue again and discovered on windows, mainly visual studio, there is special debugging code for iterators, turning this off it took 23 seconds to make the packet, when it was on it took 86 seconds. To turn off the iterator debugging you need to go to project properties->Configuration Properties->C/C++ ->Preprocessor and in Preprocessor Definitions add _ITERATOR_DEBUG_LEVEL=0
Not sure if this will be a possible solution but at least the time is down.
Re: Implementing: Achievements
Posted: Tue Apr 02, 2013 6:30 am
by John Adams
Nice, that explains why Linux load of Achievement packet was so fast, by comparison.
Keep in mind, LE reviewed the code and mentioned there were lots of opportunities to improve performance, but then he vanished without telling me what those were. If no one else gets to it, perhaps he'll fix it on his next visit.
Re: Implementing: Achievements
Posted: Thu Apr 11, 2013 5:47 pm
by John Adams
John Adams wrote:Okay, I will replace the data on PatchServer with the 1096 stuff above.
Damn, looks like I never did this. Doing it now.
Run these queries on your test world databases:
Code: Select all
DELETE FROM `table_versions` WHERE `name` LIKE 'achievements%';
then restart your world to fetch the new data.
Meanwhile, I have
updated ProjMan for the next cycle to try and finish Achievements as far as code/UI, dependent on the Player History implementation which I am about to harass Jabantiz for help with.
Please take a look at ProjMan for Achievements and help me figure out any more facets to this system that are not yet listed. I am sitting in Live now clicking away, and aside from stuff on the Journal, I don't see any UIs related to Achievements.
Has SOE done away with the Slayer Stats postings around the game? I believe they were like Leaderboard lists or something. I know that's not Achievements, but they may be tied together in some way I am not clear on.
Edit: Heh, found the old post and a pic!
view_status.jpg
This still in game? I think this was on a post in Freeport.