Jump to content


Photo

Avoid glitchy room transition


  • Please log in to reply
13 replies to this topic

#1 SenJe0

SenJe0

    GMC Member

  • GMC Member
  • 733 posts

Posted 03 March 2012 - 12:41 PM

Hi,
I have this ugly bug I tried to correct but cant. I have two game levels. One room size (due to the unique style of the program) is very small. The next room is very big. That is the difference in room size between the two is very big. This makes transition between the rooms very glitchy. Like, the image of the small room stretches to the size of the big room before there is the transition. This creates a very ugly image during transition. Anyone ver experience this or I'm alone? How to correct it?
  • 0

#2 Noele

Noele

    GMC Mentor

  • GMC Member
  • 2915 posts
  • Version:GM:Studio

Posted 03 March 2012 - 12:54 PM

Room transitions generally only work well when the view sizes are the same.

Please note that transitions do not work when using 3d graphics. Also, room transitions in general do not work correctly when the sizes of the rooms (or to be more precise of the region on the screen) are not the same.



Transition effects work thus:
A screen shot is taken of the current room and the one to go to. The effect is then applied over the number of transition steps required. Thus if your views are not the same size you are likely to get distortions.

The solution is to keep sizes the same or not use transitions.
  • 0

#3 SenJe0

SenJe0

    GMC Member

  • GMC Member
  • 733 posts

Posted 03 March 2012 - 01:16 PM

Room transitions generally only work well when the view sizes are the same.

Please note that transitions do not work when using 3d graphics. Also, room transitions in general do not work correctly when the sizes of the rooms (or to be more precise of the region on the screen) are not the same.



Transition effects work thus:
A screen shot is taken of the current room and the one to go to. The effect is then applied over the number of transition steps required. Thus if your views are not the same size you are likely to get distortions.

The solution is to keep sizes the same or not use transitions.

There are no transition effects, just different room sizes, ain't there nothing to do about it?
  • 0

#4 faissialoo

faissialoo

    I get high on orange

  • GMC Member
  • 1115 posts
  • Version:GM8

Posted 03 March 2012 - 02:57 PM

get your bg room to slowly scale it self before the transition
  • 0

#5 SenJe0

SenJe0

    GMC Member

  • GMC Member
  • 733 posts

Posted 03 March 2012 - 03:06 PM

get your bg room to slowly scale it self before the transition

The problem is from small room to big room not the otherway round
  • 0

#6 Iwitrag

Iwitrag

    GMC Member

  • GMC Member
  • 25 posts

Posted 03 March 2012 - 03:24 PM

Why don't you just make third room between first small and second big room?
This between-room will be large like big room and it will work like this:
First you are in small room, then you go to between-room (no transition) and than
you go to big room (transition will work, because size of room will be equal)...
  • 0

#7 SenJe0

SenJe0

    GMC Member

  • GMC Member
  • 733 posts

Posted 03 March 2012 - 08:32 PM

Yay...did it. Used the window_set_visible function. The glitch shows for like 2secs before disappearing, so I made the window invisible during the glitch time and then made it visible after the glitch is gone. Thanks all....
  • 0

#8 TheouAegis

TheouAegis

    GMC Member

  • GMC Member
  • 9229 posts
  • Version:GM8

Posted 03 March 2012 - 08:36 PM

You don't need to go through all that hassle. Just go through even more hassle and make a custom room transition. Download Torigara's Custom Transitions Tutorial and open Tutorial #3. It tells you how to do room transitions between a small room and a large room (and vice-versa).
  • 0

#9 SenJe0

SenJe0

    GMC Member

  • GMC Member
  • 733 posts

Posted 03 March 2012 - 09:20 PM

You don't need to go through all that hassle. Just go through even more hassle and make a custom room transition. Download Torigara's Custom Transitions Tutorial and open Tutorial #3. It tells you how to do room transitions between a small room and a large room (and vice-versa).

Can't find the link, can u giv it to me?Nevamind...found it, but didn't find what u wer talking abt...but cant find wat u wer sayn

Edited by SenJe0, 03 March 2012 - 09:41 PM.

  • 0

#10 Noele

Noele

    GMC Mentor

  • GMC Member
  • 2915 posts
  • Version:GM:Studio

Posted 03 March 2012 - 10:27 PM

There are no transition effects, just different room sizes, ain't there nothing to do about it?

In that case you will need to handle the window adapting yourself.
Games run in a window the area of which can be segmented into views. Views in a room do not have to match their view ports (positions in the game window). Game Maker automatically adapts these for you (rescaling as required) to the visible views at each room start.

Scaling up degrades the quality as pixels are stretched to fit the window or full screen area. There is nothing you can do about this as ultimately it is down to whatever graphics chipsets and processors the end user has.

High end and gamers cards can often handle this. Most graphics cards can scale up with ease but scaling down often requires the CPU to "lend a hand". If it is busy doing what the graphics processor can't then the frame rate is likely to drop (resulting in lag.)

If you have rooms of different sizes you can enable views in those rooms to set the actual game window area the same for all rooms and have rooms larger than the window area follow an object. That way you will avoid graphic distortions - you could also use room transition effects if you wanted.

If you really need different room sizes then look into using views - I feel sure they will go a long way to solve your problem.
  • 0

#11 TheouAegis

TheouAegis

    GMC Member

  • GMC Member
  • 9229 posts
  • Version:GM8

Posted 03 March 2012 - 10:29 PM

I just realized, if everything's getting stretched/shrunk, you're not using views. You MUST use views if rooms are different sizes. There's no way around it.

Now, once you have your views set up (making sure they're the same in each room), if you still have issues with the transition, let me know. And let me know what kind of transition you are using, if any.
  • 0

#12 SenJe0

SenJe0

    GMC Member

  • GMC Member
  • 733 posts

Posted 04 March 2012 - 12:44 PM

I just realized, if everything's getting stretched/shrunk, you're not using views. You MUST use views if rooms are different sizes. There's no way around it.

Now, once you have your views set up (making sure they're the same in each room), if you still have issues with the transition, let me know. And let me know what kind of transition you are using, if any.

To cut a long story short, my solution works for me, and I'm fine. I tried yours, but didn't work, so gues I'll stick to mine since its perfect...thanks all....
  • 0

#13 TheouAegis

TheouAegis

    GMC Member

  • GMC Member
  • 9229 posts
  • Version:GM8

Posted 04 March 2012 - 04:30 PM

Does it create a blackout effect or something? I never used that command.

But it's not really a working solution because you just cleared out your game and nullified the transition for a split second. View gives you full control over the game, more than hiding the window would do.
  • 1

#14 SenJe0

SenJe0

    GMC Member

  • GMC Member
  • 733 posts

Posted 06 March 2012 - 02:28 PM

Does it create a blackout effect or something? I never used that command.

But it's not really a working solution because you just cleared out your game and nullified the transition for a split second. View gives you full control over the game, more than hiding the window would do.

Yep! I agree, but both work...
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users