Author Topic: Screen Shake (TECTONIC QUAKE)  (Read 7178 times)

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Screen Shake (TECTONIC QUAKE)
« 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)

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Screen Shake (TECTONIC QUAKE)
« Reply #1 on: 2008-01-26, 05:04:32 AM »
lol, i thought of how to make screen shakes just yesterday. but for sdgk2.  :P

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Screen Shake (TECTONIC QUAKE)
« Reply #2 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)

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Screen Shake (TECTONIC QUAKE)
« Reply #3 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.

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Screen Shake (TECTONIC QUAKE)
« Reply #4 on: 2008-01-26, 02:05:55 PM »
Thanks man.

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Screen Shake (TECTONIC QUAKE)
« Reply #5 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.

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Screen Shake (TECTONIC QUAKE)
« Reply #6 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)

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Screen Shake (TECTONIC QUAKE)
« Reply #7 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.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2745
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Screen Shake (TECTONIC QUAKE)
« Reply #8 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.

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Screen Shake (TECTONIC QUAKE)
« Reply #9 on: 2008-01-28, 07:42:21 AM »
cool makes sense.

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Screen Shake (TECTONIC QUAKE)
« Reply #10 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.