Client source upgrade - more than just a new look

PkHonor's work in progress and future updates will be posted here.
User avatar
Mike
Programmer
Posts: 6306
Joined: Sun Nov 01, 2009 8:00 pm
Location: PkHonor HQ

Client source upgrade - more than just a new look

Post by Mike » Fri Sep 09, 2016 8:54 pm

While completing the work on some of our interfaces (like the GE), I had noticed a couple of minor bugs. For one, when the GE tells you "You have bought X items for Y coins", it actually shows how much you offered for the items, not how much you actually paid (if you offer 100M for a whip but someone was already selling one for 80M, you'll spend 80M but the GE will say you spent 100M). It's purely visual and has no effect on the use of the GE, but it's still a bug.
I had to make a change in the way it's stored in our database in order to keep track of how many coins you *actually* paid for an item, so this displayed information will now be correct.

While doing so, I decided to make a couple of other changes. For example, I decided to let the GE also keep track of how many 100M tickets you have put into it.
I've allowed the GE to accept 100M, 500M and 1B tickets and any 500M and 1B tickets you spend in the GE are automatically converted to 100M tickets (conversion is free anyway). When you withdraw at least 100M in coins, it'll automatically try to take the tickets you had put into it. When a sale happens on the GE (with a value of at least 100M for the whole transaction), it'll also transfer the appropriate amount of 100M tickets if possible. This also means I have removed the code that converts 1100M coin stacks to 1B tickets, instead the GE will always give the tickets and/or coins that were put into it in the first place (but it'll only give 100M tickets, no 500M or 1B tickets).

I also managed to improve the GE search function by grouping any offers for an item with the same price together. You can still easily distinguish your own offers from those of other players.


I also needed to do a few code changes in the shops for the update, but a lot of shop-related code hadn't been updated since 2008 and it was a complete mess, so I decided to also completely rewrite that (Dylan had already started rewriting our shop code a while ago, but hadn't gotten very far yet). Players should barely see a difference in shops, but now it should be much easier for us to add new items (and there are far fewer chances of bugs now) and every item will have a fixed shop price, rather than being 115% of the high value of ::prices. Alching and selling to the junk store will still be based off the ::prices value, but we have a safeguard in place to make sure the alch/junk store value of an item is never more than 50% of the price it's being sold at in a store (but only if it's sold in a store). Shops will now also be loaded faster, meaning I've shaved off a couple fractions of a second on the server startup time.


Lastly: whenever the server starts up, it had to load every single clan chat and every single GE offer (including all old & canceled ones) from the database. I've now rewritten them, so that only all active GE offers are loaded on server start (canceled offers are only loaded on player load) and clan chats are only loaded into the server when needed. This, coupled with the change in shops, has reduced the server startup time with more than 5 seconds, so players will definitely notice the increase in update speed with future updates.

I do however need to test most of these changes yet, but it's looking good so far. The way I'm rewriting most of it actually makes it far less prone to bugs than it is now.


Up next: Clan chat interface, GWD killcount interface, PC interface, expanded friends & ignore lists and a couple of bugfixes related to chat & yell. These should mostly be copy-paste from our own code, but of course it's hard to tell how much time will be spent fixing bugs. Those are the last of our custom interfaces, then I can move on to dumping the world map for noclipping checks. Hopefully I may also be able to do a few pathfinding improvements, but as you all know, that's a really tough thing to do so again I can't make a whole lot of promises on the results.

Technically, I could release it when those three things are done (5 interfaces, chat bugfix and noclipping checks), but the client doesn't have an auto-updater yet and is missing a couple of options (10x hitpoints, new hitmarks, new/old HP bar settings). I can release it without, but I'm not entirely sure yet. I'll keep you posted.

Armyruler
Premium Donator
Posts: 12
Joined: Mon May 12, 2014 10:02 pm

Re: Client source upgrade - most than just a new world

Post by Armyruler » Fri Sep 09, 2016 9:01 pm

Awesome work Mike, Keep it up!

User avatar
Ely
Honor Player
Posts: 7403
Joined: Tue Apr 23, 2013 5:54 pm
Location: England

Re: Client source upgrade - most than just a new world

Post by Ely » Fri Sep 09, 2016 9:17 pm

Looking good, can't wait !
Image

User avatar
Cat
Wise One
Posts: 523
Joined: Fri Aug 19, 2016 9:12 pm
Location: ☾ ✧

Re: Client source upgrade - most than just a new world

Post by Cat » Fri Sep 09, 2016 9:40 pm

Looking so good. I really like the improvements to the GE, you've really put in some work Mike, thanks for this. I can't wait for the future client. Goodluck on upcoming tasks and fixes.

User avatar
Jon
Honor Player
Posts: 4705
Joined: Mon Jun 10, 2013 6:31 pm
Location: Iowa, USA
Contact:

Re: Client source upgrade - most than just a new look

Post by Jon » Fri Sep 09, 2016 10:03 pm

Awesome work Mike, can't wait to use the client!
Image

Srczm
Premium Donator
Posts: 32
Joined: Mon Sep 23, 2013 4:37 pm

Re: Client source upgrade - most than just a new look

Post by Srczm » Fri Sep 09, 2016 10:05 pm

i actually cant wait, good job sir

User avatar
Strdargoba
Premium Donator
Posts: 1183
Joined: Fri Apr 12, 2013 9:45 pm
Location: Oregon, USA

Re: Client source upgrade - most than just a new look

Post by Strdargoba » Fri Sep 09, 2016 10:17 pm

Yay! No more lost money for putting in 1b ticks in ge now! Looking good though Mike, keep it up! Can't wait for the new updated client! :P
Image
Image

User avatar
Iron midas
Premium Donator
Posts: 532
Joined: Thu May 05, 2016 7:49 pm
Location: Adelaide, Australia

Re: Client source upgrade - most than just a new look

Post by Iron midas » Fri Sep 09, 2016 10:42 pm

Very exciting :mrgreen:
Image

User avatar
Alex
Premium Donator
Posts: 2494
Joined: Sat May 11, 2013 5:23 am
Location: vault 111

Re: Client source upgrade - most than just a new look

Post by Alex » Fri Sep 09, 2016 10:56 pm

Good shit Mike. :thumbsup:
Image

User avatar
Skiller
Developer
Posts: 2029
Joined: Fri Jun 05, 2015 11:50 pm
Location: Generally ::skilling

Re: Client source upgrade - most than just a new look

Post by Skiller » Sat Sep 10, 2016 5:12 am

looks awesome mike. one quick question: you've edited the code so that clan chats are only loaded as needed, why not do the same for grand exchange offers etc.?

I personally barely use the ge. would much rather buy and sell with a live person. If we can load when needed that should cut the time even more, correct?

Just something to think about! Thanks again, so excited for this new client!
Image

Locked