Room transitions: feature request

Started by Radiant, Sat 11/09/2004 10:44:53

Previous topic - Next topic

Radiant

Hi there,

it would be cool if there was something like TRANSITION_SCROLL_LEFT, which would cause the current room to scroll away to the left, and the new one to scroll in from the right. For instance Space Quest 4 uses that in the sewer system, among others, and QfG1 when you climb up Erasmus's mountain.
(similarly, SCROLL_RIGHT, _DOWN and _UP)

Alynn

That could be nice... kinda the way it works in Zelda (the old top down versions) could make for some very interesting transitions... However this is problems I see with it

if the rooms are different sizes how will you tell AGS to scroll the next room in at at what point

IE walking up stairs to a long hallway where the stairs are all the way to the left... so you scroll up, but would AGS scroll it to the middle, or scroll it to where the character comes in at... so it would take more than just adding the transitions... how those transitions work with the room sizes are something CJ would have to think about...

could be difficult to implement

Phemar


It could just scroll until the viewport is centred around the character.

I was thinking about this the other day, after finally lcocking Larry 6, and the ways to do I came up with is to use SetViewPortx/y to change it.

Pumaman

Yeah, this has been requested before. It's relatively difficult to implement which is why I haven't done it yet, but it's on my list.

Edwin Xie

I think he meant transitions and not looping rooms or something of that kind.
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

Kinoko

I was about to post the way I thought but even as I typed it, I realised more problems. This really is a complicated request, but perhaps it could work like this.

You can only use this transition with rooms the exact same size so the engine can automatically use the same x or y coordinates (depending on up/down or left/right scrolling) of the previous room. That's the way it would work in a Zelda style game anyway, as rooms are more like particular squares on a grid.

Another style would be, the way I'm guessing you originally meant with SQ, only left/right scrolling. In this case, only the height of the backgrounds would need to be the same.

The much more complicated but much more customisable way would be to be able to specify whether you want the room to "scroll" to the character, or to specified coordinates. I must admit, scrolling dependant on where the character is seems very complicated to me because unless there's a walk behind behind rooms, you would need to show the character moving between the rooms (otherwise, it'd look odd with him just appearing in the room a few steps away). In that case, I think it'd be better to have one large background with the screen set to specific coordinates until you moved to a region on the edge of particular areas.

I hope that wasn't all nonsense...

Radiant

Well, if the from-room and the to-room have different X/Y sizes, you could use the same relative position. E.g. if room #1 is 500 pixels wide and you've scrolled 50 pixels to the right, and you're going to room #2 which is 400 pixels wide, the screen would appear scrolled 40 pixels to the right by proportion.
Or maybe it should only work for non-scrolling rooms, if that's easier.

Darth Mandarb

I'm am using this very method in a 'yet unannounced' project.

juncmodule wrote up the code and it's bloody brilliant!

I wanted to try it out (like Zelda) and had a method that I was using, but junc took it to the next level.

It uses the viewport options through scripting.

It's built into custom functions that you call in each room depending on which way you're able to walk off the screen.Ã,  So, if you can walk off the left side of the screen you call the function 'scroll_west' when the room loads.

You have to include the next background to the 'west' in that screens background (well, all the directions you can walk) so you can have backgrounds that are + shaped.Ã,  But it works great!

Dorcan

#8
I wrote some time ago a little room transition script for our game, which makes the actual room sliding away.
It's not finished and badly scripted, but I thought I could share it, in case someone would find it useful.

Transition source

Transition test game
(the GUI middle button is still experimental...)

+

Scorpiorus

It's a very nice example Dorcan. :)

A QFG-like transition can be easily done using the same method, you just need to add another moving overlay that represents the background in a new room.

The only issue is that SaveScreenShot grabs the entire screen including GUIs. For some games (with partly transparent GUIs, for example) it's maybe not desirable but for others it would work very well.

Also, I believe the transition process can be automated by allocating the related code in on_event and repeatedly_execute(_always).

SMF spam blocked by CleanTalk