[Custom Action] Section Scrolling

A system that divides the screen and smoothly scrolls as you move to the edges.
It seems applicable to everything from top-down action RPGs to side-scrolling Metroidvanias.

Here is the release of the <> plugin.
■Contents
The following features are added to the execution actions:
<>
CA_RoomScrollAction.gd Main body
CA_RoomLayout.gd Node to draw room layout assignments in the scene
CA_RoomBigRoomConfig.gd Settings for a single large room
CA_RoomAreaConfig.gd Settings for a single area
CA_RoomAreaConfig.gd (2.8 KB)
CA_RoomBigRoomConfig.gd (2.2 KB)
CA_RoomLayout.gd (35.3 KB)
CA_RoomScrollAction.gd (86.6 KB)

Bonus plugin to cast shadows under characters’ feet


image
CA_ShadowCastAction.gd (75.5 KB)

※Installation Method
Open the above *.gd files with Action Game Tsukuru G2.0 (version 1.3.x or higher) and drag and drop them into Materials Management → Scripts.

After installation, the features will be added to the execution actions.

When removing, it is safer to first remove the functions used from the actions, and then delete the plugin. We strongly recommend backing up your project before installation.

The sample project is available for free on Itch.io.
CA_Screen Swipe by GotchaGotchaGames

■Content Description

What does this plugin do?
Imagine the entire map as a grid of squares, each the same size as the screen, packed tightly up, down, left, and right.
Each of these squares is a “room.”
The moment the player crosses the boundary between rooms, the game pauses, and the entire screen scrolls to the adjacent room. Once the scrolling is complete, the game resumes.

You can also create large rooms.
You can specify that “this 2x2 tile area should be treated as one large room.” Inside large rooms, no scrolling occurs; instead, the camera follows the player. Scrolling only happens when you reach the edge of the room.

1.1 Place one management object
(1) Create a new object (no visual appearance or collision detection needed)
(2) Give it an easy-to-understand name, e.g., Room Manager
(3) Place only one in the game scene
(4) In the “Execution Action” of that state,
add “Camera / Camera” tab → “Room Scroll / Room Scroll”

※You can also bring in the “Room Manager.tscn” distributed on itch.io.

1.2 Tell the camera what to follow

1.3 Automatically create the Room Layout node in the scene

(1) Open the map (game scene) and place the Room Manager object.
(2) In the “Room Scroll” action,
check “Create Room Layout” under “Room Layout”.


(3) A RoomLayout object is created in the map and selected automatically.

(4) Save the scene.

The setup preparation is now complete.

2.1 Match the size
Check the RoomLayout inspector (details on the right) and input the actual screen size displayed in the room size field.

This enables scrolling at the screen edges.
The map is automatically divided into sections within the scene, shown by blue outlines.


Adjust the starting point of the divisions by <> the RoomLayout node.

※For fine adjustments of movement,
Snap settings


Set the grid step and interval to finer values.

2.2 Support for screen size changes via UI, etc.
Check the RoomLayout inspector (details on the right)
and input the coordinates for the top-left and bottom-left margins.


3.1 Create large rooms
You can create rooms larger than the screen, such as boss rooms or grand halls.

3.2 Check tile coordinates
Coordinates are displayed on each room tile in the scene, so take note of them.

3.3 Register them
Check the inspector for RoomLayout in the scene
and fill in the fields that appear.
X: Coordinate X
Y: Coordinate Y indicates the location of the starting room.

Z: Width
W: Height determines the size of the large room.

3.3 Confirm
In large rooms, camera scrolling occurs, and the character is followed.

4.1 Other capabilities
There are action settings for the created “Room Manager” object,
allowing for customization.

4.2 Transitions
Set slide, transition, speed, etc.

4.3 Room export items
By writing to variables or switches, they can be used as triggers to spawn enemies.
image

Bonus Shadow Casting Plugin

(ShadowCastAction)


Specifies a layer as the shadow tile and applies a diagonal mask upon entry.

Projects a foot shadow of a specified size during normal gameplay.
image

5.1 Create a shadow layer
(1) Add a dedicated layer for shadows to the tilemap and name it “Shadow”.
(2) Paint semi-transparent shadow tiles on it.

5.2 Register to the character
Add the “Light and Shadow” action to the initial state.


Adjust the default settings to customize the shadow angle, etc.

5.3 Character foot shadow
This is a simple foot shadow.
Toggle “On” to cast a drop shadow and adjust as needed.

This time, the implementation involves integrating four files, making it somewhat complex.
We recommend checking the sample project uploaded to itch.io first.

2 Likes