Skip to content

In-Game: room_get_info() could be extended to give info for the current room so you can see live changes #12685

Description

@stann-co

Is your feature request related to a problem?

In short, i want it to be easier to make a level editor. To be able to edit your levels at run-time and see what it looks like live.
for my purposes that will be especially useful for stuff like parralax. Tile layers and sprite layers in the foreground or background moving at different speeds.

Describe the solution you would like to see

There is already the function room_get_info, which gives you a struct of all the level information, but it doesn't give you info on the current active room or it's changes

So ideally, what I'd want, is room_get_info but for the current room, with its active changes.
(if tiles have been changed that is reflected in what it returns)

That way you could make changes in the room live, see them, and then save them back to the room.yy file when satisfied.

Describe alternatives you have considered

Manually loop through layers, and tile layers, to see what new tile placement looks like to then save. It is possible but not super easy to loop through.

It's the same deal with all other instances or room changes

Additional context

https://api.gamemaker.io/api/github/downloads/4b1ac01c-960b-4775-a6a0-e7a7bb69ecb5
Here's a simple project, where pressing spacebar, will randomly change the first tile in the room
and then using room_get_info to print the tiles to the console.

This could be used to test a potential new function

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

GMRT_CHECKEDFix was verified in the GMRT runnerdocumentationImprovements or additions to documentation are also required by this issue

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions