Gear Shifter

9

SP4CEBAR 2022-12-19 19:26 (Edited)

Vrooom... dud dud dud...


        Open In Editor


Guide to acceleration

  1. Press the "s" button to start the car
  2. Drag the gear shifter to the first gear
  3. Drag the left "clutch" slider downward slowly to start accelerating (to disengage the clutch)
  4. Drag the right-most slider upwards to throttle up (to engage the gas pedal)
  5. Drag the clutch slider up (to engage it)
  6. Switch to the next gear
  7. Repeat from step 3

Things you can do

Controls

Backstory

I'm just sketching out some code for in Unity.
It's a gear shifter that's designed to feel as natural as possible. I added a spring functionality so that you can shift from gear two (bottom left) to gear three (top middle) by dragging: up, wait, up, just like in a real car.

It would've taken me ages to design it in unity, designing it in NX first and implementing this in Unity should be easier.
NX is still my favorite programming language!

Gear Shifter.nx | Open in app
2025-03-18 08:39
Gear Shifter.nx | Open in app
2025-03-18 08:10
Gear Shifter.nx | Open in app
2025-03-17 21:19
Gear Shifter.nx | Open in app
2025-03-17 21:12
Gear Shifter.nx | Open in app
2025-03-17 20:33
Gear Shifter.nx | Open in app
2025-03-17 20:10
Gear Shifter.nx | Open in app
2025-03-17 17:46
Gear Shifter.nx | Open in app
2025-03-17 17:28
Gear Shifter.nx | Open in app
2025-03-17 16:17
Gear Shifter.nx | Open in app
2025-03-17 07:22
Gear Shifter.nx | Open in app
2025-03-15 23:01
Gear Shifter.nx | Open in app
2025-03-15 22:53
Gear Shifter.nx | Open in app
2025-03-15 21:56
Gear Shifter.nx | Open in app
2025-03-15 21:51
Gear Shifter.nx | Open in app
2025-03-15 21:39
Gear Shifter.nx | Open in app
2025-03-15 21:14
Gear Shifter.nx | Open in app
2025-03-15 21:03
Gear Shifter.nx | Open in app
2025-03-15 20:54
Gear Shifter.nx | Open in app
2025-03-15 11:20
Gear Shifter.nx | Open in app
2025-03-15 11:11
Gear Shifter.nx | Open in app
2025-03-15 09:39
Gear Shifter.nx | Open in app
2025-03-10 07:24
Gear Shifter.nx | Open in app
2025-03-09 21:23
Gear Shifter.nx | Open in app
2025-03-09 21:03
Gear Shifter.nx | Open in app
2022-12-20 00:11
Gear Shifter.nx | Open in app
2022-12-19 19:26

was8bit 2022-12-19 20:32

"NX is still my favorite programming language!"

Me2


SP4CEBAR 2025-03-09 21:08 (Edited)

Update:

The calculations mentioned can be found in the "ENGINE" subroutine

The current calculations have a few flaws:


SP4CEBAR 2025-03-09 21:24 (Edited)

Update 2


was8bit 2025-03-10 03:48


:)


SP4CEBAR 2025-03-10 07:25

Update 3


SP4CEBAR 2025-03-15 09:40 (Edited)

Update 4 - accurate custom speedometer


SP4CEBAR 2025-03-15 11:13 (Edited)

Update 5 & 6 - starting button


SP4CEBAR 2025-03-15 20:58 (Edited)

update 7 - clutch lock


SP4CEBAR 2025-03-15 21:07 (Edited)

Update 8 - speed linked to engine


SP4CEBAR 2025-03-15 21:16 (Edited)

Update 9 - speed preservation


SP4CEBAR 2025-03-15 21:41

Update 10 - Cleanup


SP4CEBAR 2025-03-15 21:52 (Edited)

Update 11 - Tweaking


SP4CEBAR 2025-03-15 21:57 (Edited)

Update 12 - made it harder


SP4CEBAR 2025-03-15 22:54

Update 13 - Code cleanup


SP4CEBAR 2025-03-15 22:56 (Edited)

For those interested,


SP4CEBAR 2025-03-15 23:02 (Edited)

Update 14 - Quick fix


was8bit 2025-03-16 03:42

Wowzers!


SP4CEBAR 2025-03-17 07:24 (Edited)

Update 15 - more tweaking


was8bit 2025-03-17 14:54

Have u seen this game?

https://www.youtube.com/watch?v=nNGCb9Dh4HA


SP4CEBAR 2025-03-17 16:18

Update 16


SP4CEBAR 2025-03-17 16:26

Interesting game! it does appear to be simpler than this here


was8bit 2025-03-17 16:51

The dynamics have always eluded me.... with your knowledge of gears, you could make a version similar to it... the interface would be different, it would probably be easier to start a new game with the new interface, then add gearing dynamics to it...

I tried a long time ago to make this game, but i was clueless about the gear dynamics, so it didnt play well at all ...


SP4CEBAR 2025-03-17 17:30

Update 17


SP4CEBAR 2025-03-17 17:31

Feel free to remix it, the code has been organized and refactored, I think you can navigate through it to find the bits you need


SP4CEBAR 2025-03-17 17:48

Update 18


SP4CEBAR 2025-03-17 20:13 (Edited)

Update 19


SP4CEBAR 2025-03-17 20:34

Update 20


SP4CEBAR 2025-03-17 21:13

Update 21


SP4CEBAR 2025-03-17 21:19

Update 22


was8bit 2025-03-17 21:45

TY :)


SP4CEBAR 2025-03-18 08:10 (Edited)

Update 23


SP4CEBAR 2025-03-18 08:41

Update 24


SP4CEBAR 2025-03-18 08:46 (Edited)

I would like your opinion on this: does the sound you hear match the RPM you read on the Tachometer?

Also, should some meters progress slower or faster than they do now?


Log in to reply.