Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

okay I’ve further updated how the oscillator calculates x to guarantee it hits the correct extremes: image.png

it’s possible to further refactor this but I like simplicity because it helps me return to the project and mentally load the code when needed. I’d like to also note that my implementation is an alternative implementation to Barotrauma and may not function exactly. They use a phase value which I call “x” and modulate the value wherein I am “ping-ponging” a value to determine a position in the wave form.

Barotrauma Oscillator

here’s the calculations for each wave form: image.png

I updated the frequency calculation (which I forgot to do after taking screenshots) so that it isn’t at half herz. With that said, after some testing I think it all works now… let me know if you disagree. I’ll publish the new version soon.

I also found some other bugs/issues while testing that will be included.