Texture switching through player actions.

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
gogz69
Deadly
Deadly
Posts: 130
Joined: Fri Nov 07, 2008 7:35 pm
Location: Hunting around the red line stars. (G2)

Texture switching through player actions.

Post by gogz69 »

Would it be possible to switch textures for the player action of launching missiles?

I've roughly drawn up a twin missle bay to demonstrate:


1.Condition state: green - no target set.

Image



2.Condition state: yellow/red - missile armed/locked.

Image



3.Condition state: 1 missile launched.

Image



4.Conditon state: all missiles launched.

Image



Of course, there are many combinations that could be used.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Texture switching through player actions.

Post by JensAyton »

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Texture switching through player actions.

Post by Thargoid »

Ahruman wrote:
Coupled with this
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Texture switching through player actions.

Post by Smivs »

Wow, this opens up some possibilities.

Runs off muttering "shipset v4.0....no!....I've done enough...Aaaaaargh!
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Texture switching through player actions.

Post by Thargoid »

And I haven't even mentioned coupling the worldscript event above with removal of sub-entities and positioning of the launched missile to match the sub-ent missile just removed... ;)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Texture switching through player actions.

Post by Eric Walch »

Thargoid wrote:
And I haven't even mentioned coupling the worldscript event above with removal of sub-entities . ;)
And not to forget the restoration of subentities:

Code: Select all

Revision: 3661
Date: donderdag 8 juli 2010 09:23:01 Nederland-tijd
Author: kaks

A bunch of frangible ships changes, might be revised soon:
- save games now remember whether the player ship's subentities are destroyed or not, and show them on the integrated load screen.
- maintenance overhaul now repairs subentities too. An extra fee is added to the price, proportional to the number of destroyed subentities.
- new js function: ship.restoreSubEntities() - repairs all subentities, returns false if no subentities were restored.
- new js property: ship.subEntityCapacity - the number of undamaged subentities the ship comes with.
Meaning that its possible to add them back after loading new missiles.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Texture switching through player actions.

Post by Thargoid »

That's only in trunk, not 1.74.2, hence I deliberately didn't mention it. But yes that is another option too, or will be soon for the masses.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Re: Texture switching through player actions.

Post by Killer Wolf »

Although this seems like a good and exciting feature, for something like damage (laser scorchmarks/holes etc) and those missiles, would it not be better (if possible) to do this via decals? i'm thinking that the given missile example would need 4 skins, and potentially 4x3 maps if you're using the Griff-type shadery stuff. This is going to mean a lot more memory usage, and bigger OXPS, isn't it...?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Texture switching through player actions.

Post by JensAyton »

Killer Wolf wrote:
Although this seems like a good and exciting feature, for something like damage (laser scorchmarks/holes etc) and those missiles, would it not be better (if possible) to do this via decals?
Yes, except it’s impossible. At the moment, you can’t communicate arbitrary information to shaders except by changing the materials dictionary.
Post Reply