Jump to content


Photo

Any way to change room transition speed?


  • This topic is locked This topic is locked
2 replies to this topic

#1 TheouAegis

TheouAegis

    GMC Member

  • GMC Member
  • 5208 posts
  • Version:GM8

Posted 07 February 2012 - 08:24 AM

Much to my chagrin, after writing a room transition script that should have been flawless (except for maybe 1 step being misdrawn), I discovered that room transitions are executed at 30fps, even if both the previous room and the next room run at 60fps.

Does anyone know of a way to change this? Even if it means mucking around with a hex editor, I would really like to be able to set the room transition speed to 60fps so my room transition script can run the way it's meant to. Halving transition_steps makes the transition finish in the right amount of time, but the movement is less fluid. I want my transition to finish in the right amount of time with the fluid motion that I programmed into it.

Thanks if you can help.
  • 0

#2 Yal

Yal

    Gun Princess

  • Global Moderators
  • 5865 posts
  • Version:GM8.1

Posted 07 February 2012 - 08:35 AM

Yup, set the variable transition_steps to something less than 80 (the default) to speed up all further room transitions.


EDIT: Damn, you're not a noob I could get cheap reputation from by helping.

I'm fairly sure Game Maker uses a set time for its transitions, so if you want more frames per transition step, you can't use the built-in function.

Idea:
- Take a surface screenshot of the current room
- Turn OFF automatic drawing with set_automatic_draw()
- Go to the next room
- Take a surface screenshot of the new room
- Run your transition script (and update the screen manually!) 60 times and sleep() 1/60 second between each time.
- Turn on automatic drawing again
- Free the two surfaces

Edited by Yal, 07 February 2012 - 08:39 AM.

  • 1

#3 Tennx

Tennx

    The Entrepreneur

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

Posted 23 February 2012 - 03:30 AM

Actually Yal, I was searching for this problem and you gave me the correct answer:

transition_step = 80


But I have a correction: The larger value has transition_step, the longer is the transition. I managed to get a nice effect turning the transition_step to 300.
I leave the rest to the transition's behavior.

Edited by Tennx, 23 February 2012 - 03:32 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users