MODULE: SlideRoom v0.52

Started by strazer, Sat 07/05/2005 13:43:01

Previous topic - Next topic

strazer

Quote from: strazer on Fri 06/05/2005 16:34:56
Quote from: Maestro on Fri 06/05/2005 14:56:04
I wan't to make two rooms and save them under names room1 and room2.
If the player leaves the room1 via door or simply walking to the edge of the screen, he goes to room2. Now, in the editor you can make that transition crossfade, block out etc. I'm wondering can I make AGS do that transition by making the room2 background scroll in to room1 background so it looks like the viewport moved to the next room.
I've just now started working on a script module for that. With the new DynamicSprite.CreateFromScreenShot it's doable without dummy rooms.
My prototype looks promising, just a few minor things to fix. Watch this space.

Okay, so here's an early version:

Go to menu "Script" -> "Module manager..." and import the file "SlideRoom_052.scm".
Now you can use SlideRoom.ChangeRoom instead of player.ChangeRoom or NewRoom/Ex.

Known problems:
- Characters and objects using flipped view frames will be drawn the wrong way
- Characters and objects that happen to be on the edge of the old screen and are only half-seen appear to be cut off during sliding
- Any repeatedly_execute_always's will run during sliding unless they're not explicitly prevented from running if game is paused: if (IsGamePaused()) return;

With AGS v2.71 I should be able to fix some of these, new version underway...

Download v0.52 (Requires AGS v2.71!)
(Script module only)

Rui 'Trovatore' Pires

As regards the 1st one, you can instead have a folder in your sprite manager with the background images, and instead of DynamicSprite.CreateFromScreenShot you can go DynamicSprite.CreateFromSprite, or whatever the name is.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Gilbert

Quote from: Rui "Brisby" Pires on Mon 13/06/2005 08:56:20
As regards the 1st one, you can instead have a folder in your sprite manager with the background images, and instead of DynamicSprite.CreateFromScreenShot you can go DynamicSprite.CreateFromSprite, or whatever the name is.
Not really that practical, as:
1. It wastes storage memory so it's not worth doing that (one or two rooms is okay, but not for the whole game's rooms)
2. Unless it's okay to have the on-screen objects, characters, etc. disappeared while scrolling, otherwise it would be headache to script if you still want them without using CreateFromScreenShot() (well according to current features of AGS of course).

I can confirm about Strazer's problem because without knowing he's doing the same thing already I actually mucked up a similar test (arrow keys or walk to edges to scroll).
Well, by similar I think the techniques used were the same, but mine was a much less polished test which is not even a module (I never checked Stazer's work on it actually).
I think that screen flash cannot be fixed easily in current status.

strazer

#3
With AGS v2.71's new DynamicSprite.CreateFromBackground function I managed to fix the flickering bug, but since the whole scene has to be recreated, a few issues remain. But I'm working on it...

Anyway, version 0.52 now up.

monkey0506


strazer

monkey_05_06 has adopted the module and released a new version. Please see the new thread.

SMF spam blocked by CleanTalk