Monday, May 29, 2017

Evenly-spaced points on a parabola... is impossible?

Suppose you wanted to, for example, calculate evenly-spaced points on a circle. This is a rather simple problem. For instance, just calculate something x=radius*cos(n), y=radius*sin(n), for evenly-spaced values of n (ie. repeatedly incrementing n by a given value). This directly gives evenly-spaced points on a circle of the given radius.

Now a question that seems to be at least as easy, if not even easier: How to calculate evenly-spaced points on an x2 parabola?

The parabola is one of the simplest possible curves. It doesn't get much simpler than that (other than a straight line). Surely there must exist a very simple way of calculating evenly-spaced points on it?

Maybe there's a simple function that you could use like x=f(n), and thus y=x2, that gives evenly spaced points on the parabola (for evenly spaced values of n)? Or alternatively some function such that y=f(n), x=sqrt(y)? Surely that f() function is something quite simple, maybe some inverse function, or anti-derivative of the parabola?

Quite unexpectedly, there is no such function, at least not in closed form.

It is possible to calculate the arc length of a parabola between some given values of x, using a closed-form function, but this the inverse of what we are looking for. We are not looking for the length of the curve between two values of x; rather, we are looking for how much x should change in order to get a given arc length.

As surprising as it might sound, this is just not possible, using any of the usual mathematical functions in closed-form expressions (which is how we would be able to calculate it using regular mathematical functions and operators, without having to resort to loops and approximations).

If you wanted to calculate evenly-spaced points on a parabola programmatically, the only reasonable approach would be to make an iterative search for a change in x that approaches the desired arc length (the desired accuracy dictating how many iterations you need to perform). There is no formula for getting it directly, like there was eg. with a circle.

This is quite surprising, given how seemingly simple the x2 parabola is.

Thursday, May 11, 2017

Nacon Revolution Pro controller review

The Nacon Revolution Pro (NRP) is a controller for the PlayStation 4 (officially licensed by Sony, although not designed nor manufactured by them), as an alternative to the standard DualShock 4 (DS4) controller.

Key differences


The most striking difference with the DS4 (and the major reason why I purchased the controller) is the Xbox style layout of the left thumbstick and the d-pad. Many gamers find the Xbox style layout more comfortable, and this is the answer by Nacon.

Other fundamental differences include:
  • The NRP is exclusively wired, and can't be used in wireless mode. This might be a hindrance to some users, depending on their setup. However, this might reduce input lag (although I have not tested this).
  • There is no lightbar at the front of the controller. Instead, this function has been moved to a small light bar at the bottom (near the audio jack). This means that the controller can't be used with the PlayStation Camera (and thus for PSVR games that track the controller with the camera.) The brightness of this small lightbar cannot be controlled.
  • There is no speaker at all (although this is hardly a problem, as this feature is very rarely used by games for anything). There is, however, an audio plug, just like in the DS4.
  • The d-pad is more circular in shape, rather than consisting of separate buttons like on the DS4. This makes it easier to press diagonals.
  • There are four additional buttons, and two switches, on the backside of the controller, usable with your middle fingers. These additional buttons can be programmed with a separate Windows program. (The switches are used to switch between five different programs.)
  • The NRP has adustable weights in its grips.
