Giter Club home page Giter Club logo

gmroomloader's People

Contributors

glebtsereteli avatar k8te-iv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gmroomloader's Issues

Asset layers from different rooms with same name override each other

Hello, I'm really enjoying the tool so far!

Wanted to report a issue I hit

The problem

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.

Desired Behaviour

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

Work around

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

Side Note

I also noticed that layer_sprite_yscale is commented out in __DataSprite, I assume this is unintentional?

layer_whitelist_reset() makes the whitelist block all layers

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

[HTML5] GetObjectIndex is not a function

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.