Scrolling Game Development Kit Forum

SGDK Version 1 => Script => Topic started by: v6v on 2008-01-25, 10:35:00 PM

Title: Screen Shake (TECTONIC QUAKE)
Post by: v6v on 2008-01-25, 10:35:00 PM
Does any one know how to create a screen shaking script that only applies on one map and only activated with a function? Please keep it simple- stepbystep. Please don't be taciturn- any far fetched script are accepted. (Anyone expertive with the quandary of VB)
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: Tanja on 2008-01-26, 05:04:32 AM
lol, i thought of how to make screen shakes just yesterday. but for sdgk2.  :P
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: v6v on 2008-01-26, 11:50:03 AM
Well, SGDK 2... Can you tell me how to use the screen shake in that too? (Flexible with the weather effects- like the screen shaking when the thunder blows)
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: Tanja on 2008-01-26, 12:03:54 PM
the thought came only into my mind.... i wouldn't know how to do that... sorry. there are real proggers needed.
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: v6v on 2008-01-26, 02:05:55 PM
Thanks man.
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: v6v on 2008-01-27, 03:56:00 PM
Never mind actually, I've tweeked SGDK to shake the screen on a certain special function without scripting.
(EVEN AS IMPOSSIBLE AS IT SOUNDS)
lol sorry for wasting a topic.
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: Jam0864 on 2008-01-27, 10:35:51 PM
i was actually thinking about doing something like this in SGDK2, although, my idea was to change the scroll margins rapidly, I can't even remember if there is a rule for that... Anyone have any ideas as to how you could do it? (preferably without script, but if it has to be script it wouldn't matter too much)
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: Tanja on 2008-01-28, 05:42:03 AM
i had this accidently a few times (too big scroll margins), but i wouldn't want to use it for earthquakes. it looks horrible and like that, what it is: an error.
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: bluemonkmn on 2008-01-28, 06:16:31 AM
It seems like the straightforward solution is to rapidly move some sprite back and forth just outside the scroll margins.  In 1.x, this has to (at least temporarily) be the player sprite since that's the sprite that controls the scrolling.  In SGDK2, it can be any sprite with a "ScrollSpriteIntoView" rule.
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: Jam0864 on 2008-01-28, 07:42:21 AM
cool makes sense.
Title: Re: Screen Shake (TECTONIC QUAKE)
Post by: v6v on 2008-01-28, 11:27:09 PM
I used a 205x205 scroll margin- (so it would affect only sprites larger than 32x32) You already know that I can tweek 1.x to switch from sprites to sprites and back for a set time period without scripting, so I made a series of functons that would switch the player to a 128x128 sprite ( which would violently shake the screen) when a sprite activated an exploding collision. Then the sprite would switch back at the end of a certain time(lack of inv).


JUST PUTTING THAT OUT THERE FOR 1.x USERS...   

Quote
but i wouldn't want to use it for earthquakes. it looks horrible and like that, what it is: an error.

If you do it right though, it will look realistic.