glebtsereteli / gmroomloader Goto Github PK
View Code? Open in Web Editor NEWRuntime room loading for GameMaker 2024.2+
Home Page: https://glebtsereteli.itch.io/gmroomloader
License: MIT License
Runtime room loading for GameMaker 2024.2+
Home Page: https://glebtsereteli.itch.io/gmroomloader
License: MIT License
Hello, I'm really enjoying the tool so far!
Wanted to report a issue I hit
The rooms that I'm loading all share the same layer names. When I load multiple rooms with the same asset layer name, then which ever one is loaded last with override the content of the previous rooms.
For example, let's say I have 3 rooms and each has a sprite layer called "Assets_0" with a single sprite in it.
If I loaded all 3 rooms with RoomLoader.load
, then I would expect the "Assets_0" layer to have 3 sprites
I fixed this by adding the following line at the top of __roomloader_create_layer
if(layer_exists(_data.prefixed_name)) return layer_get_id(_data.prefixed_name);
This may or may not be an acceptable full fix since it only applies of the layer properties of whichever room is loaded first. Not sure what the best approach would be for a full fix
I also noticed that layer_sprite_yscale is commented out in __DataSprite, I assume this is unintentional?
on version 1.5.1 no layers are loading after using layer_whitelist_reset()
instead of reverting to default "all layers load", it makes the whitelist empty, in a way, that no layer are on the whitelist, so no layers load unless layer_whitelist_add()
is used
I don't really know if it's an issue with the library or with my code, but it seems to come from RoomLoader.load
function
My code is a bit complex, so I won't try to fit it all in, because frankly it doesn't matter, but to sum it up it's something like
var pos = get_positions()
var p = RoomLoader.load(rooms[currrent_room], pos[0], pos[1]);
It works perfectly well on Windows, but it breaks on HTML5 with an error:
Uncaught TypeError: yyInst(...).GetObjectIndex is not a function
at gml_Script_anon_314_anon_270___RoomLoaderData___RoomLoaderInternalConstructors
at array_map
at gml_Script_anon_270___RoomLoaderData___RoomLoaderInternalConstructors
at _xx.gml_Script___RoomLoaderData
at __yy_gml_object_create
at gml_Script_anon_292____struct___3_RoomLoader_RoomLoaderMain
at Object._tl3
at gml_Script_anon_1456_RoomLoader_RoomLoaderMain
at gml_Script_generate_room (this would be the script which im calling from)
I did some digging, it appears to come from line 33 of __RoomLoaderInternalConstructors
- _data.sprite = object_get_sprite(_data.object_index);
I have no idea what to do, is there something wrong with HTML5 or am I just doing something wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.