Implementing: Achievements

EQ2Emulator Development forum.

Moderator: Team Members

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Sun Oct 21, 2012 9:49 am

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.

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Implementing: Achievements

Post by alfa » Sun Oct 21, 2012 10:00 am

/test pop me the pet options windows :p
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Sun Oct 21, 2012 10:02 am

That's because it is a /test command with other things in it. All you should care about is that you saw achievements list.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Sun Oct 21, 2012 12:14 pm

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.
You do not have the required permissions to view the files attached to this post.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Sun Oct 21, 2012 12:43 pm

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.
You do not have the required permissions to view the files attached to this post.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Sun Oct 21, 2012 3:40 pm

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
You do not have the required permissions to view the files attached to this post.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Implementing: Achievements

Post by Zcoretri » Sun Oct 21, 2012 3:48 pm

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 :oops:

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Implementing: Achievements

Post by Zcoretri » Mon Oct 22, 2012 9:16 am

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.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Mon Oct 22, 2012 10:49 am

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.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Sat Oct 27, 2012 11:42 am

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)

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Implementing: Achievements

Post by Zcoretri » Sat Oct 27, 2012 9:16 pm

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.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Implementing: Achievements

Post by Zcoretri » Wed Jan 02, 2013 7:28 pm

Lethal, can you do us a big favor and look at how the achievements was implemented and improve upon my work please :mrgreen:
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.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Implementing: Achievements

Post by Jabantiz » Mon Apr 01, 2013 11:06 pm

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.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Tue Apr 02, 2013 6:30 am

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.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing: Achievements

Post by John Adams » Thu Apr 11, 2013 5:47 pm

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. :mrgreen:

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.
You do not have the required permissions to view the files attached to this post.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests