Honk

by GotLag

Trains honk when stopping. And starting. And on command.

Tweaks
a month ago
0.13 - 2.0
95.8K
Trains

b "worse than Euclidean and more expensive" :p

5 years ago

A quick dirty test tells me your implementation is 35% slower than a traditional euclidean. In comparison i count three additional function calls and an additional division. And you're not even localizing the table lookups. :p

It's a pity the API doesn't allow changing volume after creation, so the sound stays at volume even if one moves really fast (say, in another train). I need doppler effects...

5 years ago

Optimising Lua does not come naturally to me. I keep forgetting that all the "expensive" operations like square roots get passed off to native functions.

5 years ago

I don't even know how much that bit of code affects the total runtime cost. I just saw the comment in the code and had to check it out ;).

New response