Bulk buy/sell/drop interface collaboration

Discussions of the development process of the game.
Post Reply
ejwessel
Posts: 45
Joined: Tue May 31, 2011 6:23 am

Re: Bulk buy/sell/drop interface collaboration

Post by ejwessel »

qasur wrote:Can it be setup so items you only have one of in inventory/store don't invoke the slider?
Let me see if I understand your question correctly. I think when you're saying slider you mean just the slider you dont mean the full dialog do you?

If you're talking about just the dialog then,
I currently made it so that when used, any amount of items will invoke the dialog.

As for the slider I may not use it as there seem to be problems correlating the amount to the slider bar; the bar is out out of 100 ticks and seems to not correspond the amount correctly.

Let me know if I misunderstood or didn't answer your question. =)
qasur
Posts: 103
Joined: Sun Jul 03, 2011 4:54 am

Re: Bulk buy/sell/drop interface collaboration

Post by qasur »

Yeah, I mean the dialogue that invokes the slider. It should be made so that you don't need it if you're selling an item you only have one-of in your inventory.
taws34
Posts: 28
Joined: Wed May 25, 2011 10:03 pm

Re: Bulk buy/sell/drop interface collaboration

Post by taws34 »

Possibly add something similar to Elder Scrolls Oblivion..

when at a merchant, mass selling does not show up until you have 3 or more of the item to sell.

The slider then sets the points from 1 to the # of items to sell. Each stop in the slider is a whole integer.
Kim
Posts: 69
Joined: Wed Feb 02, 2011 10:36 pm

Re: Bulk buy/sell/drop interface collaboration

Post by Kim »

If done correctly, then even one-of items may be "overkill" but having a consistent buy/sell dialog is more important than discussing whether it should be used from X number of a given item.

The slider should scale with screen and work by percentages, not fixed integers. Of course 25% movement from left to right can coincide with "4 of 16", "2 of 8" or "321 of 1284". Limited screen size make it impossible to have each slider point match an item integer when you get above a certain number which of course will vary with screen size, hence the reason percentages will work.

* Moving the slider should affect the input field and update its value to correspond with an integer item amount.
* Using + and - buttons should update the input field and recalculate the sliders position and move it if needed. A nice feature to the +/- buttons will be increase the number at an increasing speed the longer held.
* Entering a value into the input field is the manual option and should recalculate the sliders position and move it if needed.

A possible preference, or static, option is to require confirmation when performing actions beyond X amount - regardless of its buy or sell.

I would like to see a total transaction gold value - maybe in the spot below "Selling: Meat" and above "-1" button.
When buying, the slider and +X button will be limited by your gold available.
LVL 58|XP 3607866|GOLD 119249|HP 159|AP 6|AC 199|AD 35-45|CC 10|CM 0|BC 100|DR 12|
HTC Wildfire - Android 2.2.1 |Rocks 3526|RoLS 0|Update 2013/10/19|
ejwessel
Posts: 45
Joined: Tue May 31, 2011 6:23 am

Re: Bulk buy/sell/drop interface collaboration

Post by ejwessel »

Kim wrote:If done correctly, then even one-of items may be "overkill" but having a consistent buy/sell dialog is more important than discussing whether it should be used from X number of a given item.

The slider should scale with screen and work by percentages, not fixed integers. Of course 25% movement from left to right can coincide with "4 of 16", "2 of 8" or "321 of 1284". Limited screen size make it impossible to have each slider point match an item integer when you get above a certain number which of course will vary with screen size, hence the reason percentages will work.

* Moving the slider should affect the input field and update its value to correspond with an integer item amount.
* Using + and - buttons should update the input field and recalculate the sliders position and move it if needed. A nice feature to the +/- buttons will be increase the number at an increasing speed the longer held.
* Entering a value into the input field is the manual option and should recalculate the sliders position and move it if needed.

A possible preference, or static, option is to require confirmation when performing actions beyond X amount - regardless of its buy or sell.

I would like to see a total transaction gold value - maybe in the spot below "Selling: Meat" and above "-1" button.
When buying, the slider and +X button will be limited by your gold available.
First off I'd like to thank you for being so descriptive =D

I really like the percentages idea, a lot
As for the 3 starred points you made, I plan to have those =)
For the confirmation when performing actions beyond X amount I wasn't sure but I'm glad somebody suggested it.
For the total transaction I wasn't sure where people would prefer it, but you're the first. Regardless I really like the idea of how much you can buy being limited to the gold available.

As a list of things I'll be working on next:
  • Slider should scale with screen and work by percentages
  • Moving the slider should affect the input field and update its value to correspond with an integer item amount
  • Using + and - buttons recalculate the sliders position and move it if needed. With +/- buttons will be increase the number at an increasing speed the longer held.
  • Entering a value into the input field is the manual option and should recalculate the sliders position and move it if needed.
  • total transaction gold value area that when buying, the slider and +X button will be limited by your gold available.
ejwessel
Posts: 45
Joined: Tue May 31, 2011 6:23 am

Re: Bulk buy/sell/drop interface collaboration

Post by ejwessel »

Still have:
  • +/- buttons will be increase the number at an increasing speed the longer held.
  • total transaction gold value area that when buying, the slider and +X button will be limited by your gold available.
to do, but otherwise

here is a demo of both different sizes of items and the slider bar acting accordingly

Let me know, in the mean time I'll be working on the above.
You do not have the required permissions to view the files attached to this post.
ejwessel
Posts: 45
Joined: Tue May 31, 2011 6:23 am

Re: Bulk buy/sell/drop interface collaboration

Post by ejwessel »

+/- buttons will be increase the number at an increasing speed the longer held.

^I'm not entirely sure how to do this. I keep thinking either onTouch() or onLongClick(), but neither work because it requires additional functionality

Also if anybody else would like to work on this with me please do =D. I keep forgetting this open source and it's no a project thats I'm just doing. If so let me know.
Kim
Posts: 69
Joined: Wed Feb 02, 2011 10:36 pm

Re: Bulk buy/sell/drop interface collaboration

Post by Kim »

onTouch() seems like the best option, but is there no onHeld(), onClick() or onButtonEvent() options ?
I dont think onLongClick() is option since it must already have a predefined length of held-time

Here is a crude example, that I think will work:

Code: Select all

if (key is pressed){
  const baseIncrease 1;
  integer increase;
  float timePress;
  increase = baseIncrease;
  timePress = now();
  while (key is pressed){
    increase = CheckIncreaseSpeed(timePress);
    input_field_value =   input_field_value + increase;
  }
}
function CheckIncreaseSpeed( float start ){
  const baseIncrease 1;
  const baseSpeed 5; // seconds
  float timeNow, timeDiff;
  timeNow = now();
  timeDiff = timeNow - start;
  return (baseIncrease + floor(timeDiff / baseSpeed) * baseIncrease);
}
LVL 58|XP 3607866|GOLD 119249|HP 159|AP 6|AC 199|AD 35-45|CC 10|CM 0|BC 100|DR 12|
HTC Wildfire - Android 2.2.1 |Rocks 3526|RoLS 0|Update 2013/10/19|
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, can you provide the current source code please?
Kim, I think a timer is better than another thread being in a while loop all the time.

IMO there should be around 500 ms delay before starting the fast count up/down (around 100 ms) operation. (i think no further acceleration is necessary)

Regarding the code here are some thoughts:
1) AFAIK you should overwrite the function "onTouchEvent(MotionEvent event)". (There is some code example in the r121 of Andors Trail)
2) You should check if "event.getAction() == MotionEvent.ACTION_DOWN" is true then start a 100ms timer.
3) Always when "event.getAction()" is one of "MotionEvent.ACTION_UP", "MotionEvent.ACTION_CANCEL" or "MotionEvent.ACTION_OUTSIDE" you should stop the timer.
4) In the timer you need to skip the first 4 calls
5) For every other call you should increase the value of slider and value field.

I don't know if this work is really needed. I think the slider will pretty much do it.
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 wrote: Ejwessel, can you provide the current source code please?
Yes, heads up though as the code will probably need some refactoring.
I'm more proficient at C++, but I think I did an alright job with this project =) Let me know though, as I would like feedback on how to improve.
Samuel wrote: I don't know if this work is really needed. I think the slider will pretty much do it.
I agree, you're right about this. This could also be something we add later if enough people desire it.
You do not have the required permissions to view the files attached to this post.
Post Reply