Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: on Tue 19/08/2003 12:33:28

Title: Advanced Shake Screen suggestion
Post by: on Tue 19/08/2003 12:33:28
CJ, I'm looking to see if we can get a more advanced version of the shake screen command.

As far as I'm aware, it is still a blocking function and there is no way of defining how long it lasts.

Therefore, I suggest a shake screen that we can set how much it shakes, how long it shakes for, and is not a blocking command.

For example;
ShakeScreen(1, 4);

Would shake the screen at shake setting 1 (so, a minor shake) for 4 x the current number of cycles. So, the default is 40 cycles to a second, 4 is 4 seconds.

ShakeScreen(1, 0);
Again, setting 1, but 0 would "Loop" it so it can continue on until

StopShakeScreen();
is called.

By not having it blocking, you can continue playing the game during an earthquake for example, or you can run a cut-scene with a shake through it, rather like in FoA.

Just an idea!

:)
m0ds
Title: Re:Advanced Shake Screen suggestion
Post by: Scummbuddy on Tue 19/08/2003 14:36:45
I believe I will need these functions too
Title: Re:Advanced Shake Screen suggestion
Post by: on Tue 19/08/2003 15:04:07
Tearaway Island needs them aswell.

:P
m0ds
Title: Re:Advanced Shake Screen suggestion
Post by: Trapezoid on Tue 19/08/2003 15:25:32
Isn't ShakeScreenBackground non-blocking?

Edit: Why yes it is, in fact it does about everything you needed. RTFM, m0ds  ;D
Title: Re:Advanced Shake Screen suggestion
Post by: on Tue 19/08/2003 16:13:56
I never knew it existed :P And you can specify how long it lasts?

m0ds
Title: Re:Advanced Shake Screen suggestion
Post by: Ishmael on Tue 19/08/2003 19:04:01
Since when has it been there?? Me never knew... :P
Title: Re:Advanced Shake Screen suggestion
Post by: Trapezoid on Tue 19/08/2003 20:36:42
QuoteShakeScreenBackground (int delay, int amount, int length)

Shakes the screen to simulate, for example, an earthquake. The game is not paused while the screen shakes - it will continue in the background.
DELAY specifies the 'shakiness' of the shake - 2 is the lowest you can pass for this, and will create the most shaky screen.

AMOUNT specifies the ferociousness of the shake - ie. how much the screen moves by when it does shake. Here, 1 is a very tiny shake, up to about 30 for a ferocious shake.

LENGTH specifies how long the shake lasts for, in game loops. For example, 80 would be equivalent to 2 seconds at the default game speed.

You can abort any current background shake that is in progress by calling this command with the LENGTH parameter as zero.

Example:

ShakeScreenBackground (4, 10, 80);

will shake the screen a little for 2 seconds.

There ya go.
Title: Re:Advanced Shake Screen suggestion
Post by: Pumaman on Wed 20/08/2003 20:42:15
Well m0ds, looks like it's about time you upgraded from AGS 2.31  :P
Title: Re:Advanced Shake Screen suggestion
Post by: on Thu 21/08/2003 13:32:12
I'm using 2.55 thank you very onion ring much!

:P
Title: Re:Advanced Shake Screen suggestion
Post by: SSH on Thu 21/08/2003 15:26:23
If you're using 2.55 then you should have read the manual, you n00b!  ;D

So, anyway, when is CJ going to add a Windows version of the editor?

D'oh!
Title: Re:Advanced Shake Screen suggestion
Post by: TerranRich on Thu 21/08/2003 15:34:33
On a similar note, I could use 800x600 resolution for my gaem!!11 Please implement it now, Punaman! :P
Title: Re:Advanced Shake Screen suggestion
Post by: Pumaman on Thu 21/08/2003 18:50:50
Look, I've got to implement OGG music support first!
Title: Re:Advanced Shake Screen suggestion
Post by: Spyros on Thu 21/08/2003 21:49:51
I think I found a bug in the latest version.
The make my game button didn't make me any game at all!!!!
Title: Re:Advanced Shake Screen suggestion
Post by: Minimi on Thu 21/08/2003 21:55:09
yes, and when I run AGS in XP it looks very weird. All buttons are blown up, and the taskbar is blue!?? :S Is that a virus or bug??? :P
Title: Re:Advanced Shake Screen suggestion
Post by: Captain Mostly on Thu 21/08/2003 22:52:16
wow! a shake screen command! I never knew there was one of these at all! Let alone a fancy one that I'm not going to use!

I wonder what event I should tie to a screen shake in vegetable patch extreem turbo...
Title: Re:Advanced Shake Screen suggestion
Post by: Snake on Fri 22/08/2003 01:42:31
Spyros, you goof  ;)

Heh, I never knew the other one existed either...I guess the help file is getting too large for my lazy ass also :)

WHAT ABOUT SETPREVCURSOR();!!!@@@22?

:P
--Snake
Title: Re:Advanced Shake Screen suggestion
Post by: Ishmael on Fri 22/08/2003 05:11:52
I have made SetPrevCursor(); command myself to my game... not hard...

int prevcurint;

function SetPrevCursor() {
 if (GetCursorMode()==0) {
   if (Character[GetPlayerCharacter()].activeinv > 0) {
     SetCursorMode(4);
   } else {
     SetCursorMode(3);
   }
 } else {
   prevcurint=GetCursorMode();
   prevcurint--;
   SetCursorMode(prevcurint);
 }
}

;D
Title: Re:Advanced Shake Screen suggestion
Post by: Gilbert on Fri 22/08/2003 06:15:22
Pumaman, when will you implement the highly awaited hicolour support ?

;D

Hehe while this is funny, but to set a good example to N00bs, I think it's time to lock this thread. Ya know, if we "oldies" can continue posting such pointless things (I mean posting a lot, not just once or twice), why can't the others?

Moreover, this is the Technical Forum. ;)