Hi all, and especially coders. 🙂
I decided to start a separate topic for this, so I can track this one, instead of all the others.
This will be long, but please be patient, and if you are interested, read through. Thank you.
The purpose of this topic is to share and discuss my design aproach and plan on how to implement the sounds I have created for Pioneer.
I would do the implementation myself but although I programmed c64 in assembly, and I know a lot of high level languages, I never touched C or C++, so I need other's help to make this happen.
I have a dream , how pioneer should sound, but that is just my opinion and dream, I will listen to all your feedbacks and opinions.
One more thing, I am not a native english speaker, so forgive my mistakes and bad spelling.
I am using the terms outside and inside a lot. Oustide means outside camera view, inside means inside the ship cockpit view.
Well, let's get on with it.
A small background of the design:
Pioneer is a simulation for me. (I do not want to start another thread on the game vs simulation thing, hope most of you agree).
However, this thing should be enjoyable, so even in sound implementation, we need to make some shortcuts here and there, to have nice atmosphere, without being to far from reality.
The big thing we need to face: there is no sound in space.
But, there are electromagnetic waves. I listened to a lot of Nasa recordings on planet emitted radiowaves.
I decided to do something similar.
I realised that even there is no sound in space, later humanity can/should develop some kind of magnetic reciever, which can provide some audible material inside spaceships, so the pilot will be able to know, what is going outside. Or not. 🙂
Sound groups:
I grouped the sounds based on the different implementation needs, which I will explain each.
1, Cockpit Sounds.
Sounds originated from the inside environment of the ship, including warning sirens, missile lock sound, crew sounds, ship ambient (wires humming, equipment sounds), hull damage (falling boxes, spars, breaking tubes), etc.
if camera is inside the ship, these can be heared clearly. If camera is outside the ship, these are muted. (exception: warning sirens for obvious reasons).
Some concepts: I am currently in the process of creating a lot of crew background nioses (cough, breathing, footsteps, typing...) which can be played randomly, the more crew you have, the more often.
2, Ship sounds
These sounds are generated by your ship, including thrusters, oustide hull hit, undercarriage, weapons, etc.
These can be heared clearly outside only if atmosphere is present!
Volume should be calculated based on the atmosphere: on the planet surface its 100% and its decreasing in direct proportion to the pressure of the atmosphere.
If you are in space, these sounds cannot be hear, however, I am working on an electromagnetic version of the weapons, which will be heared.
Inside the ship these all can be heared every time. However, since they are not generated inside the cockpit, these should have lower volume (around 80%)
3, Planetary sounds
Ambient sounds of planets, and other features on the planet including wind, rocks falling, thunder, factory noise , city ambient and much much more.
These can be heared if atmosphere is present.
All of these are working like ship sounds above, based on the atmos. pressure, so as you leave the planet these are fading away.
Building specific sounds like a city noise is obviously originated from one point, volume should be based on the distance.
4, Station sounds
Can be heared if you are docked/docking.
Bulk door closing, opening sounds and station interior ambient sounds.
Nothing fancy in terms of coding, I do not wanna overcomplicate this with atmosphere and such.
These should be heared everytime, everywhere, with less volume inside the ship (80%).
5, interface sounds
Simple enough, the sounds of pioneer's interface, like the click, new medal, mission completed etc...
6, Sound of Space
The electromagnetic waves all suns, planets and moons are emitting.
I had to made my own, since nasa recodings are amazing, but they are so harsh and alien, that they cannot be used.
To explain the implementation simply: the volume of these sounds are in direct proportion of an object's gravity.
So, the sound of the sun can be heared all around the system, really silent on the edge, but exponencially loud in the middle.
Example: You are landed on the moon. You can hear the electromagnetic sound of the moon, the sound of the earth (less volume), and the sound of the sun. If you are close to the earth, moon should be really silent, sun should be around the same volume, earth should be loud.
These can be heared outside and inside clearly when in space, but with the atmosphere pressure, these are in inverse proportion to atmopshere pressure, so if you landed on a planet with atmosphere, they cannot be heared.
I created these sounds for all frontier planet and star types.
You can already hear some in the game as a background ambient sound.
You can also find all of them already in the sound directory under the space folder.
6,Music
I do not want to touch this, since everyone has his own style and apetite.
If you ask me, the best would be a directory, where everyone can drop his/her own music.
Current open tasks for myself
creating missing sounds
- missing Crew sounds
- missing electromagnetic version of weapon sounds
- more space and planet sounds based on pioneer's planet list (someone can share this with me?)
- revisiting all sounds to have better quality wher needed.
Questions I have:
- I am seriously considering the creation of 'elevator music' when docking. Do you think it would be great?
- Tom, is it ok to use the FTP site you gave me to upload/update the sounds?
- Would be great to have the list of weapons currently in the game
- I need all planet and sun types. Is there a place where I can find them?
So that is all, I think I made my typing exercise for today, let me know your opinion, and if clarification needed!
I wouldn't be too far fetched that a ship has some sort of "audio simulation" so one does not have to rely on only visual cues. Check out this video from the FPS Shattered Horizon:
It would be cool if the sound could be turned to "realism mode" so one would not hear any external sounds except for when not in vacuum or when something impacts the hull.
This all sounds really good! I don't think crew hiring is yet implemented though so it could be a while before you can test your sounds out for that.
I'm all for realism but the idea of "simulated" sound in space scares me. I'm tempted to say that I'd like it to treat sound normally in space but actually, this could turn out to be really interesting and unique. I'm looking forward to seeing where you go with this 🙂
Thanks for the feedback.
As for the simulated sound in space, I try to keep it close to the real sound of weapons, but give a bit more electromagnetic feeling to it ( its hard to explain sounds with words).
If you are in your ships, your weapons wil sound normal as it should be.
That's a lot of stuff! 😀 I really like the concept so far. I'm not a big fan of having crew sounds in the cockpit. I think that kind of breaks the mood of loneliness in space and the sense of being completely isolated from everything, maybe the pilot (player) is in a cabin instead of a large room full of people. Having that silence in the cockpit could be a great contrast with the more loud sounds in a station. The one human voice I wouldn't mind hearing in the cockpit could be the one in the control panel. A robotic human voice that responds to your commands, something similar to HomeWorld or Freelancer. There are some nice text to speech programs out there that can do the trick! 😀 But so far I like your concept and can't wait to hear it in the game.
Hi, can someone provide me the list of current planet and star types in pioneer?
Would be enough to point me in the direction of the data file contains this, if its an external one.
If not, I assume I need to hunt for it in the sourcecode, right?
Would be enough to point me in the direction of the data file contains this, if its an external one.
If not, I assume I need to hunt for it in the sourcecode, right?
I think you want this...
TYPE_GRAVPOINT = 0,
TYPE_BROWN_DWARF = 1,
TYPE_STAR_M = 2,
TYPE_STAR_K = 3,
TYPE_STAR_G = 4,
TYPE_STAR_F = 5,
TYPE_STAR_A = 6,
TYPE_STAR_B = 7,
TYPE_STAR_O = 8,
TYPE_STAR_M_GIANT = 9,
TYPE_WHITE_DWARF = 10,
TYPE_PLANET_SMALL_GAS_GIANT = 11,
TYPE_PLANET_MEDIUM_GAS_GIANT = 12,
TYPE_PLANET_LARGE_GAS_GIANT = 13,
TYPE_PLANET_VERY_LARGE_GAS_GIANT = 14,
/* yeah yeah, asteroids aren't planets technically... */
TYPE_PLANET_ASTEROID = 15,
TYPE_PLANET_LARGE_ASTEROID = 16,
TYPE_PLANET_DWARF = 17,
TYPE_PLANET_SMALL = 18,
TYPE_PLANET_WATER = 19,
TYPE_PLANET_DESERT = 20,
TYPE_PLANET_CO2 = 21,
TYPE_PLANET_METHANE = 22,
TYPE_PLANET_WATER_THICK_ATMOS = 23,
TYPE_PLANET_CO2_THICK_ATMOS = 24,
TYPE_PLANET_METHANE_THICK_ATMOS = 25,
TYPE_PLANET_HIGHLY_VOLCANIC = 26,
TYPE_PLANET_INDIGENOUS_LIFE = 27,
TYPE_PLANET_TERRAFORMED_POOR = 28,
TYPE_PLANET_TERRAFORMED_GOOD = 29,
TYPE_STARPORT_ORBITAL = 30,
TYPE_STARPORT_SURFACE = 31,
TYPE_MAX = 32,
TYPE_STAR_MIN = TYPE_BROWN_DWARF,
TYPE_STAR_MAX = TYPE_WHITE_DWARF
// XXX need larger atmosphereless thing
};
Planet types are all subject to change.
Planets all fall under this in the new system :
TYPE_PLANET_TERRESTRIAL
std::string s;
if (mass > fixed(2,1)) s = "Massive";
else if (mass > fixed(3,2)) s = "Large";
else if (mass < fixed(1,10)) s = "Tiny";
else if (mass < fixed(1,5)) s = "Small";
if (m_volcanicity > fixed(1,2)) {
if (s.size()) s += ", highly volcanic";
else s = "Highly volcanic";
}
if (m_volatileIces + m_volatileLiquid > fixed(1,5)) {
if (m_volatileIces > m_volatileLiquid) {
s += " ice world";
} else {
s += " ocean world";
}
} else {
s += " rocky planet";
}
if (m_volatileGas < fixed(1,100)) {
s += " with no significant atmosphere";
} else {
std::string thickness;
if (m_volatileGas < fixed(1,10)) thickness = "tenuous";
else if (m_volatileGas < fixed(1,5)) thickness = "thin";
else if (m_volatileGas < fixed(2,1)) {}
else if (m_volatileGas < fixed(4,1)) thickness = "thick";
else thickness = "very dense";
if (m_atmosOxidizing < fixed(1,2)) {
if (mass > fixed(3,1)) {
s += " with a "+thickness+" Hydrogen atmosphere";
} else {
s += " with a "+thickness+" Methane atmosphere";
}
} else {
if (m_life > fixed(1,2)) {
s += " with a "+thickness+" Oxygen atmosphere";
} else {
s += " with a "+thickness+" Carbon Dioxide atmosphere";
}
}
}
if (m_life > fixed(1,7)) {
s += " and advanced indigenous life.";
} else if (m_life > fixed(0)) {
s += " and indigenous microbial life.";
} else {
s += ".";
}
return s;
}
So the most important parts now are the values such as m_volcanicity, m_life ect. A planet will be chosen based on those values.
FYI, with an enum you do not have to set the value. Such as
TYPE_GRAVPOINT = 0,
should be
TYPE_GRAVPOINT,
that way if you ever go back and insert a new value in-between two previous settings, you don't have to change anything. As soon as it's recompiled it will use the new number. Enums are automatically in numerical order that they are listed as, starting at 0. Thats the beauty of using an enum.
TYPE_GRAVPOINT = 0,
should be
TYPE_GRAVPOINT,
that way if you ever go back and insert a new value in-between two previous settings, you don't have to change anything. As soon as it's recompiled it will use the new number. Enums are automatically in numerical order that they are listed as, starting at 0. Thats the beauty of using an enum.
True, but you must be careful with respect to save files. If you store an enum value in a file, then you must ensure that that value will have the same meaning when the save is loaded. If you want to maintain compatibility across recompiles and changes, then you want to keep the enum value the same.
I actually don't think SBodys are stored in save files currently, so there's no problem in this particular case. Its just worth thinking about as you hack on the code - don't break save files unless you have to.
Bump.
Anyone from the coders to implement it?
Or honestly, is it a bad concept?
I quite like your description of the many various sound inputs.
I know nothing about audio coding at the moment though 🙁
I really like this. Especially the part about having no sound in space. I think the Orbiter sim has got it right.
Anyone from the coders to implement it?
Or honestly, is it a bad concept?
Before someone can work on the ideas the requirements need to be put onto our issue tracker, preferably in smaller parts so we can think of the technical details. Like the random cockpit sounds, maybe it would be a Lua module so it's easier to change (you could script and tweak it yourself without c++ knowledge). I'm working on the music player this weekend and after that I can focus on something else, maybe these Advanced Sound Simulation ideas :]
Anyone from the coders to implement it?
Or honestly, is it a bad concept?
Before someone can work on the ideas the requirements need to be put onto our issue tracker, preferably in smaller parts so we can think of the technical details. Like the random cockpit sounds, maybe it would be a Lua module so it's easier to change (you could script and tweak it yourself without c++ knowledge). I'm working on the music player this weekend and after that I can focus on something else, maybe these Advanced Sound Simulation ideas :]
Thank you.
I will check out that issue tracker thingie, and we'll see how can I progress with it.
If anytime you need any help,contact me.
I opened https://github.com/pioneerspacesim/pioneer/issues/281
Are you going to create missing star sounds?
Here is current list of all system object type, it would be nice to have sounds for all star types:
case TYPE_BROWN_DWARF:
case TYPE_STAR_M:
case TYPE_STAR_K:
case TYPE_STAR_G:
case TYPE_STAR_F:
case TYPE_STAR_A:
case TYPE_STAR_B:
case TYPE_STAR_O:
case TYPE_STAR_M_GIANT:
case TYPE_STAR_K_GIANT:
case TYPE_STAR_G_GIANT:
case TYPE_STAR_F_GIANT:
case TYPE_STAR_A_GIANT:
case TYPE_STAR_B_GIANT:
case TYPE_STAR_O_GIANT:
case TYPE_STAR_M_SUPER_GIANT:
case TYPE_STAR_K_SUPER_GIANT:
case TYPE_STAR_G_SUPER_GIANT:
case TYPE_STAR_F_SUPER_GIANT:
case TYPE_STAR_A_SUPER_GIANT:
case TYPE_STAR_B_SUPER_GIANT:
case TYPE_STAR_O_SUPER_GIANT:
case TYPE_STAR_M_HYPER_GIANT:
case TYPE_STAR_K_HYPER_GIANT:
case TYPE_STAR_G_HYPER_GIANT:
case TYPE_STAR_F_HYPER_GIANT:
case TYPE_STAR_A_HYPER_GIANT:
case TYPE_STAR_B_HYPER_GIANT:
case TYPE_STAR_O_HYPER_GIANT:
case TYPE_STAR_M_WF:
case TYPE_STAR_B_WF:
case TYPE_STAR_O_WF:
case TYPE_STAR_S_BH:
case TYPE_STAR_IM_BH:
case TYPE_STAR_SM_BH:
case TYPE_WHITE_DWARF:
case TYPE_PLANET_GAS_GIANT:
case TYPE_PLANET_ASTEROID:
case TYPE_PLANET_TERRESTRIAL:
case TYPE_STARPORT_ORBITAL:
case TYPE_STARPORT_SURFACE:
Are you going to create missing star sounds?
Thanks for the head up and the info, looks like I'll have some time in the upcoming weeks, I'll surely do it.
Some of types are cryptic so here is explanation for them:
M_WF - Red/M Wolf Rayet Star
B_WF - Blue/B Wolf Rayet Star
O_WF - Purple-Blue/O Wolf Rayet Star
S_BH - Stellar Blackhole
IM_BH - Intermediate mass Black-hole
SM_BH -Super massive black hole
Are you going to create missing star sounds?
Here is current list of all system object type, it would be nice to have sounds for all star types:
case TYPE_BROWN_DWARF:
case TYPE_STAR_M:
case TYPE_STAR_K:
case TYPE_STAR_G:
case TYPE_STAR_F:
case TYPE_STAR_A:
case TYPE_STAR_B:
case TYPE_STAR_O:
case TYPE_STAR_M_GIANT:
case TYPE_STAR_K_GIANT:
case TYPE_STAR_G_GIANT:
case TYPE_STAR_F_GIANT:
case TYPE_STAR_A_GIANT:
case TYPE_STAR_B_GIANT:
case TYPE_STAR_O_GIANT:
case TYPE_STAR_M_SUPER_GIANT:
case TYPE_STAR_K_SUPER_GIANT:
case TYPE_STAR_G_SUPER_GIANT:
case TYPE_STAR_F_SUPER_GIANT:
case TYPE_STAR_A_SUPER_GIANT:
case TYPE_STAR_B_SUPER_GIANT:
case TYPE_STAR_O_SUPER_GIANT:
case TYPE_STAR_M_HYPER_GIANT:
case TYPE_STAR_K_HYPER_GIANT:
case TYPE_STAR_G_HYPER_GIANT:
case TYPE_STAR_F_HYPER_GIANT:
case TYPE_STAR_A_HYPER_GIANT:
case TYPE_STAR_B_HYPER_GIANT:
case TYPE_STAR_O_HYPER_GIANT:
case TYPE_STAR_M_WF:
case TYPE_STAR_B_WF:
case TYPE_STAR_O_WF:
case TYPE_STAR_S_BH:
case TYPE_STAR_IM_BH:
case TYPE_STAR_SM_BH:
case TYPE_WHITE_DWARF:
case TYPE_PLANET_GAS_GIANT:
case TYPE_PLANET_ASTEROID:
case TYPE_PLANET_TERRESTRIAL:
case TYPE_STARPORT_ORBITAL:
case TYPE_STARPORT_SURFACE:
Yikes. The proliferation of star types is ludicrous. You can probably count the number of type O hypergiants in this galaxy on the fingers of one hand.
That doesn't mean they're not cool 😉
Theres only one of these too: case TYPE_STAR_SM_BH:
First one to find a class O hyper-giant gets a free beer 😆
But saying that it would be nice to get rid of those, maybe have a handful of startypes, one for blackhole, one for star, one for sub-stellar and one for wolf-rayet and they would just scale between class and size depending on generated values.
Actually thats exaclty how the planets work now so thats probably the best thing to do...?
Noooo, what hack would then we need to have special sfx for them?
We would generate new values during galaxy generation for each star based on seed and other things, those values would then be used to determine Class, size, perculiarities ect. Like how planets work.
EG: Before planets were individual types for different planet types, so Ice planets had a type, desert had a type ect.. Now we generate values and change one planet type based on those values. Like m_life m_volcanicity m_volatileGasses ect.
So the sounds would play based on those values.
EG: Before planets were individual types for different planet types, so Ice planets had a type, desert had a type ect.. Now we generate values and change one planet type based on those values. Like m_life m_volcanicity m_volatileGasses ect.
So the sounds would play based on those values.
Based on this, would it be better if I create sounds for each value type you use for a planet?
Based on this, (and if it doesn't use too much cpu) we can provide a mixture of those sounds based on the biggest 3-4 values used, and volumes used for mixing can be based on the value ratios.
(only in that case, if my understanding on your routine for planet generation is correct.)
Doing this would provide almost unique sound for each planet. Am i right?
Your right that seems the best way to do it and would give different sounds per planet
I'll run down how the planets work:
m_volatileGas : 0-? : Atmosphere thickness
m_atmosOxidizing : 0.0 = reducing (H2, NH3, etc), 1.0 = oxidising (CO2, O2, etc)
s += " with a "+thickness+" Oxygen atmosphere";
} else if (m_atmosOxidizing > fixed(7,10)) {
s += " with a "+thickness+" Carbon Dioxide atmosphere";
} else if (m_atmosOxidizing > fixed(65,100)) {
s += " with a "+thickness+" Carbon Monoxide atmosphere";
} else if (m_atmosOxidizing > fixed(55,100)) {
s += " with a "+thickness+" Methane atmosphere";
} else if (m_atmosOxidizing > fixed(3,10)) {
s += " with a "+thickness+" Hydrogen atmosphere";
} else if (m_atmosOxidizing > fixed(2,10)) {
s += " with a "+thickness+" Helium atmosphere";
} else if (m_atmosOxidizing > fixed(15,100)) {
s += " with a "+thickness+" Argon atmosphere";
} else if (m_atmosOxidizing > fixed(1,10)) {
s += " with a "+thickness+" Sulfuric atmosphere";
} else {
s += " with a "+thickness+" Nitrogen atmosphere";
}
m_life : 0.0 = dead, 1.0 = teeming
m_volcanicity : 0 = none, 1.0 = fucking volcanic
m_volatileIces: 1.0 = 100% ice cover (earth = 3%)
m_volatileLiquid: 1.0 = 100% ocean cover (earth = 70%)
m_metallicity: (crust) 0.0 = light (Al, SiO2, etc), 1.0 = heavy (Fe, heavy metals)
So from those values we generate all our planet types, for example an Earth type world is thus:
(body->m_volatileGas > fixed(2,10))){
So thats life above 0.7 and gas/atmosphere above 0.2... thats all we would require to get an Earth-like terrain.
m_life also scales plant colours for a planet.
Water planets are simply any planet with high liquid content (m_volatileLiquid)
Icy planets are much the same but for m_volatileIce and also temperature.
m_metalicity : metal content, higher gives more red rock.
m_volcanicity obviously determines how volcanic a world is, the higher the value the more lumpy and mountainous the terrain is. If Volcanicity is above 0.7 then we also get volcanoes popping up and we change terrain/colour to a volcanic world.
I tell you what would be bloody great... If we could use the noise/fractals used to form the terrains for the sounds as well. It would be great because you could have water sound play only near water, or other sounds in the same way.
Since the land is only a fractal, 0-1, you can invert and square it and multiply volume by that...
Anyway, I suppose the most/only important values WRT the sound would be life, atmosphere, water and volcanicity...? Althoug we could still use the other values just to add variation to sound use.