Joystick/gamepad input, transparency and headlights update!


Hello fellow drivers!

Over the past week I have added a few nice features in my engine and therefore improved Shakedown. Here are the biggest updates:

Joystick/Gamepad support

This has maybe been the most requested feature, and now it's here! You can map both analogue axes and digital keys in config.

Available analogue axes are for steering, throttle and brake for now. You can set the deadzone or if they should be inverted for each config as well. Since by default GLFW (the library I am using for input) treats the input in the range of -1 to 1, I've also included the "normalized" parameter which if set to 1 (enabled) remaps to 0 to 1 range instead. 

As for keys, they are mapped to 500+ numbers in the config, for example the Xbox 360 controller A button is 500, while the B button is 501.

Now there's also a little thing that can help you with what numbers map to what keys. If you enable "outputKeyEvents = 1" in config, now, while you play and press keys, the console will be filled with events saying which key it detected being pressed or released. When you press the key you wish, copy the key parameter and set it into bindings. This is a temporary solution until I make a proper rebinding menu in the game itself.

@Pirxos has also tested it on a wheel and it works, apart from the lack of any FFB.

Here's me testing out gamepad input for the first time during GGJ23: https://twitter.com/Nothke/status/1622018801498734593

Transparency

The game didn't have any support for blended transparency (only alpha cutout/test transparency) until now. That involved doing a bit of gymnastics as the transparent objects need to be drawn at the end of all opaque objects. The first object to feature is the car window!


I have also been working on dust particles, but they don't look so good yet so are work in progress and are disabled for now. But if you want to check them out they can be enabled in the dev menu (~) Drive -> Particles -> enable

Another cool thing about the windows is that they are also affected by shadows and even fog! Unlike most game engines today ;) (Albeit, this is due to being able to hack and pass custom values and wouldn't apply to a generalized case)

https://twitter.com/Nothke/status/1621216253456031752

Headlights

Another popular requested feature was adding headlights, especially when it's really hard to see in the long tunnel in the final sector. They're now in and can be enabled with L by default. They have actually been in the shader for a while just not enabled because they weren't ready yet (just like the particles still are).


What's coming this week?

Rally Sweden is happening! So what will I do? Yes, you guessed it, I will make a Sweden rally inspired stage! I will stream it at and try to use as much geometry nodes as possible. Starting tonight! Subscribe to https://www.twitch.tv/nothke or follow me on twitter to see when I'll be ready: https://twitter.com/Nothke

Here is a little preview of what I'm trying to achieve this week :

Full changelog:

Build 1258 (version 9)

  • Analogue axis support for gamepads! Setup axes in bindings in config. By default uses Xbox controller setup
  • Physics changes: 
    • Changed steering behavior to support gamepad. Steering is more reactive now. (will be tweaked later)
    • Default car now has lower and stiffer tarmac-like suspension
    • Suspension force now dependent on surface normal
  • Default car now has 18 inch tarmac wheels (graphics change only)

  • Added headlights. Toggle on `L` by default.

  • Blended tansparency support. Spec17 car now has windows.

  • Splat materials support. But none in use yet. Hardcorded surface physics for now. Documentation for how to use it coming soon.

  • Changed the smooth follow camera (3rd person). It now has split horizontal and distance constraints, so the camera won't get so far from the car when at high speed and will still be "cool" in the powerslides

  • Added `-cfg "your_path.ini"` to CL args to support loading different configs

Build 1276 (version 10)

  • Joypad button support. Mapped to 500+ keys in bindings config
  • Added outputKeyEvents parameter. Set it to 1 in config to ouput keys that you press/release in the console.
  • Analogue axis deadzone settings now work
  • Exposed "smooth follow" camera parameters in config
  • Car's rear lights are now lit up when headlights are on
  • Removed annoying bright white pixels from rear lights on default car
  • Physics: Reduced steering stiffness to be closer to the old steering physics
  • Exposed gravity parameter in config

Files

shakedown-windows.zip 55 MB
Version 10 Feb 07, 2023

Get Shakedown Rally

Buy Now6.99€ EUR or more

Leave a comment

Log in with itch.io to leave a comment.