Resizes and/or moves the contents of GameMaker (LTS / GM2022+) rooms.
Mostly exists to help with the specific problem of "I want to resize my room towards top/left without moving my layers by hand". If you know, you know.
Don't forget to backup your project before using the tool!
Also see: Suggestion on GameMaker bug tracker
Use (web version)
You specify how you want your rooms to be resized, specify which rooms you want resized, choose your project directory, press the "Modify rooms" button, and get a set of changed files in a ZIP!
You can then close your project in GM, extract these in the project directory (overwriting as necessary), and open it again.
The tool works client-side so you can save the page for offline use.
CLI version is for people that might need to do this often (?).
- Install Neko VM
- Place
room-shift.n
somewhere (if you downloaded a standalone Neko VM ZIP, you can put it in Neko directory)
Open command prompt/terminal in the directory with Neko and/or room-shift.n
and do:
neko room-shift.n --project path/to/project.yyp <...options> <...rooms>
Options can be:
Option | Argument | Description |
---|---|---|
--project |
path | Required! Path to a GameMaker project to work with |
--left |
number | Number of pixels to add to the left |
--top |
number | Number of pixels to add to the top |
--right |
number | Number of pixels to add to the right |
--bottom |
number | Number of pixels to add to the bottom |
--width |
number | New room width |
--halign |
align | Alignment for original contents when using --width |
--height |
number | New room height |
--valign |
align | Alignment for original contents when using --height |
Path can be a relative or absolute path to a YYP
--width
and --height
override left/top/right/bottom arguments,
calculating them on per-room basis based on alignment.
Align-typed arguments can be:
left
,center
,right
(horizontal)top
,middle
,bottom
(vertical)- A number (0.0 is left/top, 2.0 is right/bottom, fractions are allowed)
Rooms can be:
- Room names (e.g.
Room1
) - Wildcard names
rm_stage_*
matches anything starting withrm_stage_
This would matchrm_stage_1
orrm_stage_1_boss
rm_stage_#
matches anything starting withrm_stage_
and followed by a number
This would matchrm_stage_1
, but notrm_stage_1_boss
(butrm_stage_#_boss
would)
neko bin/room-shift.n --project room-shift-test-2024/room-shift-test-2024.yyp --left 16 --top 32 --right 64 --bottom 48 Room1
This would expand Room1 by 16 pixels on the left, 32 pixels on the top, 64 pixels on the right, and 48 pixels on the bottom.
neko bin/room-shift.n --project room-shift-test-2024/room-shift-test-2024.yyp --width 2048 --height 2048 --halign center --valign middle Room1 Room2
This would resize Room1 and Room2 to 2048x2048, placing the original contents in the middle.
- Install Haxe
v4.3.6 was used as of writing. - Download and unzip or "clone" (using git) the repository
- Open command prompt/terminal in the directory (where this
README
is) haxe build-neko.hxml
If all is well, room-shift.n
should appear in the directory.
If you made changes, you can re-compile the JS file for the web version using haxe build.js.hxml
- Not actively tested with making rooms smaller.
- Resizing a room multiple times might leave redundant tile columns/rows
(which GameMaker will usually clean up on load) - GameMaker will usually re-format the room's .yy file when you open it.
This is to be expected - it's hard to perfectly match the format.
- A tool by YellowAfterlife!
- Written in Haxe!
- Originally commissioned by Broxcorp Ltd., released with permission