One of the few things I liked about Frontier on my Amiga is that when you shot another ship his "shields" responded and as he became more damaged the shields changed colour (very EE Doc Smith).
I was wondering if it would be possible or even desirable to have an NPCs "shields" (i.e. his energy level) be attached to a shield colour when you hit him.
I thought perhaps a standard FLASHER that encompasses the entire ship somehow programmed to change colour based on energy levels (blue good -> red bad/failing) set to come on only when the ship is hit and go off again when its not.
Like I said, don't know if it's possible and if it is, is it desirable? I just like the idea of visually watching a ship's shields "light up" when you hit him and watching them whizz from blue to red as you nail him with your Mil. laser...
Shield "Flashers"
Moderators: winston, another_commander
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Shield "Flashers"
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Shield "Flashers"
I think it is already programmed by Griff. He has ships that change colours when heated up. However, I am not able to see it because it needs the shaders. With shaders you can make colour dependent on any ship.property. e.g. energy level.DaddyHoggy wrote:I was wondering if it would be possible or even desirable to have an NPCs "shields" (i.e. his energy level) be attached to a shield colour when you hit him.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- 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: Shield "Flashers"
I think this is already a property of all basic ships. At least this is what I see around me when I go sunskimming. Cool effect, by the way!Eric Walch wrote:I think it is already programmed by Griff. He has ships that change colours when heated up.
However, it is not exactly what DH suggested. A ship's shields would have to be visible around it, not on its hull.
I doubt, though, that it can be achieved with flashers right now, at least not different colours.
Although, the idea is not bad (yes, DH, a sensible suggestion! ). I might go and try what happens with a fast switchLightsOn switchLightsOff in every received ATTACKED message. (I take it that ATTACKED is received with every laser hit?)
Re: Shield "Flashers"
IF you do something like that...please check if there's an easy solution to add this also for ships bumping into something...like cargo, each other, ...Commander McLane wrote:Although, the idea is not bad (yes, DH, a sensible suggestion! ). I might go and try what happens with a fast switchLightsOn switchLightsOff in every received ATTACKED message. (I take it that ATTACKED is received with every laser hit?)
I've recently seen a ship on injectors hit another one on an attack run...was an impressive sight already....but if some "shield hit" effect would be visible, I believe it would be great for consistency to also see such things, especially when the ships are not destroyed by hitting each other - as quite often is the case for less powerful crashes.
Screet
- Commander McLane
- ---- 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: Shield "Flashers"
Okay, did it. And the result is, errm..., mixed.Commander McLane wrote:I might go and try what happens with a fast switchLightsOn switchLightsOff in every received ATTACKED message. (I take it that ATTACKED is received with every laser hit?)
The good news is: You can define one flasher in the ship's subentities which is big enough to enclose the whole ship. And you can activate it during the ATTACK-messages.
However, the bad news is: With the current structure of route1patrolAI (that's the one I was testing with; but there is no reason why it should be different with other AIs) you cannot switch it on and off reliably enough to look realistic. If I insert "switchLightsOn, switchLightsOff" into the ATTACKED-message, nothing happens. The flasher is switched off too quickly to even become visible.
I got better luck when I moved the switchLightsOff into all the messages that would be received immediatly after the ATTACKED (namely FIGHTING and FLEEING). However, while that works more or less for the FLEE-state, it doesn't work very well if a change of AI-state is involved. For the initial attack, for instance, it may take several seconds until either the FIGHTING- or FLEEING-message are received. Until then the flasher works continuously. (I guess, while ATTACKED is a priority message, the AI gets the FIGHTING or FLEEING only with the next UPDATE, which can be immediatly or ten seconds away.) And if the ship's state is set to ATTACK_SHIP, the flasher remains on until the next laser hit (although this could be dealt with by putting another switchLightsOff in the ENTER-part of ATTACK_SHIP).
Overall the visual impression is not satisfying. The 'shields' do glow, but the effect is in now way related to the duration of my laser fire, and still the laser's impact on the hull is clearly visible throughout.
And I haven't even mentioned the technical difficulty that implementing it this way would need a complete rewrite of all ships and all AIs. And it wouldn't even work with any ship that already has flashers. They would flash together with the 'shields', of course.
Therefore I think a 'shields' effect would have to be realized on the code level, not via OXP.
Question is: Would it be possible to have a flasher effect (or probably a shader effect that activates a sphere around a ship), which is triggered while and as long as a ship loses energy. Not by one of the AI-messages, but just by the pure fact that the ship's energy is decreasing right now (which would naturally also cover the case of bumping into something)? For player ships it would have to be bound to the shields instead, of course.
If possible, I would vote for this addition.
- Tivva
- ---- E L I T E ----
- Posts: 279
- Joined: Wed Sep 03, 2008 5:32 pm
- Location: Right behind you in a cloaked Thargoid Warship prototype
Re: Shield "Flashers"
But how would this react to a cloaking device?Commander McLane wrote:Said stuff....
Question is: Would it be possible to have a flasher effect (or probably a shader effect that activates a sphere around a ship), which is triggered while and as long as a ship loses energy. Not by one of the AI-messages, but just by the pure fact that the ship's energy is decreasing right now (which would naturally also cover the case of bumping into something)? For player ships it would have to be bound to the shields instead, of course.
If possible, I would vote for this addition.
There is a significant energy drain when cloaked, would this then negate the cloak by making your shields glow?
- Commander McLane
- ---- 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: Shield "Flashers"
As far as the player is concerned, no. Because in his case the shield glow should be bound to his shields, not energy.Tivva wrote:But how would this react to a cloaking device?
There is a significant energy drain when cloaked, would this then negate the cloak by making your shields glow?
And for NPCs I don't know whether the cloaking device is draining their energy too. This is a question for the code monkeys.