Couple of reminders regarding old requests

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Couple of reminders regarding old requests

Post 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.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Couple of reminders regarding old requests

Post 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.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Couple of reminders regarding old requests

Post 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).
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Couple of reminders regarding old requests

Post 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).
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Re: Couple of reminders regarding old requests

Post 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?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Couple of reminders regarding old requests

Post 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.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Couple of reminders regarding old requests

Post 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.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Couple of reminders regarding old requests

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Couple of reminders regarding old requests

Post 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.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Couple of reminders regarding old requests

Post 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)
Post Reply