FeatureRequest: Spring.SetUnitShadowOnly
Moderator: Moderators
FeatureRequest: Spring.SetUnitShadowOnly
Feature Request: Spring.SetUnitShadowOnly(unitid, bool true/false)
Basically sets a unit invisible, but for its shadow- which still can slowly wander across the battlefield, drowning the world in fear of -the deathstar.
Basically sets a unit invisible, but for its shadow- which still can slowly wander across the battlefield, drowning the world in fear of -the deathstar.
Re: FeatureRequest: Spring.SetUnitShadowOnly
Why not incorporate this in Spring.SetUnitCloak() instead, an optional parameter whether it casts shadow or not.
Hint: Vampires™ cast no shadow.
Hint: Vampires™ cast no shadow.
Re: FeatureRequest: Spring.SetUnitShadowOnly
Do you even into rtfm
There you go, some units are only shadows, and units which are vampires, don't drop shadows.
Also units which are shadows and vampires at the same time, are completely not rendered.
So....For the following calls drawMode can be one of the following, notDrawing = 0, normalDraw = 1, shadowDraw = 2, reflectionDraw = 3, refractionDraw = 4.
addon.DrawUnit(unitID, drawMode)
return: bool suppressEngineDraw
For custom rendering of units, enabled here.
Code: Select all
function gadget:DrawUnit(unitID, drawMode)
if (isOnlyShadow(unitID) and not drawMode == 2) then return true end
if (isVampire(unitID) and drawMode == 2) then return true end
end
Also units which are shadows and vampires at the same time, are completely not rendered.
Re: FeatureRequest: Spring.SetUnitShadowOnly
Why to even use engine? Fucking Linux Kernel and all drivers needed are here
https://github.com/torvalds/linux
If you can modify everything easily (by Anarchid standards) doesent mean the rest of the world get its.
So why use spring engine, you could code spring games in assembler, with open gl- fuck the API- if you truelly want to stick it to the man, why be here anyway?
The simple answer is- that call is going to be there in the wikki- that codesnippet is going to be burried under a ton of picasso posts, and never to be seen again.
The reason why there are apis, is to shield away knowledge - a concept called abstraction.. you propably never heard of it.
:)
https://github.com/torvalds/linux
If you can modify everything easily (by Anarchid standards) doesent mean the rest of the world get its.
So why use spring engine, you could code spring games in assembler, with open gl- fuck the API- if you truelly want to stick it to the man, why be here anyway?
The simple answer is- that call is going to be there in the wikki- that codesnippet is going to be burried under a ton of picasso posts, and never to be seen again.
The reason why there are apis, is to shield away knowledge - a concept called abstraction.. you propably never heard of it.
:)
Re: FeatureRequest: Spring.SetUnitShadowOnly
And i there thought that addon:DrawUnit was part of a documented API.
Apparently though it's as brutal as assembler, huh.
Apparently though it's as brutal as assembler, huh.
Re: FeatureRequest: Spring.SetUnitShadowOnly
Because that is something basic. Making stuff binary visible and invisible is so basic, it was in OTA as cloak. But to modify cloakyness means modifying gamemechanics, while all you might want, is hide it from plain sight of the player. Which transports you into advance coding country, where you have to hang around with the opengl/glsl guys who can not even comprehend why this might be difficult stuff. And on how many levels a newb might botch this.
Fuck this, i shall write a patch.
Fuck this, i shall write a patch.
Re: FeatureRequest: Spring.SetUnitShadowOnly
Opengl to draw unit shall be avoided (gl.Unit and gl.UnitShape etc). See Ghostradar and Ghostsite for example why this is very expensive.
Re: FeatureRequest: Spring.SetUnitShadowOnly
that's nice, and the alternative you want to suggest?
Re: FeatureRequest: Spring.SetUnitShadowOnly
You can pretty much assume that no such changes will happen if that functionality can be achieved by other means.
It kinda looks hacky (seeing as it doesn't function as a property of the unit, e.g. you couldn't do a GetUnitShadowOnly()), but it allows you to do unsynced rendering which is nice.
It kinda looks hacky (seeing as it doesn't function as a property of the unit, e.g. you couldn't do a GetUnitShadowOnly()), but it allows you to do unsynced rendering which is nice.
That's not what Anarchid's code is doing.Jools wrote:Opengl to draw unit shall be avoided (gl.Unit and gl.UnitShape etc)
Re: FeatureRequest: Spring.SetUnitShadowOnly
So, is your engine modification done yet?
Look what we have now!
Spring.SetUnitShadowOnly
Spring.SetUnitVampire
Code: Select all
shadowUnits = {};
vampireUnits = {};
function isOnlyShadow(unitID)
return tobool(shadowUnits[unitID]));
end
function isVampire(unitID)
return tobool(vampireUnits[unitID]);
end
function setUnitVampire(unitD, value)
vampireUnits[unitID] = tobool(value);
end
function setUnitShadowOnly(unitD, value)
shadowUnits[unitID] = tobool(value);
end
Spring.SetUnitShadowOnly = setUnitShadowOnly;
Spring.SetUnitVampire = setUnitVampire;
Spring.SetUnitShadowOnly
Spring.SetUnitVampire
Re: FeatureRequest: Spring.SetUnitShadowOnly
You might want to remove from the lists units which are destroyed.
Re: FeatureRequest: Spring.SetUnitShadowOnly
We are very interested in your solutions.Anarchid wrote:Spring.SetUnitShadowOnly
Spring.SetUnitVampire
Our team wants to know how it will work with the Save/Load mechanism proposed by Mister Google Frog.
Thank you for your time,
Gajo

Re: FeatureRequest: Spring.SetUnitShadowOnly
The Warden of the Wikki rejects your lua stuff- as mod dependent, and thus something the noobs, shall go questing for, begging and battling until they find it, hidden away in a dungeon.
Thus spoke the Warden of the Wikki
Seriously, though, we should errect higher class barriers- there are getting a awfull lot of noobs in lately.
Thus spoke the Warden of the Wikki
Seriously, though, we should errect higher class barriers- there are getting a awfull lot of noobs in lately.
Re: FeatureRequest: Spring.SetUnitShadowOnly
I still want to see jools alternatives to those 2 calls so I can learn more.