User Tag List

Results 1 to 10 of 10

Thread: Whats your technique for a great inventory menu?

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2011
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Whats your technique for a great inventory menu?

    Hi everyone

    I am wondering how you do your inventory menu. At the moment, I have a DragNDrop GUI over an array where I store the data.
    I am looking for your input.

    1. I have a lot of data moving through manual Array operations. Are there risks that Array data gets lost in case of lag, bugs, etc...
    2. What are the pros and cons of Arrays, INIs, values stored in active objects for inventory purposes?
    3. I need a lot of text. Are there pros and cons to create a new string for every item or is it better to have a dynamic string that displays the content relative to the item?

    I would love to hear your input!

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    1. No.
    2. Alterable values are great for storing values generated at runtime - but they're not good if you want to save to / load from external files, and they're not a very efficient (as in systematic/organized) way of storing large amounts of data.
    INIs are really only meant for when you need to save data in a human-readable text format. People do use them for other things too, but arrays and associative arrays would normally be a better choice.
    For an inventory, arrays are definitely the way to go.
    3. I don't understand the question.

  3. #3
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    3. I just use one Alterable Text.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2011
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks MuddyMole and nivram!
    Ok, I go with arrays... is there a limit of how many values I can write in one event before it goes buggy or should I always resort to fastloop when doing array modifications?

    Marv, how do you organize the alterable text without spread value? At the moment I have to overlap every string with the icon to keep reference. Thanks!

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ChrisBurrows View Post
    Forgot about your Excellent program link (scoops some brain matter off the floor).
    Morbus. This is perfect for your use.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  7. #7
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2011
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the link! Unfortunately I am using the ios exporter, so I can't use this Extension.
    Can anyone tell me how much slower INIs are that arrays? I would prefere INIs because they can store values and strings and are much easier to organize.

    But I am afraid that my whole data concept gets broken if I have trouble reading and writing 50 INI values in one event...

    Can anyone comment on that?

  8. #8
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is a problem when you add an extremely large number of actions to one event, but 50 should be well under that limit. I wouldn't write 50 values constantly to/from the INI (I believe it updates itself as soon as a new value is written) - you might want to have an object to temporarily store these values (like the array) and then to save them all out to the INI using a fastloop when it's appropriate.

    Actually, if you describe exactly what you're saving and loading (and where those 50 values are), people might be able to offer more specific advice.

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2011
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks David! I have 16 item slots. Every Item can hold about 20 values. Now I have an Array but I struggle keeping track of X and Y. Also I cant store strings AND values which would be possible with INIs.
    One Event that writes / loads 60 values is when I drag one item over an other and all attributes have to switch. During gameplay, everything is stored in values from active objects.

    What do you think? How slow will it be to manipulate data when there are 16 Groups / 320 values in an ini file?
    Is it possible for my dragNdrop menu to just change the Group String in the INI instead of switching all values manually?

    Also, are arrays global or do I have to load the array after every frame?

  10. #10
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Morbus Crohn View Post
    Also, are arrays global or do I have to load the array after every frame?
    Make the array global. Arrays do not carry data over to Sub-applications. For that you will need something like a Associative Array or place the array you are using into the sub-application and load and save from the sub-application.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. quelques questions technique
    By blackant in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th September 2010, 04:38 PM
  2. Game/Inventory Menu
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th September 2009, 06:46 AM
  3. Grid movement technique help
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd June 2009, 02:26 PM
  4. A great looking menu
    By Grim in forum Articles
    Replies: 4
    Last Post: 8th October 2008, 11:28 AM
  5. Problème technique
    By SGL in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th June 2008, 09:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •