Page 1 of 1
Can you look at my patch?
Posted: 28 Dec 2014, 11:07
by wuz21m
Dear all,
I had this big issue with WZ2100 when rapidly clicking to get units to move (like when running from artillery

), some would register as drags few pixels across and it would deselect the units.
Some games avoid this by using right-click to move and left-click for selection (like Starcraft)
However, WZ2100 uses left-click for both selection and moves.
I wrote a patch that checks any drag events. If the Manhattan Distance of the drag is smaller than 50 pixels (it is hardcoded but worked well enough for my preliminary tests) it would not register as drag.
The patch is here:
http://developer.wz2100.net/ticket/4261
I think it would improve the experience.
And sorry for posting about this patch here. It has been 10 days and I only got a single comment. I worried that my patch is going to rust and thus I created this post. I think the issues have been ironed out and code syntax has been improved (thanks to NoQ).
Can people test this patch and give me feedback?
Thanks!
Re: Can you look at my patch?
Posted: 28 Dec 2014, 14:52
by NoQ
Forum is actually a good place for discussion, because we could use some feedback from people who actually encountered this problem.
50 pixels is actually a lot (we still insist on supporting 640x480, and it's like 10% of the screen in this case, so it should look like a valid selection). Do you really manage to accidentally drag mouse
that far instead of pressing? I'd expect 1-2 pixels at most.
It has been 10 days and I only got a single comment.
Well, many people don't have free days that often. It's actually a very short period of time.
Re: Can you look at my patch?
Posted: 28 Dec 2014, 19:16
by wuz21m
Forum is actually a good place for discussion, because we could use some feedback from people who actually encountered this problem.
I didn't want to appear self-important...
Well, many people don't have free days that often. It's actually a very short period of time.
...but it seems that I was a bit hasty
50 pixels is actually a lot (we still insist on supporting 640x480, and it's like 10% of the screen in this case, so it should look like a valid selection). Do you really manage to accidentally drag mouse that far instead of pressing? I'd expect 1-2 pixels at most.
Based on my observations, 25 pixels was the average and the worst cast was 50 pixels at 1280x720.
What we can do for small screens is to scale it. For 640x480, it will be about 33 pixels across (%7 of 480), 272 (16.5^2) square pixels at most (0.08% of 640x480). For selection, I think we must focus on area.
Of course, circular distance calculation can be implemented with a small cost (1 sqrt per render loop I believe).
For now I am gauging interest. This issue irritated me at Warzone 2100, I wanted to see if that is the case for others.
A possible alternative is supporting Starcraft style control (e.g. an extra option in the controls menu?). So if people want, they can use Click for selection and buttons and use right click for move commands.
Re: Can you look at my patch?
Posted: 28 Dec 2014, 19:32
by MaNGusT
you could just change in-game mouse options..
Re: Can you look at my patch?
Posted: 28 Dec 2014, 19:35
by wuz21m
Is there an option for using left-click for select/click and right-click for move and attack?
If there is, I'm afraid that I have missed it.
Re: Can you look at my patch?
Posted: 28 Dec 2014, 19:41
by MaNGusT
wuz21m wrote:Is there an option for using left-click for select/click and right-click for move and attack?
If there is, I'm afraid that I have missed it.
on start menu, go to options, then go to mouse options. If you play 3.1.1 release ofc.
Re: Can you look at my patch?
Posted: 28 Dec 2014, 19:49
by wuz21m
Oh, so that's what "Switch Mouse Buttons" means

Re: Can you look at my patch?
Posted: 29 Dec 2014, 17:18
by Per
wuz21m wrote:And sorry for posting about this patch here. It has been 10 days and I only got a single comment.
Well, it is holiday season, and some of us at least have been away from keyboard travelling
I'll try to have a look at it soon.
Re: Can you look at my patch?
Posted: 29 Dec 2014, 22:48
by wuz21m
MaNGusT wrote:wuz21m wrote:Is there an option for using left-click for select/click and right-click for move and attack?
If there is, I'm afraid that I have missed it.
on start menu, go to options, then go to mouse options. If you play 3.1.1 release ofc.
I tested this new mode for a number of the initial missions. But there is still one important difference compared to Starcraft.
While similar to Starcraft left-click is used for selection of units, when you use the left mouse button for selecting nothing in particular, you don't lose the previous selection. I will look at the code to see if I can propose a patch so if you select nothing, you would not lose the previous selection.
Per wrote:wuz21m wrote:And sorry for posting about this patch here. It has been 10 days and I only got a single comment.
Well, it is holiday season, and some of us at least have been away from keyboard travelling
I'll try to have a look at it soon.
Thanks a lot!