Icon

Room switch - Seamless rooms

The-any-Key

Contact Publisher | Support

Description

Sales: 31

Short desc:

  • Sometimes you want a giant world or room. But you would like to split it up into small pieces and travel between them without notice the room change. Also works in GMS2 if you create it in GM1.4 and import it to GMS2.

Video:

  • Check the video to get a step by step.

Dependencies:

  • You can find a exCamera.gmez in the included files folder that you need to add as an extension.
  • You only need to import the obj_ex_camera

This extension:

  • This code module let you travel from one room to the next without notice the room change (GM will cause a little load next room delay):
  • The view is always in center (well you can offset it) of the player except on the edges of your big room where the view is limited like an ordinary room.
  • You can add special objects on the edges that show in all rooms, to hide edges.
  • If you want to have dynamic stuff near the edges you can set it to zoom in when travel from room to room, this will hide the other room a little.
  • Add special move coordinates that is recalculated for you.
  • All in GML

Getting started video:

https://www.youtube.com/watch?v=qXWCPZm5bNQ&feature=youtu.be

Code example:

  • You only need to create a 2d array of the rooms you want and call a script.

Player object - Create event:

MyBigRoom[0,0]=room_left;
MyBigRoom[0,1]=room_right;
scr_room_switch_CREATE(MyBigRoom,false);

Edge objects:

  • Just set it to persistent and set the parent to "obj_room_switch_on_edge_parent". Add the object in the player object room.

Moveable edge objects:

  • If you use a move to click position object you only need to add x,y array variables. Call init script and add a script before you move.

Create event:

ClickedX[0]=0;
ClickedY[0]=0;
scr_room_switch_RECALC_INIT();

Step event:

scr_room_switch_RECALC_POS_VARIABLE(ClickedX,ClickedY);
// Ex Move script
if x>ClickedX[0] x-=5;
if x<ClickedX[0] x+=5;

Teleport:

You can also teleport to another room with just one script:

scr_room_switch_TELEPORT(room, x, y)

More info

End User Licence Agreement (EULA).

Age Rating: 4+

Version

GMS1 - Version 2.3.6. Published August 22, 2017

2.3.6 Fixed bug in deactivater. 2.3.5 Got permission from @alexandervrs to Include old exCamera.gmez 1.0.4 in included files folder. He's awesome :-) 2.3.4 Added multiplayer offset calc: When you try use room switch for multiplayer you...

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait

Back to Top