[PLUGIN] Sprite Bank

0 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Update:

    Remove jQuery call.

  • rexrainbow, will need to get further along in my game before using this, but it will definitely be helpful when I do, thanks.

  • I found out tonight, if you are saving the json anywhere to be used at a later date, the plugin will throw an error if you add any new instance variables to your game after the json has been generated. I'm not sure how people are using the sprite bank like this (in my case it's for a map editor).

    It's easy enough to jump in and fix the json, but it's still probably good to be aware of before making sweeping changes to your game.

  • boolean

    C2 engine stores instance variables in a list.

    It is hard to keep compatible if user add or change the order of instance variables.

    For example:

    Save the instance variables

    x: 10
    y: 20

    to JSON will be

    "[10, 20]"

    Now user insert another instance variable

    i: 3
    x: 10
    y: 20

    The JSON should be "[3, 10, 20]".

    or

    x: 10
    i: 3
    y: 20

    -> "[10, 3, 20]"

    Any suggestion for these situation?

  • I would like to make another version of sprite bank for board system (might be named chess bank), but still have not enough time.

    Does any one use sprite bank to save chess(sprite instances) on board plugin?

  • Any suggestion for these situation?

    So what I did to get around the error was I made a small change to the runtime.js. On line 161 I changed:

         

    inst.instance_vars = save_obj["inst_vars"].slice();

    to

    while(inst.instance_vars.length > save_obj["inst_vars"].length)

       save_obj["inst_vars"].push(0)

    inst.instance_vars = save_obj["inst_vars"].slice();

    It means if you have any instance variables set through the IDE (that spritebank does not know about) they will be reset to 0, but it at least lets you load the spritebank so you can resave the json.

    I guess this doesn't solve the problem posed by you if you are updating instance variables through the IDE. That I'm not sure of, I think I need to learn more about how plugins work <img src="smileys/smiley1.gif" border="0" align="middle" />

  • boolean

    Thanks. I will add it into plugin.

    I might upgrade this plugin to support save more sprites like instances in container. Uh, hope I have time.

  • I don't know if I mentioned this yet Rex, but your Sprite Bank was a godsend for my last game and likely will be for my next as well. So thanks a ton a ton a TON for this! <img src="smileys/smiley4.gif" border="0" align="middle" />

  • I haven't mentioned this Rex, but I love you :D in a platonic respectful way. I had noticed the spritebank a few months ago, but it was only over the weekend that I decided to work on a User Generated Content game. Also I needed a way to do a level save and loader.

    By using families and using instant variables I can build levels. Your Spritebank works like a charm in regards to JSON to text, text to JSON and it stores the family behaviours. I love you.

  • jayderyu

    I had made a new version of spritebank named "instance bank" recently to support official container featute, but had not release it yet.

    BTW, I had made another plugin named "chess bank" to save all chess on the board for my board plugin. Not release yet.

  • Looking forward to instance bank, but I can work with sprite bank right now. Really appreciate this plugin a lot.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The new version of sprite bank had been released named instance bank.

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)