Active Stealth and Cloak Shield Gadgets

Active Stealth and Cloak Shield Gadgets

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Active Stealth and Cloak Shield Gadgets

Post by trepan »

Here are a couple of screenshots showing the active stealth
and cloak shields demo gadgets.

Enemy View:
Image

Allied View:
Image

All of the units are using the active stealth command (that's what the red
triangles indicate). That operates on a per-unit basis, and uses energy based
on the metalCost of the unit by default.

The flea is equipped with a cloaking shield (note the large energy pull).
I've set it to chase the commander around to keep him and his tag-alongs
cloaked. The configuration file can be used to setup energy cost, cloak range,
uncloakable units, etc...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

OMFG! this CAN BE the base FOR SOOO MANY THINGS!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Have you got custom lua rendering of that shield? Hence the big blue bit on the near side and the red tint on the backside?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Both features (including rendering), are completely implemented in lua.

The cloak shield rendering is done with the following steps:
1. Make 2 sphere display lists:
- one with outward pointing normals (frontside)
- one with inward pointing normals (backside)
2. Set the shademodel to FLAT
3. Enable lighting
4. Enable depth testing
5. Set the backside material properties (including specular)
6. Set the face culling mode to FRONT, and call the backside display list
7. Set the frontside material properties (including specular)
8. Set the face culling mode to BACK, and call the frontside display list
9. Reset shademodel, lighting, depth test, and culling states.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Video Demo (5 MByte, poor quality)
http://trepan.bzflag.bz/spring/cloakshield.avi

Current parameters:
draw = boolean
init = boolean (initial state)
delay = restart delay in frames
energy = number (resource usage)
minrad = number
maxrad = number
growRate = number
shrinkRate = number
selfCloak = boolean

A list of 'uncloakables' can also be configured.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Is it possible to render something similair to the heatclouds of CC3 for distortion effects?
Post Reply

Return to “Lua Scripts”