Page 1 of 1

Couple of reminders regarding old requests

Posted: Wed Nov 28, 2012 6:51 pm
by Cmd. Cheyd
Just some stuff that I have requested in the past that would be nice, and a new one or two-

Wormholes - Right now, if a player targets a wormhole, it shows up as a target but the debug console says the target is null. Apparently they're a special case. It would be nice to be able to manipulate them a little from script. For my purposes, influencing their lifespan would suffice.

Sounds - Volume control over SoundSources from javascript. Ideally the ability to specify an individual SoundSource volume as a reference to the game sound volume level setting as a percentage from 0% to >100% (yes, greater than 100%). Default could be 100% so as not to impact existing OXPs.

Waypoints - Ability to specify waypoints for ships, including player including setting the waypoint as a target (especially if it's out of range technically).

System.Info - Option to specify something like a planet texture and NOT have it written to the SaveGame file if we so choose. I have some OXP ideas that I'd love to pursue, but the effect on save games would have me lynched, tarred, feathered, and my mother's life choices questioned.

Suns - Please, can we texture them? Even if it's a flat disk, I'll make a flat texture that'll work... Heck, I'll download a bunch of SOHO shots and use 'em. :P

I'm sure there's a few more but I've slept since then.

Re: Couple of reminders regarding old requests

Posted: Wed Nov 28, 2012 8:54 pm
by cim
Cmd. Cheyd wrote:
Wormholes - Right now, if a player targets a wormhole, it shows up as a target but the debug console says the target is null. Apparently they're a special case. It would be nice to be able to manipulate them a little from script. For my purposes, influencing their lifespan would suffice.
There are quite a few useful things which could be done if wormholes were exposed to JS. It's on my list of things to look at after 1.78.
Cmd. Cheyd wrote:
Waypoints - Ability to specify waypoints for ships, including player including setting the waypoint as a target (especially if it's out of range technically).
Player aside, this is already possible with the current AI and a ship script, isn't it? Allowing more JS control of the AI would make this easier.

For the player, the compass rather than the targeting system seems the more natural tool for tracking waypoints. The visual effects in trunk might be useful for this.
Cmd. Cheyd wrote:
System.Info - Option to specify something like a planet texture and NOT have it written to the SaveGame file if we so choose. I have some OXP ideas that I'd love to pursue, but the effect on save games would have me lynched, tarred, feathered, and my mother's life choices questioned.
1.76.1 onwards doesn't leave bits around in the save file if the setting is reset. So long as you set them back to null once the player leaves the system / on playerWillSaveGame, the save file size should be largely unaffected.
Cmd. Cheyd wrote:
Suns - Please, can we texture them? Even if it's a flat disk, I'll make a flat texture that'll work... Heck, I'll download a bunch of SOHO shots and use 'em. :P
The problem with texturing the sun is the same as the problem with texturing the planet, only more so - it's really really big. On a typical planet, with a 512x3072 cube map, a texture pixel is a couple of hundred metres across. Suns are around three times the radius of planets, which means to get the same sort of "okay so long as you don't get too close" resolution you'd need a 2048x12288 map ... but there's more in-game reason to get that close to suns, compared with planets.

The other problem is that it's really really big. A full-detail planet model has 20,000 faces, and you can still see the corners. To get a properly circular-looking sun when sun-skimming, you'd probably need to go at least two levels of detail up in the mesh, for 320,000 faces, possibly even higher.

Texturing the disk is possible with shaders, but rotating the texture and stretching it so that the edges look right from any angle is more complicated. (I can't get my head around it, and can't find a good example of the code online either).

You can, in trunk, create a textured model the size of the sun using visual effects, and place it in the same place. That might be a sufficient workaround, and with the sun disk providing a perfect curved edge, the corners might not be too visible either.

Re: Couple of reminders regarding old requests

Posted: Wed Nov 28, 2012 10:10 pm
by Commander McLane
Cmd. Cheyd wrote:
Wormholes - Right now, if a player targets a wormhole, it shows up as a target but the debug console says the target is null. Apparently they're a special case. It would be nice to be able to manipulate them a little from script. For my purposes, influencing their lifespan would suffice.
The most simple way of increasing a wormhole's lifespan is to send another ship through it. Decreasing it isn't possible by workaround, though. You can only make the initial wormhole-creating entity very small (to be precise: very lightweight; mass is the relevant parameter for wormhole lifespan).

Re: Couple of reminders regarding old requests

Posted: Thu Nov 29, 2012 9:44 am
by Svengali
Cmd. Cheyd wrote:
Sounds - Volume control over SoundSources from javascript.
+1

Oh - and we could need a way to check if music is playing (maybe something like Sound.musicIsPlaying).

Re: Couple of reminders regarding old requests

Posted: Sun Dec 02, 2012 1:25 pm
by pagroove
You can, in trunk, create a textured model the size of the sun using visual effects, and place it in the same place. That might be a sufficient workaround, and with the sun disk providing a perfect curved edge, the corners might not be too visible either.
Do you mean that there is some sort of sun fx available yet? I agree with commander Cheyd. The sun is the last thing that looks 'old'. Is it possible to make the suns like in Pioneer?

Re: Couple of reminders regarding old requests

Posted: Mon Dec 03, 2012 3:01 pm
by cim
pagroove wrote:
You can, in trunk, create a textured model the size of the sun using visual effects, and place it in the same place. That might be a sufficient workaround, and with the sun disk providing a perfect curved edge, the corners might not be too visible either.
Do you mean that there is some sort of sun fx available yet? I agree with commander Cheyd. The sun is the last thing that looks 'old'. Is it possible to make the suns like in Pioneer?
You can use visual effects to do "point" texturing, like the sunspots demo I put together.

You can in theory use visual effects to create a textured sphere the size of the sun. It might work out okay, but I suspect it wouldn't look very good without a ridiculously large texture file.

Proper texturing is also theoretically possible but not yet supported: someone would need to contribute GLSL shader code for a "textured sphere impostor" (ideally for a cube map, rather than a lat-lon map) because I can't get that to work... With that, it should be relatively easy to apply it to the sun.

Re: Couple of reminders regarding old requests

Posted: Mon Dec 03, 2012 3:35 pm
by Wildeblood
cim wrote:
You can in theory use visual effects to create a textured sphere the size of the sun.
Not without translucent textures. You'd just be throwing a blanket over the sun, and making a completely dark system. Speaking only for myself, I think improving the corona effect is more important than applying a texture to the disc.

Re: Couple of reminders regarding old requests

Posted: Mon Dec 03, 2012 3:59 pm
by cim
Wildeblood wrote:
cim wrote:
You can in theory use visual effects to create a textured sphere the size of the sun.
Not without translucent textures. You'd just be throwing a blanket over the sun, and making a completely dark system.
You'd want to make use of GLSL's "discard" option, certainly, and probably also make the radius of the sphere marginally smaller than that of the sun, but translucency isn't a complete requirement.

Re: Couple of reminders regarding old requests

Posted: Mon Dec 03, 2012 6:52 pm
by Cody
On the subject of suns, or more specifically their coronas*: I have them zeroed in my planetinfo.plist, which works for all but the systems listed in the local_planetinfo_overrides in my save-file. Is there any simple way to override the overrides?

*That should probably be coronae, but I guess both are acceptable these days.

Re: Couple of reminders regarding old requests

Posted: Mon Dec 03, 2012 8:24 pm
by cim
Unless the local_planetinfo_overrides specifically contain a corona_flare setting, this shouldn't be happening at all. (If they do, as for instance the nova system, the simplest way to override them is to edit the save file and change that setting to 0)