Other more minor differences include:
  • There is no extension port at the bottom of the controller (which, as far as I know, is unnecessary with the NRP because on the DS4 this port is used exclusively to charge the controller with a charging dock. I'm not aware of any other peripheral in existence that would use this port.)
  • The action buttons are slightly larger, and closer together (as seen in the image.)
  • The analog sticks have different shapes. The left one is concave and the right one convex. They also have a slightly larger range of tilting than on the DS4.
  • The right thumbstick has a circular led light around it. This is currently used to indicate whether the controller is on standard mode or user mode, ie. using one of the four programmable user settings. There are four small leds under the Share and Options buttons indicating which one of the four is in use.
  • The shoulder buttons and triggers are shaped and angled differently from the DS4. More details on this in the next section.

Usability


The most obvious usability difference is, of course, caused by the Xbox style layout. If you are a long-time Xbox controller user, you'll find this layout much more comfortable than the DualShock style layout. If you have never used an Xbox style controller, and instead have always used a DualShock one, you might find it difficult to adjust at first. However, many people find the Xbox layout more comfortable overall, as it allows for a more natural position for the thumbs.

The other major difference in terms of usability are the triggers (and to some extent the shoulder buttons). If you are a long-time user of the standard DualShock controller, you will probably find the NRP triggers to be awkard to use at first (I did.)

On the DS4, the triggers are pressed in a perfectly right angle, like this:


However, on the NRP the triggers are at a significant angle (about 30 degrees to the side, compared to the DS4 triggers):


This feels quite awkward at first, if you are used to the DS4. The triggers also have an odd concave shape, as seen in the photo, rather than a round shape like the DS4. The inner edge of the trigger can feel uncomfortable and awkward at first.

In fact, at first I felt like this is a really odd and bad design, as it felt really uncomfortable and difficult to use.

However, one quickly gets used to the new angle and shape, and in fact it gets quite comfortable in no time. It actually starts feeling even better than the DS4 triggers.

The backside of the controller also has extra buttons that can be programmed with macros.


There are, in fact, four buttons (labeled M1, M2, M3 and M4), and two switches (or, rather, a switch and a button that acts like a switch). It may not be immediately obvious where the four buttons are, as only two buttons seem to be visible, but they work like "seesaw" buttons, with one end triggering one button press and the other the other button press. These are all usable with your middle fingers.

I find the outer halves of these buttons (labeled M3 and M4) to be much easier to press than the inner halves (M1 and M2). The latter feel more awkard to press (but, once again, one gets used to them with practice).

Overall, I really like the feel of this controller, and am quite happy to use it instead of the standard DS4.

Weights


One special feature of the controller (typical of such "pro" controllers) is that you can adjust its weight by adding weights that go inside the grips.

The pack comes with two sets of 10g, 14g and 17g weights. Up to two of them can be put inside each grip.

At first I thought that I would like the controller to be as heavy as possible, for firmness and stability, and put 14+17 grams in each grip. At first it doesn't seem to make any difference, as the controller feels just the same. However, after playing for a while you really start to notice, and it makes quite a difference. In fact, it actually felt a bit too heavy. In the end, I ended up putting just a 14g weight in each grip.

The software


Unfortunately the software, at least as of writing this review, leaves much to be desired.

For starters, it's Windows-only (and the controller can be programmed only with it). Even though the controller is officially licensed by Sony, no software is provided on the PS4 to program the controller (at least as of writing this review).

As for the program itself, at first it might look fancy (as seen on the right), but when trying to use it, it turns out to be limited, unintuitive, and with usability problems. Rather than use any standard Windows controls, it opts to use its own custom controls (as a rather telling example, there isn't even a standard X button on the upper right corner of the window to close it), and it's often very unintuitive to use. For example clicking on the "controller profiles" button on the left pops up a list of profiles... but nothing can be done there. Clicking on the profiles doesn't seem to do anything, and there doesn't seem to be any way to choose profiles in order to edit them. To this day I have not figured out how to even see the settings for the four built-in profiles in the program, much less edit them. One wouldn't think this ought to be that difficult.

There also seems to be a severe lack of options and functionality to program the controller. One can't help but to draw comparisons to the controller configurator in Steam (which, incidentally, has started supporting DualShock4 controllers). The latter is stock-full of settings and functionalities that can be fine-tuned, and rather easily and intuitively so. It offers things like gyro aiming, mode switching bound to any button (eg. turning gyro aiming on only when the left trigger is pressed, for instance), different kinds of thumbstick emulation modes, and so on.

The NRP configuration software, however, doesn't seem to offer much. The response curves of the thumbsticks can be configured (in a rather crude way at that, with only three values), and simple timed button press macros can be assigned to the M1 etc. buttons. Button mappings can be interchanged (although one has to wonder why one would even want to do that, but at least the option is there.) And that's about it.

So far the configuration software has been quite a disappointment. On the other hand, it's not the main reason why I purchased the controller, so it really isn't that big of a deal.

That being said, the very ability of remapping buttons, fine-tuning the response curves of the thumbsticks, and being able to configure keypress macros into the buttons is a quite welcome enhancement.

One of the simplest examples where this is handy is to configure the back buttons to act as clicking the thumbsticks. Some games use clicking the thumbsticks for some functionality, such as sprinting, and it can be awkward to do while trying to move the stick at the same time. However, when a button on the back of the controller has been configured as a thumbstick click, it becomes much easier and handier.

Also, a non-linear response curve for the thumbsticks can make certain games (especially first- and third-person shooters that require precise aiming) much easier.

Summary


Overall my impression of the controller is positive, with the negatives being mostly minor.

Pros:
  • Xbox style layout (although, of course, this is a matter of personal preference).
  • Configurable buttons and thumbstick response curves.
  • Additional configurable buttons on the back of the controller.
  • Five control layouts, four of them configurable, that can be stored in the controller and selected with a switch and a button.
  • Sturdy design, adjustable weights.
Cons:
  • Wired (which may or may not be a problem depending on your setup).
  • Can only be configured using a Windows PC (at least as of writing this review).
  • The configuration software and its features are quite simplistic (especially compared to the equivalent feature of Steam.) Can also be quite unintuitive to use.
  • Cannot be used with the PlayStation camera (eg. for use with the PS VR.)
  • Lacks a speaker (but does have an audio jack.)
  • Twice as expensive as the standard DualShock 4.

Update


After having actively used the controller as my main PS4 controller for almost two years, I have a small update to the usability review.

I mentioned how the triggers and shoulder buttons are at a 30-degree angle, compared to the standard DualShock 4 controller. With the triggers this isn't a problem. One gets quickly accustomed to them, and they are easy and comfortable to use.

However, the same cannot be said for the shoulder buttons. Even after almost two years of active use, the shoulder buttons are still uncomfortable and awkward to use. They are angled in such a way that there is no easy way to press them properly. Simply lifting your finger from the trigger button to the shoulder button will make you try to press the inner edge of the button, which is difficult. Likewise trying to press the shoulder button with the side of your index finger (like the Xbox One controller shoulder buttons have been designed to be used) only hits the outer edge of the button, being likewise difficult. The only way to press the button easily is to do it with the tip of your index finger, which due to the angle of the button means that you have to curl said finger. This extra requirement makes it more difficult and uncomfortable.

In summary, while everything else in the controller is designed well, the shoulder buttons are quite bad, and are a definite negative.