Saturday, December 30, 2017

Approximating a function with Taylor series vs. continued fraction

A Taylor series is a polynomial that approximates any given (differentiable) function within a certain range (which, depending on the function in question, may extend indefinitely). The more elements in the polynomial, the more accurate the approximation is. (If the Taylor series is extended to infinity, it's theoretically completely equal to the original function, within its range of validity. In other words, the Taylor series converges towards the original function (with exceptions).)

For example, the first three terms of the Taylor series for the function sin(x) around x=0 are:


In this graph the sin(x) function is drawn in orange, and the above polynomial in blue. As you can see, the polynomial matches the original function decently well for x values close to 0:


What is the point of this? Is this just math for fun and curiosity?

Polynomial approximations of more complex functions are actually very useful in many situations. When such approximations are enough for the task at hand, polynomials are often much easier to handle than the original function (eg. when using these polynomials in physics problems requiring differentiation or integration, or other such applications).

Moreover, notice that these polynomials require solely simple arithmetic operations to calculate: Addition and multiplication (integer powers can be calculated as multiplications, and the divisions are merely multiplications with a constant term). In many applications, such as in microprocessors, it's much easier to approximate things like trigonometric functions using only addition and multiplication, which are much easier to implement in hardware than actual trigonometric functions. (And even if trigonometric functions were implemented, they would probably still internally use an approximation similar to this.)

Note that with functions like sin(x) we can keep adding terms to the Taylor series in order to get better and better approximations around x=0, for an increasingly larger range. (It's thus only a question of how much accuracy is required for the application at hand, and how much time we are willing to spend adding and multiplying more and more terms.)

The Taylor series is, in fact, often used, and mentioned, as a good approximation for such functions.

However, this doesn't mean that it's the best possible approximation that can be done with arithmetic operations alone! Sometimes there are other arithmetic expressions that actually approximate the desired function much better with much less operations required.

For example, the first three terms for the Taylor series of the function tan(x) around x=0 are:


The tan(x) function can also be approximated using a continued fraction. Its first three terms are:


It looks slightly more complicated, but it still requires only simple arithmetic operations (although in this case actual division needs to be added to the set of required operations).

How do these two expressions compare in terms of accuracy? In the following graph the tan(x) function is drawn in red, the polynomial expression above is drawn in blue, and the continued fraction expression is drawn in green (click the image for a larger version):


As you can see, while the polynomial (blue line) deviates from the function quite clearly, the continued fraction (green line) is so close to it that it actually covers it entirely in this image, in the relevant range from -pi/2 to pi/2. And this using only the first three terms!

(Also, curiously, and potentially usefully, while the polynomial is valid only within the range -pi/2 to pi/2, the continued fraction continues to approximate the function outside this range. In fact, if we add more and more terms to it, it will approximate the tan(x) function at a wider and wider range.)

How well do the two methods approximate the function in terms of actual values? Here are some numbers:

x = 0.00, tan(x) = 0.000000000000, taylor = 0.000000000000, contf = 0.000000000000
x = 0.10, tan(x) = 0.100334672085, taylor = 0.100334666667, contf = 0.100334672021
x = 0.25, tan(x) = 0.255341921221, taylor = 0.255338541667, contf = 0.255341880342
x = 0.50, tan(x) = 0.546302489844, taylor = 0.545833333333, contf = 0.546296296296
x = 0.75, tan(x) = 0.931596459944, taylor = 0.922265625000, contf = 0.931451612903
x = 1.00, tan(x) = 1.557407724655, taylor = 1.466666666667, contf = 1.555555555556
x = 1.25, tan(x) = 3.009569673863, taylor = 2.307942708333, contf = 2.986111111111
x = 1.50, tan(x) = 14.101419947172, taylor = 3.637500000000, contf = 12.750000000000

As seen from these values, even with just three terms the continued fraction approximates the function much better. For example for x=0.75 the Taylor series (with three terms) is only accurate to one decimal place, while the continued fraction is accurate to three.

As mentioned earlier, to improve the accuracy of either method, we can add more terms to them. Let's try adding just one more term to both, in other words:


and


How well do they compare now?

x = 0.00, tan(x) = 0.000000000000, taylor = 0.000000000000, contf = 0.000000000000
x = 0.10, tan(x) = 0.100334672085, taylor = 0.100334672063, contf = 0.100334672085
x = 0.25, tan(x) = 0.255341921221, taylor = 0.255341835627, contf = 0.255341921180
x = 0.50, tan(x) = 0.546302489844, taylor = 0.546254960317, contf = 0.546302465023
x = 0.75, tan(x) = 0.931596459944, taylor = 0.929469517299, contf = 0.931595136956
x = 1.00, tan(x) = 1.557407724655, taylor = 1.520634920635, contf = 1.557377049180
x = 1.25, tan(x) = 3.009569673863, taylor = 2.565283396887, contf = 3.008942661757
x = 1.50, tan(x) = 14.101419947172, taylor = 4.559598214286, contf = 14.042553191489

The Taylor series does not show a lot of improvement, but the continued fraction became quite significantly better. For example at that x=0.75 we looked at before, the Taylor series is still only accurate to one decimal place, while the continued fraction is now accurate to 5 decimal places.

Even at the quite extreme value x=1.5 the continued fraction became accurate to two significant digits (while the Taylor series is still far, far off).

While the Taylor series is usually presented as the archetypal method for approximating functions, it's not always the method that does so in the most efficient way. Although, to be fair, the continued fraction method requires actual divisions (which the Taylor series does not need), which may or may not be a problem depending on the application.

Thursday, September 28, 2017

What is "game mode" in modern TVs?

When watching speedrunners playing old console games, and even newer ones, it might be a bit surprising that many of them prefer a good old-fashioned chunky CRT TV over a modern LCD/LED TV (even though many of the latter support composite input, or in the worst case scenario, there exist converters).

Many people who don't know the reason might be a bit surprised by the reason: Input lag.

CRT TVs have essentially no input lag whatsoever. This means that the console is perfectly "in sync" with the cathode ray of the TV, ie. anything that the console is outputting for the current scanline is immediately shown on screen. The longest possible lag between eg. a controller button press and its effect happening on screen is 1/60th of a second (or 1/50th in the case of PAL), because that's how long the refreshing of the screen takes. This is more than sufficient for human reflexes (eg. in speedrunning).

This implies that LCD/LED TVs have some kind of input lag. That's often the case. Depending on the particular brand and model of TV, this input lag can vary all the way from one entire frame to half a dozen frames.

Modern TVs typically perform all kinds of post-processing to the image they are receiving for display. They might perform brightness/contrast adjustments, color correction, noise reduction, and all sorts of things. They buffer the input video signal they are taking, and perform these operations on the individual buffered images before displaying them. In some cases this might take several frames. (In other words, the image you are seeing might have been sent via the HDMI or whatever cable to it several frames prior, meaning something like 3/60ths or 4/60ths of a second ago.)

When watching TV or a DVD/BluRay this doesn't make any difference. It really doesn't matter if the BluRay player sent it the picture eg. 3/60ths of a second prior. It's impossible to even notice.

However, it can become noticeable when the TV is used to play a console game (or sometimes even a PC game). The more lag there is between you pressing a controller button, and its effect happening on screen, the more noticeable it becomes. For power-players (such as speedrunners and many online gamers) this input lag may be crucial. The better your reflexes are in a given game, the more you notice the input lag, and the more it hinders your gameplay.

Computer displays, even though in the modern day they use pretty much identical technology to TVs, generally eschew any such post-processing and display images as soon as they get it (meaning that the input lag is, optimally, at most that 1/60th of a second. Or even less if the display has a higher refresh rate.)

This is where the so-called "game mode" of many modern TVs comes in. Many people don't know what it means, and might think it's just a mode that adjusts brightness, contrast, color correction and other such things for games to look better (at least in the manufacturer's opinion). However, what it usually means is that the TV forgoes most of its post-processing steps in order to display the input image as soon as possible, reducing input lag.

With some TVs this might mean that it, for example, reduces the lag from something like 4/60ths of a second to just 2/60ths. A few TVs might even reach the computer monitor speed of 1/60ths of a second.

If you play with a console using a TV, it's recommended to use the "game mode" setting of the TV, if it has one, so that games will become more "responsive", without that input lag (or, at least, with a minimized input lag).

Sunday, September 3, 2017

HDMI 2.0 switcher/splitter purchasing guide

If you own a PS4 Pro and an HDMI 2.0 capable 4k display, especially if said display has only one HDMI in port, you may soon find yourself in need of an HDMI switcher. If you are additionally using a PSVR with your PS4 Pro, you might also find yourself in need of an HDMI splitter, or switcher/splitter combo (for reasons detailed in this blog post.)

Due to the different versions that exist of the HDMI standard, this is prone to cause confusion, and for people to purchase a switcher that won't work properly with their PS4 Pro. So here is a guide that describes in detail what to look for.

Terminology and HDMI versions


An HDMI switcher is a device that has two or more HDMI inputs and one HDMI output, and is capable of redirecting one of those inputs to the output. This allows several HDMI sources (such as game consoles, a digital TV box, and a PC) to be connected to one single display.

An HDMI splitter is a device that has one HDMI input and two or more HDMI outputs. It allows for the image of a single HDMI source device to be redirected to several displays (possibly simultaneously).

Some devices are both, having multiple inputs and outputs. This is often denoted as (although the notation is not standardized) for example "3x1" for switchers (3 inputs, one output), "1x3" for splitters (one input, three outputs), and eg. "6x2" for devices supporting both (6 inputs, 2 outputs). Usually the latter allows for any two of the inputs to be redirected to the two outputs simultaneously. (Note that in some cases the "3x1" form may also be used for splitters. The notation is not always consistent.) Other devices are bi-directional, which means that they can be used as a switcher or a splitter (but not both at the same time, since they have only one port that functions as an input or an output, the others functioning as the opposite).

HDMI 1.3 and older only supports Full-HD resolutions, in other words, 1920x1080 pixels. It's completely unusable for 4k material.

HDMI 1.4 supports Full-HD video at 120 Hz, as well as 4k video (3840x2160) at 30 Hz. It has a bandwidth of 10.2 Gbps.

HDMI 2.0 supports 4k video at 60 Hz. It has a bandwidth of 18 Gbps.

Note that the PS4 Pro supports displaying 4k video at 60 Hz over an HDMI 1.4 connection, but only in YUV420 mode rather than RGB mode (if the display supports this). However, as far as I understand, this is a non-standard extension. YUV420 compromises image quality by reducing color information (in order to be able for the image to be transmitted at 10.2 Gbps.) RGB mode has no such compromise.

What to look for when purchasing an HDMI switcher/splitter


As of writing this post, switchers and splitters having full HDMI 2.0 support are still a rarity, and a user may be fooled into buying a device with no such support, only to find out that the PS4 Pro has switched to YUV420 mode or, in the worst case scenario, can't display an image at all (which is sadly common). Thus a potential buyer needs to be very careful when purchasing such a device.

Important note: Even if a switcher/splitter mentions "HDMI 2.0" support, this is not a guarantee that it will work properly with the PS4 Pro!

There are some such devices out there that mention such support, but still internally have a bandwidth of 10.2 Gbps (ie. the one from HDMI 1.4). If you try to use this kind of switcher/splitter with the PS4 Pro, you'll probably find out that the console will be limited to YUV420 mode (or, possibly, not being able to display anything at all)! I do not know how these manufacturers can make the claim of HDMI 2.0 support for these devices, but I'm assuming they support everything else in the standard except for the 18 Gbps bandwidth.

It's more important to look in the specifications of the device for a mention of support for 4k resolutions at 60 Hz. This may be expressed for example as "3840x2160@60Hz", or sometimes as "4Kx2K@60Hz".

If the specs for the device say "3820x2160@30Hz", or "4Kx2K@30Hz", or explicitly "HDMI 1.4" (often "HDMI 1.4b"), then it does not have HDMI 2.0 support. Avoid these.

Be wary of switchers/splitters that do not mention at all a refresh rate for the 4k resolution, nor a HDMI version. A mention of "4k" alone is not enough, and lacking the refresh rate is an almost sure sign that it's an HDMI 1.4 device.

Also, as mentioned, be careful with devices that do mention "HDMI 2.0" but not a refresh rate for the 4k resolution. These might or might not support the necessary bandwidth of 18 Gbps.

"How do I know if the PS4 Pro is using RGB or YUV420 mode?"

The PS4 system might not always make it completely clear which mode is being currently used, and whether 2160p RGB is supported. However, if you go to the system settings, choose "display and sound", and from there "video output settings" and "resolution", the "2160p - RGB (Unsupported)" line will be grayed out if using HDMI 1.4.


Wednesday, August 9, 2017

Foley, the invisible art

Foley is the art of creating practical sound effects for movies, TV series, and even video games. It is sometimes called "the invisible art" because when well done you don't even notice it nor pay attention to it. However, most notably, if it is not present, this absence becomes very conspicuous.

Most people actually have never even thought how exactly the myriads of small sound effects in movies are created, and aren't aware of the techniques. Most people, if asked, would probably just assume that all the sounds happening in a scene of a movie were simply captured live by the filming crew microphones as the scene was being performed. And this is part of the illusion of foley: Making it feel like it is exactly what's happening on screen. Making it not sound like it has been added in post-processing.

Of course these sounds can't be simply recorded directly from the scene being performed. Most of these sounds are too inaudible to be captured (and would get swamped by louder noises). Some sounds may be way too quiet, others way too loud. Many times the sounds in the live performance are not proper (for example because the prop materials being used aren't what they look like; for example an object that's supposed to be metallic actually isn't.) Oftentimes desired sounds simply don't happen in the live performance in the first place.

When this is pointed out, many people would then probably think that the sounds are added in post-processing using computers and vast libraries of ready-made sounds. Of course foley predates computers and all forms of electronics by quite a lot, and to this day trying to create all possible sounds happening in a movie using computers and libraries of pre-recorded sound samples is completely infeasible. There are only so many sounds that can be put into a library of sound samples, and it would be an enormous amount of work to try to mix them into a movie, making sure that they sound proper, and that there are no obvious repetitions. A movie may require literally tens of thousands of tiny sound samples, all properly timed, and all of the proper type, depending on the context.

Even after a century of film-making, foley is still the best and most practical way of creating sound effects for movies. Foley artists literally create sounds using all kinds of physical objects, in sync with each scene of a movie. (Most typically they will be watching the scene on a large screen, and creating sounds using all kinds of objects as they are watching, in sync with what's happening.)

This kind of "live" foley allows for a virtually endless amount of creativity and variation, to produce that perfect sound for a particular thing happening on screen.

The foley artist will take into account everything that's happening, no matter how small of a detail, and consider if it warrants creating a sound for it. Many of them are things that normal people wouldn't even notice or think that it should make a sound. But it's all these tiny sounds that make the movie feel so real.

To an increasing manner foley is also used in video games. When foley is missing, or done poorly, its absence makes the scene feel very awkward and unrealistic (especially in cutscenes).

The next time you are watching a movie (perhaps for a second time), try paying attention to all the sounds that can be heard even in very mundane scenes where nothing particularly special is happening.

Sunday, July 2, 2017

How old are cellphones?

Most "millenials" (ie. people born in the late 90's and later) probably have little knowledge about how old cellphone technology is (unless they are more on the "nerdy" side, or they were taught at school and they paid attention) because they have lived their entire lives with cellphones.

Even to mid-aged and older people, who lived during the proliferation of cellphones in the late 80's and early 90's, it might come a bit of a surprise how old the technology actually is. Since cellphones indeed became popular mostly in the 90's, most people have the wrong impression that that's when they were invented.

Portable phones, ie. phones that are not tied to a physical landline and instead work through radio waves, are much older, though. (And here we are talking about actual phones, rather than just radio transceivers. In other words, phones that can be used to dial a number and call any other person's phone, at least a landline one.)

The earliest commercially available portable phones were marketed in the late 1940's, mostly for use in cars. They worked like radio transceivers that would contact the phone company that offered the service, which would then redirect the call to the desired landline number as normal.

Such carphones already appeared in many TV series in the 1950's. (Today many people might see such an episode and think it's fiction, but no, it was completely based on real carphones of the day.)

Cellphones that were small enough to be carried around became available in the late 1980's and early 90's, which is when they started being more and more popular, and this is probably the reason why most people think that was when they were first developed.

Another common misconception is the exaggeration of the size of these portable cellphones. Many people think that they were brick-sized well into the 90's. While it's true that they were quite large in the late 80's and very early 90's, they quite rapidly became smaller and smaller. Note, for example, a cellphone depicted in the movie Reservoir Dogs, released in 1993.


Thursday, June 15, 2017

PSVR + 4k display problem explained

The PSVR has a (rather incomprehensible) technical drawback when it comes to the PS4 Pro and a 4k display.

The PS4 Pro has an HDMI 2.0 output connector, which allows it to use an HDMI 2.0 capable 4k display at that resolution, at 60 Hz, in RGB mode (which means essentially a completely lossless picture). Also if the 4k display supports HDR, it requires HDMI 2.0.

The PSVR, however, degrades this scenario to HDMI 1.4, because the processing unit box that sits between the console and the display has only HDMI 1.4 connectors. This means that if the PSVR processing unit is in use (which is necessary for PSVR to work), then the 4k display cannot be used in RGB mode, nor using HDR. The display will still be used on 60 Hz, but in YUV420 mode (if the display supports it), which has degraded color quality (essentially it's a lossy image, where there is less color information, causing less vibrant colors, and some color artifacts).

The following diagram illustrates the exact situation (click the image for a larger version):


The HDMI cable connections marked with blue lines indicate the setup when using the PSVR. The connection marked with the green line denotes a setup where the PS4 Pro is connected directly to the display.

These two setups are mutually exclusive, because the PS4 Pro has only one HDMI output. Both the blue and green connections cannot be made at the same time. This moreso if the display itself has only one HDMI in connector (which is quite common, even with 4k displays).

This situation is very hard to fix even with HDMI switcher boxes (especially if the display has only one HDMI connector).

For starters, most HDMI switchers are designed to have two or more input HDMI connections, and one output connection (because their idea is that you can choose to display one of multiple picture sources). This might theoretically help with half of the problem in the diagram above, on the display end (where the input signal may come from either the console or the processing unit). However, it still doesn't help with the fact that the console needs to output to either the display directly, or to the processing unit.

This would require a quite complex HDMI switcher box, which is able to take the input from the PS4 and redirect it either to the display directly, or to the processing unit, and in the latter case it also needs to get the input from the processing unit and redirect it to the display. So in essence it requires redirecting input A to output A, and at the same time redirect input B to output B. And, as an alternative, it needs to be able to redirect input A to output B (and ignore input B). I'm unsure that such HDMI switches even exist.

You could try to get away with it by having two HDMI switches, one on the PS4 side, and another on the display side. However, the one on the PS4 side would still need to be of the type that takes one input and is able to redirect it to two optional outputs. As far as I know, this is a rarer form of HDMI switching.

Secondly, the switcher(s) needs to support HDMI 2.0. The PS4 Pro is really picky about this (probably because of technical reasons rather than deliberately). If you connect an old cheap HDMI switcher between it and the 4k display, it just won't work. The display won't receive any signal. While HDMI 2.0 supporting switchers may be becoming more common, in my experience they still tend to be quite rare. Also some research reveals that people who have tried to solve this situation with switchers have found out that it, indeed, simply doesn't work. The PS4 Pro seems to be really picky about something being between it and the display (even if that something supports HDCP.)

The only practical solution is to manually switch connections every time you want to switch between PSVR games and other games. That is, in the diagram above, switch the green connection to the blue one both on the PS4 side and the display side (if your display has only one HDMI port).

A slight alleviation can be achieved by having a display with two HDMI ports, or using two displays (in which case only the connection on the PS4 side needs to be manually changed).

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.

Friday, February 10, 2017

Misconceptions about gun suppressors

There are many misconceptions spread by Hollywood movies and video games about gun suppressors. Many of these misconceptions are quite prevalent.

Firstly, the technical term is indeed "suppressor", not "silencer", although this is mostly a nitpick. There's nothing inherently wrong in using the latter term, but if you want to use the technically correct term, it's "suppressor".

This is a bit more common knowledge, but not to all: Suppressed guns do not make that "pew pew" sound that's so common in movies and many video games (a sound that would imply that the shooting of the gun makes absolutely no sound, and the sound is solely coming from the bullet traversing through air at a very high speed.)

Suppressed guns do make an explosive sound, just a greatly diminished one. Rather than sounding like a loud explosion, it sounds more like a small firecracker, or like slamming a ruler against a table. The volume of the sound is only a small fraction of the non-suppressed sound, but it's still clearly the sound of a shot. Even so, it can still be highly beneficial if the intent is to cover the sound of gunfire, as it might not sound like a typical gunshot even from the next room. And it may not be heard almost at all farther away (from a distance where a regular gunshot could be very easily heard and recognized.) If you slam a ruler onto a table, your neighbors probably won't hear it. However, you certainly can't fire a suppressed gun behind a person without him hearing it.

One much less known and understood fact is that suppressors do not slow down the bullet. This misconception is especially prevalent in many video games, where using a suppressor will make the gun cause less damage, or even reduce its firing distance.

This is not so. Suppressors do not touch the bullet (that would be quite counter-productive, and completely unnecessary.) Thus they do not slow it down in any way. In fact, the opposite is actually true. Not by a big margin, but measurably so: A suppressor may increase the exit speed of a bullet by up to about 5%. (This is because the suppressor effectively increases the barrel length, and a longer barrel, up to a certain point, increases the exiting speed of the bullet.)

Note that in some cases, in real life, a different type of ammunition is used, in conjunction with suppressors, to reduce noise even further. This ammunition has less gunpowder and thus makes less noise, but causes the bullet to be fired at a much lesser velocity (even at subsonic speed, thus avoiding the "sonic boom" that a normal bullet could make.) The misconception that it's the suppressor itself that causes the bullet to slow down might have originated from this.

On a somewhat of a side note, in real life, at many places, when police special forces storm eg. a drug lab, they will often use suppressors in their guns. Many people don't know the real reason (and have all kinds of misconceptions about) why that's so. It's not about being covert (obviously a group of special forces storming a compound is anything but covert) or anything like that. The real reason is to lessen the risk of flames from gunfire igniting flammable gas that might be present in the lab. (Suppressors are great at dampening flames from gunfire.)

Monday, January 23, 2017

Inside (spoiler-free review)

A friend of mine recommended me this game called "Inside". From the few screenshots I saw, I was a bit prejudiced against the game, due to its game genre.

Inside is one of these "2.5D" games. The kind where everything is modeled with 3D geometry, and all scenery is fully in 3D (usually going way back "into" the screen), but the movement of the playable character is strictly restricted to the 2D plane. In other words, you can only move left and right, and climb up and down. In other words, it's essentially a 2D platformer with 3D graphics.

I have absolutely nothing against 2D platformers, when they are well made. Some of my all-time favorite games are 2D platformers (such as Ori and the Blind Forest). However, I have always found these "2.5D" games on the boring side. They tend to lack that beauty and charm of well-made 2D games, but at the same time they never fully utilize the possibilities of 3D geometry, artificially restricting movement to the 2D plane.

Man, was I wrong in this case. Inside is, without any exaggeration, one of the best games I have played in my life, and I have played quite many games.

Somehow the developers succeeded in making the 2.5D mechanic work amazingly well with this game. Rather than looking artificial and restricting, it feels surprisingly natural. The controls are really fluent and comfortable, and the gameplay is very polished.

And another thing that's extremely polished is all the character animations. They look amazingly natural and believable. I do not know if they used rotoscoping to make them, or whether they were developed manually, but they look extremely fluent and natural, but without that "uncanny valley" effect that rotoscoping often has (especially when it was used decades ago). It's hard to describe; you really have to play the game to see it. If you go against a wall or glass window, the playable character will lean against it; if you are running away from a chasing enemy, he will look behind him while running; if some enemy sees him, the enemy will run to and restrain him, in a very realistic animation... Verbal descriptions can't make it justice; you have to experience it yourself to appreciate it.

But what really makes this one of my all-time favorite games is the ambience. The graphics use this strange mix of somewhat simplistic design with almost cell-shaded quality to it, with some almost photorealistic graphics (such as photorealistic water, fire and atmospheric effects). This might sound like they would clash with each other, but surprisingly they don't; they work surprisingly well. They create this almost surreal semi-noir style, which is just marvelous.

Of course graphics alone don't make a game, but what they do with them, ie. what the graphics convey. And it's just marvelous. This is one of those of those games that you have to experience yourself. It's more about the experience than the story.

I couldn't recommend this game higher. It's well, well worth its current price (ie. 20€ on Steam and PSN.) I have paid significantly more for much, much crappier games.

Monday, January 9, 2017

Invisible Inc, a surprisingly addictive game

Invisible Inc. was one of the complimentary games for PlayStation+ subscribers in the PlayStation store in December of 2016. Like so many other games given there, I get them into my game library, and then from time to time I download a bunch of them and try each one to see if there's anything good. A good portion of those games end up being on the boring side, but sometimes there are real gems among them.

Invisible Inc. is a turn-based tactical stealth game with procedurally generated levels.

Yes, that last part sounds like a real turn-off. I'm one of the biggest skeptics in terms of procedurally generated content in video games. They tend to be boring, and usually suffer from a lack of design, a lack of a core idea behind the level design. When people design game levels manually, they tend to have some higher-level ideas about what the level should be like; there might be some kind of theme, there might be some story, there may be some fitting puzzles. Especially things like buildings tend to look like designed by humans, and be functional. Or at the very least show some level of intent and purpose. If there are puzzles of some kind within the levels, they show clear signs that they have been thought out by somebody.

Procedurally generated content, however, tends to be too random and pointless, without the creativity and ideas that a human designer has.

Thus I was quite skeptical about and prejudiced against this game. But like all the games I get from PS+, I wanted to give it a fair try. At least 10 to 15 minutes of play. I was expecting to be just bored with it in that time, delete it, and move to the next game in the list.

However, I found myself still playing the game two hours later.

The next day I was thinking if I should continue. Maybe the beginning was ok, and somewhat addictive, but it didn't feel like it could hold that interest for much longer. I was seriously considering just deleting it. But I gave it another try. And several hours later I was still playing the game.

This game is surprisingly addictive. And the levels are really, really surprisingly good.

The procedural generation in this game is something out of this world. I have never seen anything of this level ever before. If somebody told me that the levels were fully designed by somebody, and that there was no procedural generation of any kind, I would have believed them.

In retrospect there may indeed by quite a lot of randomness in the level design. It's just that it doesn't feel random. Somehow the gameplay, the enemy behavior, the tactics you have to use in order to pass the level... they fit just perfectly in these levels. It feels exactly like the levels were designed intentionally for the kind of gameplay that this game uses.

I have no idea what kind of procedural generation this game uses, and how random the levels really are. Oftentimes it feels like there is an intentional overall design to a level, decided by a developer for that particular level. I don't know if that's indeed so, and that only the details inside the rooms, and some of the overall map layout is procedurally generated, or whether the entire level is just one big product of random chance, but oftentimes I have a hard time believing it's just the latter.

For example, in one level the mission was to find a laboratory where the agents could get a couple of augmentations for free. Said laboratory was right at the beginning of the level, right next door to the starting room. Thus I got the augmentations right away. However, the real challenge was that the exit was on the other side of the level, and there were tons of guards, drones and cameras along the way, and I had to tactically devise a way to get through all that alive.

It really felt like the level was purposefully designed like that. In other words, you get the mission target right away, and the real challenge is to get out alive. I have no idea if the level was intentionally designed like that (with just the details being randomly generated), or whether it was just by pure chance that it was like that.

Another level started with a guard facing away from your agents, apparently just using a console. And the direction he's facing is the only path to advance. While there were some covers here and there, it was impossible to avoid him seeing the agents if they just tried to walk past him. And, of course, the guard was armored so he couldn't be taken out. It was a real challenge to figure out how to proceed in the level without getting killed. Again, it really, really felt like it had been purposefully designed like that, rather than being randomly generated.

You also quickly grow emotional attachment to the two agents that you control. They can die, if shot. And they will be permanently dead if not saved. I grew so attached to them that I really didn't want them to die, and in some levels went to extreme lengths to have both reach the exit safe and sound. And when I succeeded, it felt like a real accomplishment.

Overall, the level design, as random is might be, just fits the gameplay perfectly, and doesn't feel random and pointless at all. And the game itself is enormously addictive. It might not be for everybody, but it certainly was for me.

Friday, January 6, 2017

Xbox One controller ingenious design

I recently decided to purchase an Xbox One controller to replace the old Xbox 360 controller I have been using for PC gaming for years. (I have an Xbox 360, which I haven't used for a couple of years. I don't have an Xbox One, but I like using the Xbox controller for most PC games.)

I have been using both an Xbox 360 and a PS4 controller for quite many years. The Xbox One controller immediately felt like a really well-designed and sturdy product, especially compared to the Xbox 360 one. The analog sticks felt less stiff and easier to use, as well as the triggers. The d-pad is a lot "clickier", making a quite clear click when any direction is pressed.

There was one thing, however, that at first felt like a massive disappointment and a huge design blunder: The massive shoulder buttons. This image compares the size of the shoulder button compared to the other two controllers (click on any image for a slightly larger version):


Of course size is not the problem, but the way they are positioned and how they work. Comparing the Xbox One and the PS4 controllers in profile shows how much higher the shoulder buttons are in the former:


In the image, the baseline (where the bottom part of the controller, where you hold it with your middle and rest of your fingers) as well as the shoulder button lower and upper edges have been marked. As you can see, in the Xbox One controller they are enormously higher.

This makes the shoulder buttons quite awkward to use, if you try to use them like with the other controllers. Not only that, but there's another problem: If you try to press them with the tip of your finger, as demonstrated in the picture below, they don't actually work! That part does not trigger the button (or, more precisely, it triggers it very poorly).


At first this felt like a huge disappointment. The entire rest of the controller felt really, really well designed, high quality, sturdy and easy to use. The shoulder buttons, however, were positioned very awkwardly, and were hard to press.

However, after a while of using the controller, I realized the actual idea behind the design. And it's quite ingenious!

You are actually not supposed to use the trigger button like above. Instead, you are supposed to press it with the part of your finger around the second knuckle, like this:


Why is this an ingenious design? Because it actually allows you to, if needed, press the shoulder button and the trigger at the same time! And you have full control of how much you squeeze the trigger.


If you compare this to how you press the shoulder button in the PS4 controller, you'll see that there it's just not possible to press both with the same finger:


Of course it's perfectly possible to use your middle finger to press the trigger while you use your index finger to press the shoulder button, and this can be a completely viable and comfortable way of playing. However, if you are using both fingers like this, then you'll be holding the controller itself only with your ring and pinky fingers, which is slightly less firm. Not that it can be a huge problem, but it can be less comfortable.