ToggleLOS 0.6

ToggleLOS 0.6

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

Moderator: Moderators

Post Reply
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

ToggleLOS 0.6

Post by very_bad_soldier »

A small widgy that enables LOS view and disables radar view at game start. Basically the same as pressing 'L' and ';' manually.

Nothing more than this:

Code: Select all

function widget:GameStart()
	Spring.SendCommands("togglelos")
	Spring.SendCommands("toggleradarandjammer")
end
Image

v0.6
===
-Toggles view when game actually starts

Download via SpringDownloader or at http://widgets.springrts.de/index.php#175
Last edited by very_bad_soldier on 18 Jul 2010, 23:39, edited 1 time in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14671
Joined: 17 Nov 2005, 02:43

Re: ToggleLOS 0.5

Post by Forboding Angel »

I really like this, but doesn't L and ; view cause a massive decrease in fps?
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: ToggleLOS 0.5

Post by very_bad_soldier »

Actually it raised my fps since I usually have shadows enabled which do not work in L-View 8)

A small test gave me (with 100 fighters or something):
no shadows/no-L: 90fps
no shadows/L: 80fps
shadows/no-L: 60fps

So, yeah, it does cost frames, but not that badly I think.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14671
Joined: 17 Nov 2005, 02:43

Re: ToggleLOS 0.6

Post by Forboding Angel »

No shadows :-(
User avatar
Hobo Joe
Posts: 1001
Joined: 02 Jan 2008, 21:55

Re: ToggleLOS 0.5

Post by Hobo Joe »

Forboding Angel wrote:I really like this, but doesn't L and ; view cause a massive decrease in fps?

Depends on the size of the map. It won't make much difference in a map like altair but in something big like throne or dworld it'll drop you 50% or more.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: ToggleLOS 0.6

Post by CarRepairer »

BrainDamage did it (but didn't make an easy way to find it so I don't blame you for reinventing the wheel).

http://springrts.com/phpbb/viewtopic.ph ... 74#p384874
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: ToggleLOS 0.6

Post by very_bad_soldier »

CarRepairer wrote:BrainDamage did it (but didn't make an easy way to find it so I don't blame you for reinventing the wheel).
Well there it is, I could have sworn I had seen something similar. But no problem, mine was twice as much work cause it sends not only one but two commands (disabling radar view)!!!1

I also would love to see the L-View improved, give your opinion here http://springrts.com/phpbb/viewtopic.php?f=21&t=23366 to let the engine devs know you would appreciate some improvements/fixes.

@HoboJoe:
Tested on Dworld:
without-L: 70fps
with-L: 55fps

So still ok. Might still depend on other things also, dunno...

@BrainDamage or others how might know:
Is it better to send the commands in Update() after 5 frames compared to sending it in GameStart()?
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: ToggleLOS 0.6

Post by yanom »

wow, that's usefull! It should be enabled by default for Newbies like me.
Post Reply

Return to “Lua Scripts”

cron