simple starcraft-esque shields

simple starcraft-esque shields

Requests for features in the spring code.

Moderator: Moderators

User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

simple starcraft-esque shields

Post by 1v0ry_k1ng »

option for Starcraft style shields- in effect, simply a second healthbar that absorbs damage first with none of the fx or physics our current sheilds have.
some simple options like once down, shield dosnt recover until x seconds would be helpful too. since it would just call a diffrent coloured healthbar above the first healthbar, it would be very easy to add to units.
could use a modified x-ray widget to show shield fx when up modside.
this would be seriously useful for EE, IW and any other mod that wants working personal shields.
Last edited by 1v0ry_k1ng on 02 Dec 2009, 16:00, edited 1 time in total.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Better shields

Post by hoijui »

*obsolete*
Last edited by hoijui on 02 Dec 2009, 18:19, edited 1 time in total.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Better shields

Post by KDR_11k »

Trivial to Lua... Projectile intercepting shields aren't but personal shields that just absorb X damage before the HP take a dent is Lua territory.

There's a slight variation on shields in Micro Modules (the health bar must be emptied multiple times to kill a unit) that could work as a base.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: simple starcraft-esque shields

Post by 1v0ry_k1ng »

Ok, renamed topic. suggesting it as an engine addition because it is an addition that would be useful in a broad variety of mods, requires little in the way of graphics and makes it accessable to developers lacking LUA prowess (a fair proportion).

the problem with the current shields is that if the shield is small enough that it 100% only protects the unit possessing the shield- and not units even directly adjacent to the unit, especially ones with much smaller footprints, ie, infantry around a shielded tank- the shield does not stop projectiles in time and the unit takes damage. if the shield was literally just a second healthbar and the fx were mod-side or from a dummy regular spring sheild, none of the above difficulties would be an issue.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: simple starcraft-esque shields

Post by CarRepairer »

1v0ry_k1ng wrote:Ok, renamed topic. suggesting it as an engine addition because it is an addition that would be useful in a broad variety of mods, requires little in the way of graphics and makes it accessable to developers lacking LUA prowess (a fair proportion).

the problem with the current shields is that if the shield is small enough that it 100% only protects the unit possessing the shield- and not units even directly adjacent to the unit, especially ones with much smaller footprints, ie, infantry around a shielded tank- the shield does not stop projectiles in time and the unit takes damage. if the shield was literally just a second healthbar and the fx were mod-side or from a dummy regular spring sheild, none of the above difficulties would be an issue.
You make a good point, but as KDR explained, this is super duper trivial to make in LuaRules. A gadget can be easily used in the broad variety of mods you refer to. Engine feature requests should be restricted to things that cannot or should not be done modside.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: simple starcraft-esque shields

Post by KDR_11k »

Additionally a mod will likely do some uncommon things with the shield, have it be more than just a second HP bar with a different regeneration rate. Stuff like making shield-piercing weapons or weapons that do more/less damage against shields, systems that increase the shield recharge speed or disable the shield for a few seconds, etc. An engine-side feature can only be influenced by whatever call-outs the designer thought of and will likely have some assumptions built in that will be wrong in some cases. A Lua shield could be changed whenever anything isn't right. You can make it select only against certain weapons, behave differently at different attack ranges, take more or less damage depending on various factors, let a percentage of the damage bleed through and many things we can't even think of right now.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: simple starcraft-esque shields

Post by 1v0ry_k1ng »

this is super duper trivial to make in LuaRules
how trivial exactly? bearing in mind you gents are the cutting edge of lua, consider the less capable :P
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: simple starcraft-esque shields

Post by CarRepairer »

1v0ry_k1ng wrote:
this is super duper trivial to make in LuaRules
how trivial exactly? bearing in mind you gents are the cutting edge of lua, consider the less capable :P
So much so in fact that I think I'll make it myself. I want a unit in my new game to have a personal shield but the unit itself would have a very low Max HP. After hearing you speak of the problems of using a small shield that could pose a large problem to this design. Thanks for bringing it up.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: simple starcraft-esque shields

Post by 1v0ry_k1ng »

post the code :-)
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: simple starcraft-esque shields

Post by Tribulex »

its a race


Update: My code is bugged. :(
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: simple starcraft-esque shields

Post by KDR_11k »

Just store a shield strength for every unit, in UnitDamaged add the amount of damage the unit took (or the remaining shield strength) to its current HP if the shot is blocked and subtract it from the shield strength, use whatever recharge logic you want and add an indicator for the units.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: simple starcraft-esque shields

Post by knorke »

where would i put the recharge code?
Is there a callin function something like widget:Update() that gets called every "gametick"?
cant find it in the wiki
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: simple starcraft-esque shields

Post by 1v0ry_k1ng »

an option to add a delay before the shield comes back online when reduced to 0 would be a good addition
Last edited by 1v0ry_k1ng on 03 Dec 2009, 17:26, edited 1 time in total.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: simple starcraft-esque shields

Post by lurker »

GameFrame

My suggestion for finding something like that is skimming through some luas with behaviour you think works the same way, or possibly reading through the callin list.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: simple starcraft-esque shields

Post by knorke »

thanks.
its actually listed on http://springrts.com/wiki/LuaCallinReturn
but this page is not found when searching for "callin" (wtf) so i didnt see it.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: simple starcraft-esque shields

Post by 1v0ry_k1ng »

the lack of LUA shield code in this thread suggests this would make a great engine feature
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: simple starcraft-esque shields

Post by Neddie »

The lack of engine code in this thread suggests this would make an excellent gadget.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: simple starcraft-esque shields

Post by Google_Frog »

It really is ridiculously easy to implement with a gadget.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: simple starcraft-esque shields

Post by 1v0ry_k1ng »

and yet..
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: simple starcraft-esque shields

Post by Argh »

...you're too lazy to look up gadget:UnitPreDamaged, handle the shield behavior there, pass any resulting change in the shield's "energy state" to unsync, and write a simple piece of OpenGL.

It really is a trivial thing to do. I may get to it before I release P.U.R.E. 1.3, I was thinking about personal shields for the Wolfen, IDK yet.
Post Reply

Return to “Feature Requests”