SP4CEBAR 2022-12-19 19:26 (Edited)
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!
was8bit 2022-12-19 20:32
"NX is still my favorite programming language!"
Me2
SP4CEBAR 2025-03-09 21:08 (Edited)
The calculations mentioned can be found in the "ENGINE" subroutine
The current calculations have a few flaws:
SP4CEBAR 2025-03-09 21:24 (Edited)
was8bit 2025-03-10 03:48
:)
SP4CEBAR 2025-03-10 07:25
SP4CEBAR 2025-03-15 09:40 (Edited)
SP4CEBAR 2025-03-15 11:13 (Edited)
SP4CEBAR 2025-03-15 20:58 (Edited)
SP4CEBAR 2025-03-15 21:07 (Edited)
SP4CEBAR 2025-03-15 21:16 (Edited)
SP4CEBAR 2025-03-15 21:41
SP4CEBAR 2025-03-15 21:52 (Edited)
SP4CEBAR 2025-03-15 21:57 (Edited)
SP4CEBAR 2025-03-15 22:54
SP4CEBAR 2025-03-15 22:56 (Edited)
For those interested,
SP4CEBAR 2025-03-15 23:02 (Edited)
was8bit 2025-03-16 03:42
Wowzers!
SP4CEBAR 2025-03-17 07:24 (Edited)
SP4CEBAR 2025-03-17 16:18
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
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
SP4CEBAR 2025-03-17 20:13 (Edited)
SP4CEBAR 2025-03-17 20:34
SP4CEBAR 2025-03-17 21:13
was8bit 2025-03-17 21:45
TY :)
SP4CEBAR 2025-03-18 08:10 (Edited)
SP4CEBAR 2025-03-18 08:41
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?
SP4CEBAR 2026-10-10 19:20
SP4CEBAR 2026-10-10 19:22 (Edited)
It's fun to tweak the parameters, you can also look them up in the code and tweak their formulas
GET_ENGINE_PARAM:
GEAR_RATIO_FACTOR = 0.05
BASE_RESISTANCE = 0.6
BASE_CAR_RESISTANCE = 5
'kg
AXLE_MASS= 10
'kg
CAR_MASS = 1500
BASE_THROTTLE = 1.7
MAX_THROTTLE = 9
ENGINE_BASE_POWER = 5
ENGINE_RPM_BOOST = 0.5
ENGINE_REVVING_SPEED = 0.5
MAX_ENGINE_SPEED = 8.75 *G_KRPM_TO_RPS
SAFE_ENGINE_SPEED = 8.4 *G_KRPM_TO_RPS
STARTING_MAX_SPEED = 50
STARTING_POWER = 0.1
STALLING_MIN_SPEED = 5
STALLING_POWER = 0.04
CLUTCH_WEAR_DIST = 0.2
BRAKE_POWER = 0.02
RETURN
'=+=+=+=+= D A T A =+=+=+=+=
GEAR_RATIOS:
DATA 0, 1, 2, 4, 8, 12, -1
SP4CEBAR 2026-10-10 20:29