Page 1 of 3

Shakin'

Posted: 15 Jun 2007, 07:58
by trepan
Made easy with two new LuaUI call-outs, and a LuaUI call-in:

Spring.SetCameraOffset(posx, posy, posz, tiltx, tilty)
Spring.SetExplosionThreshold(power)
Explosion(power, dist, dx, dy, dz) -- call-in

http://trepan.bzflag.bz/spring/shake.avi

Posted: 15 Jun 2007, 08:16
by Peet
:shock: changing magnitude with distance and everything...that is awesome.

Posted: 15 Jun 2007, 09:10
by Guessmyname
Damnit, I lack the 'MEncoder MPEG-4 Video (FMP4)' codec, and because Microsoft are a pain in the arse, they tell me I need it but don't actually know what it is. Apparently, neither does google. *strangles WMP10*

Posted: 15 Jun 2007, 10:30
by AF
VLAN works. Media player doesnt. hmmm

Posted: 15 Jun 2007, 11:35
by malric
Nice video. (Don't know what I did but for me mplayer works also)

Posted: 15 Jun 2007, 14:55
by Lippy
Hehe awesome!

Posted: 15 Jun 2007, 16:33
by Noruas
will you release the script publicly?

Posted: 15 Jun 2007, 16:36
by trepan
yes, it will be a default lua widget (initially disabled).

Posted: 15 Jun 2007, 17:08
by Noruas
how hard would it be to convert a widget to a modlua rule?

Posted: 15 Jun 2007, 17:56
by trepan
I placed these commands in LuaUI for a reason ;-)

Posted: 15 Jun 2007, 18:27
by Neddie
Media Player never works.

Posted: 15 Jun 2007, 19:09
by tombom
Noruas wrote:how hard would it be to convert a widget to a modlua rule?
Forcing everybody's screen to shake would be utterly horrendous.

Posted: 16 Jun 2007, 18:55
by NOiZE
+noshake

Posted: 16 Jun 2007, 19:12
by [KnoX]ElementalGizmo
Could we have a shake intensity bar similar to that of volume widget, higher it goes move extreme the shakes would be.....MADE OF WIN I TELLZ YA!
yes, it will be a default lua widget (initially disabled).
Whats the problem for those of you who dont want the shakes back? Its going to be OPTIONAL.

Posted: 17 Jun 2007, 01:15
by AF
I think the shakes getting less as you zoom away si the onyl real fix here.

In OTA the shakes shook the screen just as much looking at the explosion as being on the other side of the map. Also the shakes where too powerful.

A little tuning and the fade out over distance would fix all that.

At average zoom levels I expect shakes to be as small as a single pixel or less, and at most zoom levels so small they make no visual difference.

However at FPS level zoom theyd be much greater. And this is how it should be.

Posted: 17 Jun 2007, 01:19
by trepan
AF:
Not unlike what is shown in the video.
(Peet also mentionned it quite clearly in the second post).

The power is actually adjusted using 1 / (dist * dist).

The current calls allow for adjusting a distance offset,
culling explosions by area-of-effect, and culling explosions
by power.

Posted: 17 Jun 2007, 02:18
by Cabbage
just DL the k-lite codec pack, ive not come anything i cant play since ive used it. and with it this vid will work in media player fine..

Posted: 17 Jun 2007, 02:32
by AF
Yha, I think its good in your video, but could be just a little less shaking to be perfect.

Posted: 17 Jun 2007, 02:41
by LOrDo
For some reason, I thought this was already possible...but it will definatly give Spring a much needed touch of realism. Great job!

PS: If you ever have a problem playing anything audio/visual, I reccomend VLC. It comes with its own plugins for codecs, so it can run everything without having to install anything else.

Posted: 17 Jun 2007, 02:41
by Caydr
Image