Ventures of an ex indie game developer

Slowmobile

A year has passed between start and finish of the following clip. Damn game development is slow and nasty and hairy. And fishy.



I’m pretty sure you won’t notice (though I’m pretty sure you would if it wasn’t there) but I added a bit of main engine throttle whenever the digger is used. I simply connected the sound source to three different engines (fwd/back, turn and “hydraulics”). The vehicle is produced from an .ma file (Maya ASCII model) and an .ini text file. The .ini contains physical settings such as mass, friction, bounce, spring constants, engines type, strength and speed; and UI stuff such as sounds, eyes and break lights. I’m very pleased with this simple, concise configuration file that is analyzed build-time as opposed to some type of scripting language which would have had to interface with my code and in itself would contain hundreds of source files. This is what the above excavator main engine sound looks like:

[tag:main_engine_sound]
type = "engine_sound"
float_values = [1,2,1, 1,5,1, 0,0.5,1, 1,0.2,0.12] ; Low, high, exponent for: pitch, volume, intensity. One intensity factor for each engine.
string_values = ["excavator_engine.wav"]
phys_list = [".*phys_body"]
engine_list = [".*engine:acc", ".*engine:turn", ".*engine:arm"]
mesh_list = []

I find it condensed, plus it’s got very low coupling. Even if I didn’t touch it in a few years, I’m pretty certain that I’d pick it up in a few minutes. The regexps in the engine list each point out one engine (defined above in the same file). The last of the float_values tells the sound code how much to raise the sound volume and pitch when the digger is run at full force. The first six of the float_values are (in order): 1:1 sound pitch at idle engine, 2:1 sound pitch at full throttle, linear pitch curve (exponent=1), 1:1 volume at idle engine, 5:1 volume at full throttle, volume is also linear.

Where was I? Ah, back to the excavator. The result is a slight main engine rev when using the digger. I allow myself some special-casing, or hacking if you will, in these occasions: gyro engines (such as rotors) and auto-locking torque engines (such as “hydraulics”) only respond to what I call engine intensity, never directly to user throttle. In a normal car engine, I do INTENSITY x THROTTLE (and slide the throttle a little to simulate engine inertia). If the hydraulics engine would use the throttle factor to generate sound intensity, you wouldn’t get any sound if the digger is moving, but the button isn’t pressed. Which happens a lot since the engine is configured to “auto-lock”, i.e. hold the last input force.

I might be overdoing it, but I feel that without this type of polish the game is never going to shine. I’m constantly striving towards simulation rather than arcade, though the end-user at the age of three hardly will appreciate it (quite the contrary).

I’m a unsure of exactly how much time I’ve spent on this type of thing as opposed to making a fun game, but a reasonable guess could be 10:1 in favor of the unreasonable. I probably am afraid of shipping (as Seth would have put it), but it’s more to it than that. I want it to be remarkable. Hum… probably have to realize that the more time I put into making it a simulator, the less remarkable the outcome. I’ll try to realize that in the coming year + two weeks.

About the author

Mitt foto
Gothenburg, Sweden