Progress

General discussion for players of Oolite.

Moderators: winston, another_commander

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Progress

Post by Switeck »

cim wrote:
Svengali wrote:
A few scriptable and bindable 'user' properties would be a dream. I'm often using energy, fuel or lightsActive to control shaders or pass infos. This reduces the need to switch them.
Makes sense. How many do you think would be sensible? I'm thinking two floats, two ints, and two vec4s should be enough in general, plus make hullHeatLevel configurable to simplify use of the default shader.
NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety. :lol:
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

Switeck wrote:
NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety. :lol:
Should be fairly straightforward with visual effects - just create one at the ship's current position (or thereabouts), with appropriate shader parameters. Reminds me that I was going to add a scale(f) method to resize visual effects, though.

Adding that sort of dynamic rewriting of the shader program itself, though... that would be extremely difficult.
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: Progress

Post by Commander McLane »

cim wrote:
Switeck wrote:
NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety. :lol:
Should be fairly straightforward with visual effects - just create one at the ship's current position (or thereabouts), with appropriate shader parameters. Reminds me that I was going to add a scale(f) method to resize visual effects, though.
That would be lovely. I was originally experimenting with flashers in order to create a shield orb around the ship. But this never went anywhere. Using the hull temperature for as visual effect is really only a limited workaround, for instance it doesn't allow for another colour. So I would gladly replace it with a visual effect. Scalability would be great too, of course, because the effect should be proportional to the ship's size. :)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Progress

Post by Svengali »

cim wrote:
Makes sense. How many do you think would be sensible? I'm thinking two floats, two ints, and two vec4s should be enough in general, plus make hullHeatLevel configurable to simplify use of the default shader.
Yes, that sounds like a plan .-)
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Progress

Post by Tricky »

cim wrote:
Switeck wrote:
NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety. :lol:
Should be fairly straightforward with visual effects - just create one at the ship's current position (or thereabouts), with appropriate shader parameters. Reminds me that I was going to add a scale(f) method to resize visual effects, though.

Adding that sort of dynamic rewriting of the shader program itself, though... that would be extremely difficult.
Would that allow something like this...
an improved Langston Field which expands as it absorbs energy, increasing its surface area and dissipating heat faster.
-- The Mote in God's Eye.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Progress

Post by Svengali »

Tricky wrote:
cim wrote:
Reminds me that I was going to add a scale(f) method to resize visual effects, though.

Adding that sort of dynamic rewriting of the shader program itself, though... that would be extremely difficult.
Would that allow something like this...
an improved Langston Field which expands as it absorbs energy, increasing its surface area and dissipating heat faster.
-- The Mote in God's Eye.
The difficult part is not the scaling in shaders - it's the blending.
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: Progress

Post by CommonSenseOTB »

Code: Select all

Revision 5223 - Directory Listing 
Modified Thu Aug 23 19:46:23 2012 UTC (3 days, 19 hours ago) by cim 
Some new ship JS properties
ship.currentWeapon
ship.weaponPosition*

Thank you kindly cim! :D
Commander McLane wrote:
cim wrote:
Switeck wrote:
NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety. :lol:
Should be fairly straightforward with visual effects - just create one at the ship's current position (or thereabouts), with appropriate shader parameters. Reminds me that I was going to add a scale(f) method to resize visual effects, though.
That would be lovely. I was originally experimenting with flashers in order to create a shield orb around the ship. But this never went anywhere. Using the hull temperature for as visual effect is really only a limited workaround, for instance it doesn't allow for another colour. So I would gladly replace it with a visual effect. Scalability would be great too, of course, because the effect should be proportional to the ship's size. :)
I've been testing and tweaking a shield flashers prototype for the last couple of weeks. For 1.76+. Wait till you see it... :shock:

:lol:

8)
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: Progress

Post by CommonSenseOTB »

I would also like player.ship or this.ship.maxPitch/this.ship.maxRoll/this.ship.maxYaw to be implemented as a read only property. I have an oxp that I'm writing that could use this instead of the clumsy player calibration that I'm using now.

If possible, thanks in advance and great work all of you. :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

Well, I suppose you can have those.

Code: Select all

r5190: [...] Add ship.max(Pitch|Roll|Yaw) properties [...]
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: Progress

Post by Wildeblood »

cim wrote:
A new type of entity for trunk: Visual Effects

...Additionally, properties have been added to the Station and System JS classes to allow the usual break patterns to be suppressed...
:?: How's it done? Example code, please.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

Break pattern suppression

Code: Select all

station.breakPattern = false;
system.breakPattern = false; // must be called in shipWillExitWitchspace to be useful
I'll release a sample OXP for visual effects soon.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Progress

Post by Smivs »

cim wrote:
Break pattern suppression

Code: Select all

station.breakPattern = false;
system.breakPattern = false; // must be called in shipWillExitWitchspace to be useful
I'll release a sample OXP for visual effects soon.

<Smivs waits eagerly> :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

Okay, quick demo OXP. VisualEffect Demo: Sunspots

The shader is not finished, but it's not the shader you're interested in. There are a few hints in the readme.txt for other possibilities. (And the Wiki is up-to-date with documentation, of course)
User avatar
Rese249er
---- E L I T E ----
---- E L I T E ----
Posts: 647
Joined: Thu Jun 07, 2012 2:19 pm
Location: Well, I WAS in G3...

Re: Progress

Post by Rese249er »

cim wrote:
Experimentally, I've changed the system populator so that all systems have at least one rock hermit. If there wasn't one generated on the normal spacelanes, there will be one added to a semi-random point in space quite some distance from the spacelanes.
Not sure if this has happened to anyone else, but whilst tooling about G1, Ususor, a Poor Agro Feudal system with TL2, I came upon TWO Rock Hermits within scan range of each other. I just had to stop and scratch my head... I've got the game paused looking at these Hermits while posting this.
Got all turned around, lost my nav connection... Where am I now?
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Progress

Post by Smivs »

Yeah, I've seen that once or twice. I quite like that it happens. :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
Post Reply