v0.8.9 (Bugfixes + translations) released to Google Play!

Useful links
Source code of the game - Contribution guide - ATCS Editor - Translate the game on Weblate - Example walkthrough - Andor's Trail Directory - Join the Discord
Get the game (v0.8.9) from Google, F-Droid, our server, or itch.io

Bulk buy/sell/drop interface collaboration

Discussions of the development process of the game.
Post Reply
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Bulk buy/sell/drop interface collaboration

Post by Samuel »

I will look into this tonight and give some feedback.
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
ejwessel
Posts: 45
Joined: Tue May 31, 2011 6:23 am

Re: Bulk buy/sell/drop interface collaboration

Post by ejwessel »

I was thinking about the class and saw that for each of the different types of dialogs drop/sell/buy we would have different constructors for each since they differ slightly by what I assume the value they need. Here's what I mean

DropConstructor(context, item, amount)
-drop doesn't need the cost of the item nor the money the player has as its only concerned with removal of the item

SellConstructor(context, item, amount, cost)
-sell needs the cost of the item so understand how much money is going to be returned to the player

BuyConstructor(context, item, cost, money)
-buy needs the cost as well as the players money to calculate how much one can buy with the current stash of cash

I'm not sure how items are created as I havent looked. If the item is in an object then we wouldn't have to pass the item name and its cost we'd just pass the object of course.

I began to do this but stopped because the code started to be come messy as some of the buttons and their functionality started to diverge. I believe there is a more elegant solution. I wanted to wait for you samuel and see what you thought as well as not confuse anybody with another zip upload
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Bulk buy/sell/drop interface collaboration

Post by Samuel »

ejwessel wrote:I was thinking about the class and saw that for each of the different types of dialogs drop/sell/buy we would have different constructors for each since they differ slightly by what I assume the value they need. Here's what I mean

DropConstructor(context, name, item, amount)
-drop doesn't need the cost of the item nor the money the player has as its only concerned with removal of the item

SellConstructor(context, name, item, amount, cost)
-sell needs the cost of the item so understand how much money is going to be returned to the player

BuyConstructor(context, name, item, amount, cost, money)
-buy needs the cost as well as the players money to calculate how much one can buy with the current stash of cash

I began to do this but stopped because the code started to be come messy as some of the buttons and their functionality started to diverge. I believe there is a more elegant solution. I wanted to wait for you samuel and see what you thought as well as not confuse anybody with another zip upload
Sorry, I could not spend much time about it. See the project itself for changes. I wish I could have done more.
There should be an instant check if the number is valid.
You do not have the required permissions to view the files attached to this post.
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
ejwessel
Posts: 45
Joined: Tue May 31, 2011 6:23 am

Re: Bulk buy/sell/drop interface collaboration

Post by ejwessel »

Thanks I'll check it out and try and get back to you wednesday
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Bulk buy/sell/drop interface collaboration

Post by Samuel »

I did cleanup a little bit.

Everyone interested can install the apk. Feedback is welcome.
You do not have the required permissions to view the files attached to this post.
Last edited by Samuel on Tue Jul 12, 2011 7:20 pm, edited 1 time in total.
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
kabbie1882
Posts: 170
Joined: Thu Mar 24, 2011 5:38 am

Re: Bulk buy/sell/drop interface collaboration

Post by kabbie1882 »

Is this the full Andor's Trail with your additions or just the additions ????
Ha Ha, Made you look.
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Bulk buy/sell/drop interface collaboration

Post by Samuel »

kabbie1882 wrote:Is this the full Andor's Trail with your additions or just the additions ????
Just the new sell dialog so far.
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
ejwessel
Posts: 45
Joined: Tue May 31, 2011 6:23 am

Re: Bulk buy/sell/drop interface collaboration

Post by ejwessel »

Samuel,

I like what you did, really clean. I mean really clean... lol
Knowing that the seekBar had a .setMax() could would have been nice to know >_< - I should have read the API a bit better. *FacePalm*

Anyways I was thinking to move the region that tells for how much gold is being returned or given below the whole line its currently on.
I also was curious if we should keep one constructor or move to 3 constructors that set up the different purposes. Passing information such as the money and price would be useless when dropping and knowing how much of an item we currently have would be useless if we were buying. I cant decide if it would be a better idea or not; let me know what you think.
ejwessel
Posts: 45
Joined: Tue May 31, 2011 6:23 am

Re: Bulk buy/sell/drop interface collaboration

Post by ejwessel »

ejwessel wrote:Samuel,

I like what you did, really clean. I mean really clean... lol
Knowing that the seekBar had a .setMax() could would have been nice to know >_< - I should have read the API a bit better. *FacePalm*

Anyways I was thinking to move the region that tells for how much gold is being returned or given below the whole line its currently on.
I also was curious if we should keep one constructor or move to 3 constructors that set up the different purposes. Passing information such as the money and price would be useless when dropping and knowing how much of an item we currently have would be useless if we were buying. I cant decide if it would be a better idea or not; let me know what you think.
Never mind forget that idea. The way its set up now is good.

I went in and modified the gui a little bit so there would be room to display a larger amount of gold.
I also set it up so that if the user enters nothing in the text box that it would reset it to 1
I cleaned up the code into defined blocks with comments
I also removed some unnecessary code on my part
You do not have the required permissions to view the files attached to this post.
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Bulk buy/sell/drop interface collaboration

Post by Samuel »

Mh we worked on it at the same time. :? I merged the two versions.

I added touch and hold functionality to the buttons and implemented an instant check of the Textbox values.
I also cleaned up pretty much everything [again]. ;)

Ejwessel, could you please optimize the touch and hold constants?

We need to put a try and catch around: ("" , "12318723612783887678" and everything we do not expect)

Code: Select all

Integer.parseInt(amountTaken.getText().toString());
I removed your new checkBounds function and undid some changes in updateControls. (I think they are not necessary as the slider will not get updated when the values match.)
Some of my new changes made your way difficult. Feel free to change it back somehow.
I also set it up so that if the user enters nothing in the text box that it would reset it to 1
With my new instantly-check-the-value-code, this is not anymore done each time.
One could delete the numbers and it would instantly default to "1". So one could never enter a "2".

I would ask everyone for feedback, as it looks really nice now. (and works this way :D )
See the files attached.
You do not have the required permissions to view the files attached to this post.
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
Post Reply