MV window shake

idk if this is the right place to post this in but oh well.

I want a script command that will make the game window shake a bit, or just move it really. Kinda like you see in some spooky creepypasta games, if that's possible.
Well, what version of rpg maker do you use?

(This would probably be best put under "Plugin Requests" or "Script Requests",depending on the version)
Well, what version of rpg maker do you use?

(This would probably be best put under "Plugin Requests" or "Script Requests",depending on the version)
mv
So, there's a default screen shake usable through event commands. I'm told it sucks though, so try the below plugin for an improved version.
So, there's a default screen shake usable through event commands. I'm told it sucks though, so try the below plugin for an improved version.
I don't mean the screen, i mean the game window itself.
I don't mean the screen, i mean the game window itself.
I gotcha. Yeah, that may require a whole plugin made. I can't find much more than screen shaking plugins, though I haven't turned over every single stone.
I do have a plugin for fun, but its the windows, if you mean the
game window entirely, I might have a way for that though.

it would be fun, as you can change position midgame.

I've moved this thread to JS Plugin Requests. Thank you.

Here is a patch for Theo's Shake Screen Plugin. Place this below the ShakeScreen plugin.

Do let me know if you experience any issues and I'll try to address it. Thanks!

Example Plugin Commands:
WindowShake 10 45
ShakeWindow 10 45
WinShake 10 45
ShakeWin 10 45

Example Script Call:
$gameTemp.shake_window(10, 45);

Please credit TheoAllen:
Here is a patch for Theo's Shake Screen Plugin. Place this below the ShakeScreen plugin.

Do let me know if you experience any issues and I'll try to address it. Thanks!

Example Plugin Commands:
WindowShake 10 45
ShakeWindow 10 45
WinShake 10 45
ShakeWin 10 45

Example Script Call:
$gameTemp.shake_window(10, 45);

Please credit TheoAllen:
I wanted a plugin with a script call that shakes the game window, and by that i mean basically the game itself. This is very cool though, i will be definitely be using this for some sections. Thanks!
I wanted a plugin with a script call that shakes the game window,
Not that I've tested it since this isn't something I want for my game, but judging by the included plugin commands it seems to do exactly that. Did you actually try it yet?
Not that I've tested it since this isn't something I want for my game, but judging by the included plugin commands it seems to do exactly that. Did you actually try it yet?
I did try it, it shakes the windows in-game, not the actual game window on the desktop screen
to do that, which wont work for MV 1.6.x from YEP coreEngine,
it update the position to the center (fails, specially with higher nwjs).

so to fix that, you use package.json to set the position instead.

for the game window, you grab the NW.gui instead.

I did something to get something outside this window, so for the game window,
you grab the current gui that your game uses, than shake it position.

I didn't test the one above yet, if it fails for MV 1.6.x or only work for nw.0.29.
than higher version wont work either.

messing around with the gui can be fun, but shake the game window can
annoy many people.

so think carefully, best way if it works, is to set an option to disable this
and use in-game shake screen.
I wanted a plugin with a script call that shakes the game window, and by that i mean basically the game itself. This is very cool though, i will be definitely be using this for some sections. Thanks!
Here you go:

Use $gameTemp.shake_game(10, 45);

This will shake the game screen by 10 pixels (only integers are allowed) for 45 frames.

Plugin commands available as well.

If you need to move the game window (which would probably only work in windowed mode of course), do this in an event with these commands:

s1.png





Do understand that calls to the NWWindow/cWindow are expensive (including DOM, elements, etc.).

Notice in the code, I am setting the x value. You can set the y value instead and/or use a combination of it. This code moves my screen 60 pixels to the right.

Let me know if this works and if you need anything else.

Thanks!

EDIT: Made a small change in the code to allow for the window to at least return to its original location after the shake and to allow the shake to occur in different locations for when the player moves the screen. Should be better now. Please test accordingly.
that looks really cool though, good job 🙂

stand alone can work too, I didn't got mine to work yet, but it
looks cool, so you have still to be careful on this options and
use it smartly.

I do know of a game, that if it works, in a small resolution
(100x200) than try to click on a button.

the game (not in rpg maker), is that if its open, your mouse slide
and hard to control, and once you hit the border or to fast, it jumps
to a new position 😛

but it can be done here too probably if done correctly.
Here you go:

Use $gameTemp.shake_game(10, 45);

This will shake the game screen by 10 pixels (only integers are allowed) for 45 frames.

Plugin commands available as well.

If you need to move the game window (which would probably only work in windowed mode of course), do this in an event with these commands:

View attachment 347360




Do understand that calls to the NWWindow/cWindow are expensive (including DOM, elements, etc.).

Notice in the code, I am setting the x value. You can set the y value instead and/or use a combination of it. This code moves my screen 60 pixels to the right.

Let me know if this works and if you need anything else.

Thanks!

EDIT: Made a small change in the code to allow for the window to at least return to its original location after the shake and to allow the shake to occur in different locations for when the player moves the screen. Should be better now. Please test accordingly.

YES! Thank you, this is EXACTLY what i was looking for!

Original thread: https://forums.rpgmakerweb.com/threads/window-shake.179533/