Shakin'

Shakin'

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

Moderator: Moderators

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

Shakin'

Post 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
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

:shock: changing magnitude with distance and everything...that is awesome.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post 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*
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

VLAN works. Media player doesnt. hmmm
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Post by malric »

Nice video. (Don't know what I did but for me mplayer works also)
Lippy
Posts: 327
Joined: 16 Jul 2006, 00:24

Post by Lippy »

Hehe awesome!
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Post by Noruas »

will you release the script publicly?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

yes, it will be a default lua widget (initially disabled).
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Post by Noruas »

how hard would it be to convert a widget to a modlua rule?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

I placed these commands in LuaUI for a reason ;-)
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Media Player never works.
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post 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.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

+noshake
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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.
User avatar
Cabbage
Posts: 1548
Joined: 12 Mar 2006, 22:34

Post 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..
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Yha, I think its good in your video, but could be just a little less shaking to be perfect.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post 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.
Last edited by LOrDo on 17 Jun 2007, 02:42, edited 1 time in total.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Image
Post Reply

Return to “Lua Scripts”