Best way to design an inventory?

0 favourites
  • 15 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hey there! ^_^

    Basically i am currently designing an inventory system and i would like to ask - what is the best way to do it without causing lags? Ie not hiding it on an invisible layer or something, since having 100 items+, always invis on a laywer may cause delay.

    So what is the best way if not using a new layout for it?

    Any1 knows or got any examples?

  • Hey there! ^_^

    Basically i am currently designing an inventory system and i would like to ask - what is the best way to do it without causing lags? Ie not hiding it on an invisible layer or something, since having 100 items+, always invis on a laywer may cause delay.

    So what is the best way if not using a new layout for it?

    Any1 knows or got any examples?

    Using the invisible layer would only cause a short lag when the game loads and should not lag after running.

    For that many items an array system would be a massive headache and those are the only two ways I know to do it. I use a hidden layer for an inventory of about 250 items and it causes a short lag when loading but I just use a message telling the user to wait while I am creating monsters and objects lol!

  • > Hey there! ^_^

    > Basically i am currently designing an inventory system and i would like to ask - what is the best way to do it without causing lags? Ie not hiding it on an invisible layer or something, since having 100 items+, always invis on a laywer may cause delay.

    > So what is the best way if not using a new layout for it?

    >

    > Any1 knows or got any examples?

    >

    Using the invisible layer would only cause a short lag when the game loads and should not lag after running.

    For that many items an array system would be a massive headache and those are the only two ways I know to do it. I use a hidden layer for an inventory of about 250 items and it causes a short lag when loading but I just use a message telling the user to wait while I am creating monsters and objects lol!

    Hehe nice!! ^_^

    So basically when inventory is ''off'' you set the layer to invisible and pause it? Then when its ''on'' you pause the game and make the inventory layer visible ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hehe nice!! ^_^

    So basically when inventory is ''off'' you set the layer to invisible and pause it? Then when its ''on'' you pause the game and make the inventory layer visible ?

    There are a few ways to do it and that is one. I make it visible on call or you can even do it in a separate layout.

  • InyTinny more a system. Can just delete the array, and it still works. But at 1 point you need the array to easily store inventory in local storage and recreate inventory from local storage. And then this is the way to go. Every instance variable on 1 place in the array.

    https://www.dropbox.com/s/lofat0vb0xwaf ... .capx?dl=0

  • InyTinny more a system. Can just delete the array, and it still works. But at 1 point you need the array to easily store inventory in local storage and recreate inventory from local storage. And then this is the way to go. Every instance variable on 1 place in the array.

    https://www.dropbox.com/s/lofat0vb0xwaf ... .capx?dl=0

    Hehe wow very nice!! ^_^

    Is there a way to do this without drag and drop? Like with cursor for control?

  • InyTinny more a system. Can just delete the array, and it still works. But at 1 point you need the array to easily store inventory in local storage and recreate inventory from local storage. And then this is the way to go. Every instance variable on 1 place in the array.

    https://www.dropbox.com/s/lofat0vb0xwaf ... .capx?dl=0

    Now that is a real nice use of arrays!

    I think I will borrow that for my platform builder. The window popup and drag and drop is prefect for that use.

    Thanks!

  • Is there a way to do this without drag and drop? Like with cursor for control?

    Yes of course. In fact, all the drag&drop does (and matters) in the example is selecting inv spots and objects.

    Any other way you pick them is fine.

  • >

    > Is there a way to do this without drag and drop? Like with cursor for control?

    >

    Yes of course. In fact, all the drag&drop does (and matters) in the example is selecting inv spots and objects.

    Any other way you pick them is fine.

    If by controller, then how to do it -> picked up item, pin on first available slot? Instead of doing it urself?

  • Instead of doing it urself? Ya mean literally? Cant believe i fall 4 that.

    Anywayz, as i said already: all you need is a system that selects things.

    You should have made one that YOU like&love to play with, and shared it.

    But since you are literally. Here goes 1 way of 1 billion.

    https://www.dropbox.com/s/6el1j20sbr0rl ... .capx?dl=0

    I cant test this myself, i dont own a 90tys game pad. At least change the button to something you can remember/use.

  • Yea i already made one myself, but i am asking u with your inventory type since mine has no drag and drop.

    I did share it in the previous forums which u downloaded, seems u forgot already.

    Alot of games are with a gamepad, and not all devoloped games here are for PC u know? Try to get that into ur head.

    So many people play with gamepad, i dont know how u missed that part.

    All i asked for ur inventory was to auto select the first possible slot available. Instead of dragging and dropping it, u just click the item and it goes to the first free slot.

    The sample u did is not working, anyway since u seem like this is a great effort for u, then u dont need to reply anymore here. Have fun dude.

    Edit; It does not work when u pick up items and then drop all, some will get stuck, maybe someone else knows how to do this better in a correct way?

    Instead of doing it urself? Ya mean literally? Cant believe i fall 4 that.

    Anywayz, as i said already: all you need is a system that selects things.

    You should have made one that YOU like&love to play with, and shared it.

    But since you are literally. Here goes 1 way of 1 billion.

    https://www.dropbox.com/s/6el1j20sbr0rl ... .capx?dl=0

    I cant test this myself, i dont own a 90tys game pad. At least change the button to something you can remember/use.

  • On 'long toes' touched.

    Select 'long toes'.

    Teleport to inventory.

  • Ease up guys!

    99 offered you a good way of using array to handle a large inventory and you can't expect it to fit all uses or be used without tweaking to suit your needs.

    And 99 should know his CAPX solutions are not always going to fix a problem and people need to be walked through what a CAPX does or have it designed more specifically for a certain use or it just confuses them.

    If you can't use it there are CAPX inventory examples in the tutorials to look at.

  • On 'long toes' touched.

    Select 'long toes'.

    Teleport to inventory.

    What are u on about? When u pick up couple of items, then drop them all from the first spot, then the last item will get stuck.

    It does not work, i cant use this system. Its too flawed, too many holes, thanks for trying though, but maybe someone else can help

  • Ease up guys!

    99 offered you a good way of using array to handle a large inventory and you can't expect it to fit all uses or be used without tweaking to suit your needs.

    And 99 should know his CAPX solutions are not always going to fix a problem and people need to be walked through what a CAPX does or have it designed more specifically for a certain use or it just confuses them.

    If you can't use it there are CAPX inventory examples in the tutorials to look at.

    He did well ^_^

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