yasi094 290 Posted April 24, 2019 Share Posted April 24, 2019 (edited) Hello, i have a doubt about how works the function on videogames (cars) that does this: 'The car is stopped, so we can hear the engine sound; the car rise the revolutions, so the engine sound rise too.' X = Number Y = Standard Sound F = Final Sound 'Y' is altered by 'X' to emit 'F' I made something similar to a graphic, just so you can understand me. I wanna know, if someone might explain me how this function works on 'C' or 'JAVA'. (I dont know about algorithms, neither about graphics, i have not followed rules, its just so you can understand me). Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Solution North 1191 Posted April 29, 2019 Premium Solution Share Posted April 29, 2019 Somebody correct me if I am wrong but what you are showing is a linear function and instead you want to solve an exponential one, before writing any code I would suggest to understand the math behind it otherwise you will be stuck again in no time Here you go: I personally follow this guy, is pretty good at explaining things After watching this video try to imagine the sound intensity plotted as this exponential function where y=1 is the idle of the car you should get why you need an exponential function to represent the sound (when you press w to accellerate the sound increases in an exponential way and not in a linear way) Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now