A mysterious radio transmission claims that help is inbound. Assume the role of Jacob Solomon: leader of a makeshift team trying to survive the aftermath of a devastating asteroid collision. The world you once knew is no more ? buried deep beneath the constant snowfall. Your goal: keep your companions alive until a rescue is imminent.
After a journey at sea, you are shipwrecked on a tiny island. Using your wit, ingenuity, and the advice of Carl the Crab, you must find a way to keep yourself from starving and survive.
Inspired by classic platformers and cartoons , The Adventure Pals sets you and your best friends (a giraffe and a rock) out to save the world and your dad from turning into hotdogs.
For bikers, there are two types of speed races: the Isle of Man TT and the rest. No race is more difficult. Take up the challenge of the legendary Snaefell Mountain course: all 37.73 miles faithfully reproduced with the champions and their bikes.
An independent game from Ninja Theory - makers of Heavenly Sword, Enslaved: Odyssey to the West & DmC: Devil May Cry. Hellblade: Senua's Sacrifice takes you on a journey into savage viking heartland with Senua, a Celtic warrior struggling with trauma & psychosis.
5 years since its outbreak, the Simian Flu has wiped out half of humanity. You are an ape with advanced intelligence, captured and held prisoner in a remote scientific facility. Climb, jump and shoot through the chaos of an apocalyptical world to escape with your fellow apes and return home.
Posted by: xSicKxBot - 04-09-2018, 10:29 AM - Forum: Lounge
- No Replies
Blog: Here’s an easy way to improve lerp smoothing
The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community. The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.
A Useful Snippet:
A lot of game developers will instantly recognize this line of code:
value = lerp(value, targetValue, 0.1)
It’s super useful, and can be used for all sorts of things. With a higher constant, it’s a good way to smooth out jittery input from a mouse or joystick. With a low constant, it’s a nice way to smoothly animate a progress bar or a camera following a player. It will never overshoot the target value even if it’s changing, and it changes the speed based on how far away it is so it will always quickly converge on the target. Pretty good for a one liner!
BUT!
Unfortunately it has a couple problems that are often ignored to some extent:
The first is that it’s highly dependent on frame rate. The common advice is to use a fixed time step, but that’s not great advice. If it’s for player or camera animation, you will likely end up with visible jitters. If you change your fixed time step, you need to retune.
The second is that the lerp() constant that you need to use is relatively hard to tune. It’s not uncommon to start adding some extra 0’s or 9’s to the front of the lerp() constant to get the desired smoothing amount. Assuming 60 fps, if you want to move halfway towards an object in a second you need to use a lerp() constant of 0.0115. To move halfway in a minute, you need to use 0.000193. On the other end of the spectrum if you use a lerp() constant of 0.9 you will run out of 32 floating point precision within 7 frames, and it will be exactly at the target value. That is insanely sensitive to hand tune with a UI slider, or even a hand typed value.
Fortunately, with a little math, both issues are easy to fix!
Improved Version:
The key is to replace the simple lerp() constant with an exponential function that involves time. The choice of exp2() is arbitrary. Any base will work fine, you’ll just end up with a different rate value.
value = lerp(target, value, exp2(-rate*deltaTime))
In this version, rate controls how quickly the value converges on the target. With a rate of 1.0, the value will move halfway to the target each second. If you double the rate, the value will move in twice as fast. If you halve the rate, it will move in half as fast. This is much more intuitive.
Even better, it’s frame rate independent. If you lerp() this way 60 times with a delta time of 1/60 s, it will be the same result as 30 times with 1/30 s, or once with 1 s. No fixed time step is needed, or the jittery movement it causes.
If you are worried about the performance, don’t be. Even mobile CPUs have instructions to help calculate exponents and logarithms in a few CPU cycles. In 2018, you should be much more worried about cache misses than math lib costs, but that’s a post for another day.
Conversion:
So this new version is frame rate independent, and easier to tune. How do you convert your old lerp() statements into the new ones without changing the smoothing coefficients that already work well at 60 fps? Math to the rescue again. The following formula will can convert them: (Note: Make sure to change the log base if you didn’t use exp2())
rate = -fps*log2(1 - coef)
Recalculate them and don’t look back!
Going Further:
Adjusting the numbers by hand is much easier now, but it’s still not slider friendly. Negative rates cause the math to blow up, and slowing the rate down will be very sensitive. Just add more exponents!
rate = exp2(logRate) value = lerp(target, value, exp2(-rate*deltaTime))
This will make sliders more intuitive. Moving the slider a certain amount will always change the rate by the same fraction, and you can precompute rate if you want.
Why Does It Work?
Say you are lerping by 0.9 each frame. That means you are leaving (1 - 0.9) = 0.1 = 10% of the remaining value. After 2 frames, there will be (1 - 0.9)*(1 - 0.9) = 0.01 = 1% of the remaining value. After 3, (1 - 0.9)*(1 - 0.9)*(1 - 0.9) = 0.001 = 0.1%. After n frames you’ll have (1 - 0.9)^n of the remaining value. In graph form:
So really all you are doing by repeatedly lerping is evaluating an exponential curve, and that’s why you can replace it with an actual exponential curve based on time.
As an interesting aside, since you are moving partway towards the targe value each frame, you’ll never actually arrive at the target… or will you? float can store ~7 significant digits, and double ~16. Here’s a quick snippet of Ruby code to test what happens:
value = 0.0 target = 1.0 alpha = 0.9 100.times do|i| value = (1 - alpha)*value + alpha*target puts "#{i + 1}: #{value == target}" end
It shouldn’t be too surprising that precision runs out after the 16th iteration. (1 - 0.9)^17 is quite small. 1e-18 to be exact. That is so small, that in order to store 1 - 1e-17 you would need 18 significant digits, and doubles can only store 16! More interestingly, no matter what your starting and ending values are, it will always run out of precision after 16 iterations. Most game engines use floats instead of doubles, and those can only store ~7 significant digits. So you should expect precision to run out after only the 7th iteration. What about for other constants? (Keep in mind I’m using doubles, and floats would run out in half as many iterations.) For 0.8 you run out of precision after 23 iterations, 53 for 0.5.
With constants less than 0.5 the pattern changes and something curious happens. Say you keep lerping with a constant of 0.5. Eventually, you will run out of precision and the next possible floating point number after value will be target. When you try to find the new value half way between, it will cause it to round up to target instead. If you use a constant smaller than 0.5, it will round down to value. So instead of arriving at target, it will get permanently stuck at the floating point number immediately before it. For a constant of 0.4, the value gets stuck at 70 iterations, or 332 for 0.1.
Save on Xbox One X Enhanced Games When You Purchase an Xbox One X
Games play better on Xbox One X, the world’s most powerful console, thanks to its ability to deliver superior framerates, fast loading times, and other awesome enhancements. And games that are specifically designed to take full advantage of Xbox One X carry the Xbox One X Enhanced logo.
Now, for a limited time starting on April 1, you can save up to $20 on an Xbox One X Enhanced game with the purchase of a new Xbox One X.
With the Xbox One family of devices, you can play over 1,300 games and 220 exclusives available today, including Backward Compatible titles that make Xbox One the only console to play the best games of the past, present, and future. Play with friends on Xbox Live, the fastest, most reliable gaming network. In addition, all Xbox One X and Xbox One S owners have access to exclusive services like Xbox Game Pass and Xbox Play Anywhere, and can enjoy the ultimate 4K entertainment experience with a built-in 4K UHD Blu-ray player and premium audio with Dolby Atmos support.
If you’re trying to decide which Xbox One X Enhanced game to get first, check out the complete list of Xbox One X Enhanced games (it gets updated weekly) and read our Inside Xbox One X Enhanced series here on Xbox Wire. Creators share the behind-the-scenes accounts of the work involved in enhancing these epic games for Xbox One X, how they’ve helped chart the course of the world’s most powerful console, and what that means for the future of gaming.
After some intense fighting and shmuping retro weeks, a change of pace is in order: a match-three puzzle game is on the menu for next week’s HAMSTER Neo Geo release. Developed by Face, and published in 1994, Gururin sees you trying your best to match at least three people wearing the same colour vestments with a literal ‘twist’: Instead of rotating said people, you rotate the square container in which they are being stored – which opens up rather unusual matching possibilities. We’re still unsure if the game is some sort of society critique to modern office life or just some lighthearted, often psychedelic nonsense fun.
Gururin will be released on 12th April 12th set you back the usual $7.99 / €6.99 / £6.29. It will join up with the likes of Magical Drop III and Puyo Puyo Tetris to bolster the Switch puzzle library. Will you be shuffling people around a rotating square next week? Match your comments below.
From the western title you might not be immediately aware that Tengai’s full Japanese title is Sengoku Blade: Sengoku Ace Episode II. This is, in fact, the sequel to Psikyo’s very first game, the brilliant Samurai Aces. But with only a few familiar faces returning and a complete change of shmup orientation style, did Psikyo stretched out too far from it’s winning TATE shmup formula?
Horizontal shmup change aside, you can rely on its memorable, zany roster of characters: the titular Tengai is a brutish monk who shoots beads; the young ninja warrior Sho uses throwing blades as weapons; Junis is a kunoichi who uses both kunai and shurikens in a spread pattern; Katana looks like the main protagonist from Super Nintendo’s Hagane (which just so happens to be its original Japanese name) and, of course, uses laser attacks. Finally, there’s Miko – despite her striking redesign this really is the same shrine maiden that flew a biplane in the original game. Her attacks, naturally, are based on ofuda cards. Due to ‘reasons’ she also became a poster girl not only for the series, but for Psikyo’s games in general.
Another big departure from the original is the fact no one is flying any sort of machine in this game. Instead everyone flies by themselves freely across the screen. Each character starts with just their main ranged weapon attack. Power-ups will not only increase their base firepower, but summon familiars to ride along for the journey. Tengai has a hawk; Sho has mirrors with reflections of his lover; Junis has a mongoose called Socrates; Katana summons a magical spear and Miko summons a water spirit by her side. Holding the fire trigger will charge the use of these familiars. Smart bombs are also present – they’re a rare commodity and most of them aren’t really as screen-clearing in power as previous Psikyo games.
With gameplay variety assured by that memorable roster, it’s time to take a look at the playing field. The first four levels are presented in random order (but Zerodiv was kind enough to provide costumers with a level order select by hitting ‘Y’ instead of ‘A’ on the main title screen) until you eventually hit the fifth level and must face off against every previous mid-boss on a row. If you manage to clear that nasty gauntlet, a branching path is your last choice before reaching the final boss for an epic, screen-filling glorious battle. Even here you can’t quite relax since this end showdown is a timed affair; do poorly and you will get your character’s ‘bad ending’ instead of a complete victory.
Gameplay also has a few surprises for a shmup: physical contact with enemies will not cost you a life. Instead, you get a downgrade in your firepower which can make certain sections real troublesome (such as losing your familiar just before a boss fight). So your top priority to remain alive is to make sure you dodge all the yellow/orange bullets that regularly fill the screen. It never gets to ‘bullet hell’ levels of mayhem, but they certainly show up in far more intricate patterns and speed than in previous Psikyo games. You will not find many moments of peace to appreciate the gorgeous backgrounds.
On the subject of graphics, Psikyo has really outdone itself in that department. Not only sprite art for both playable characters and enemies is spot on, the portraits for each character and mid-bosses are truly excellent. As we mentioned above, the constant barrage of enemy bullets might make you miss out on some of the most beautiful parallax scrolling backgrounds ever made for a 2D video game. Steampunk medieval Japan has rarely looked this aesthetically pleasing. And so is the game soundtrack that carries with it a distinct oriental flavour, perfectly wrapping up the whole atmosphere. Tengai was a beautiful package back in 1996 and age hasn’t robbed its beauty.
Once again, Zerodiv’s emulation wrapper goes above and beyond to ensure you can customise your experience properly. Everything from graphic filter options and screen orientation to number of lives, credits, button remapping and difficulty settings are all present and accounted for. This shows not only a proper care for the legacy of Psikyo’s catalogue, but also respect for the consumer.
Conclusion
Tengai is part of a distinguished niche shmup pantheon we like to refer to as the ‘flying-person shooter’. It sits comfortably on top of other great examples of the genre such as Forgotten Worlds, Space Harrier, Lords of Thunder, Cho Aniki and Gynoug (aka Wings of Wor). It’s not only one of the finest shmups developed by Psikyo during its active years, but an absurd luxury to have it at this very sensible price. It offers an arcade perfect, single- or two-player horizontal scrolling shmup that still manages to not only pack a punch and a challenge but make current age efforts looks dull by comparison.