User Tag List

Results 1 to 9 of 9

Thread: Best method for settings?

  1. #1
    No Products Registered

    Join Date
    Jul 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best method for settings?

    Hi, I've been trying to have a game I've been making pull data in various ways, and every time I try something, it backfires.

    Ideally what I want, is to have a user be able to select a ship, and choose upgrades. In the method I am using, I have a gruop of events generate .ini files for every item in the game at the start of the frame. Then, I used a list item so that when the line is changed, it takes the text of the current selection, and adds ".ini" to find the file.

    The problem with this is, that I always have to set the current .ini file when I want it to update it. This conflicts since the users save file is also an .ini file.

    I didn't learn until recently that the order of the events in the event editor has an effect on the results of your actions. I've tried several different ways to get this working, using global values/strings etc. I have had various successes, but am quite ready to get out of building phase and into the content phase. This is driving me crazy, and ideas?

  2. #2
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Best method for settings?

    Add a system to your game that when a user starts a new game it creates a profile for the user. How this profile looks is up to you.

    You could have a default.ini somewhere with all the information you need.

    when you start a game it copies the ini into the same folder but rename it to temp.ini

    read and write to this temp.ini as you like.

    When the player wants to save his/her game just save it as player.ini or whatever name the user has chosen for their profile.

    This is how I do it and it works great. And if you compare to modern games, this is what they are doing as well.

  3. #3
    No Products Registered

    Join Date
    Jul 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Best method for settings?

    Beware: I may kiss you. I'm going to try implementing it now. The only thing standing in my way is the usefulness of the objects I am using to display information.

  4. #4
    No Products Registered

    Join Date
    Jul 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Best method for settings?

    Damnit...I'm back to Phase 1.

    Ok, the way I have it setup currently, I have a counter generate a random number. This number sets the probabilty that certain items will be available to be purchased. When you click on an item in the list, it takes the name, adds ".cfg" to it, and sets it as the current .ini file (I used an ini object and told it to use .cfg instead of .ini for the files with item attributes)

    The problem is, I want this to be dynamic, so I all I have to do is set a name once, (currently I have this setup in each file under "name") and thenceforth it will be "identified" by a static number which then loads the name of the item.

    Then there's another problem; I go back to that list item and try to make the item name reverse-translate to the correct .cfg file. I might be using the wrong objects. It seems like every time I make progress using a certain object, something stops me and I have to try everything else.

    I want the player to be able to upgrade parts of their ship in tiers. So I need it to detect what tier the current parts are versus the tier of available parts. Maybe my mind is too advanced for this program or I'm just doing something stupid, I dunno...

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DJFuego's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    1,416
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Best method for settings?

    Isn't the ini object limited? I would have thought an array object would be nicer. You can use the binary array object to store all your ship data so when you click a ship, it will load the data of that ship from the array, easy.

    You will have pre-programmed what it can upgrade and and can't etc. I don't have time to make program an example but I would suggest using the binary array object as the ini is really for small amounts of data.

    If you had 100 or so ships and an ini per ship it would just look like messy programming.

    Draw out a data structure (on paper) and translate it to the array object.

  6. #6
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Best method for settings?

    Im not sure if I got what you tried to explain.

    You could have a ini file called Ships.ini.

    could look like this:

    Code:
    [Ship1]
    Name=Viper
    Power=50
    Speed=30
    MaxTechLevel=5
    MaxWeaponslots=2
    Weapon1=None
    Weapon2=None
    
    [Ship2]
    ...
    In your current profile it could be player.ini

    Code:
    [Player]
    CurrentShip=Ship4
    Credits=34000
    Lives=8
    CurrentLevel=7
    MaxTierLevel=3
    I see no problem with this. You want a random seed of items, should no problem be either:

    Have an Ini file with all the items.


    run a loops for number of items and save all those numbers in a list.

    Thats it.

    PM me with your File and I try to help.

  7. #7
    No Products Registered

    Join Date
    Jul 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Best method for settings?

    Hmm...I think I may not have realized that you can have more than one item in an ini file. As for the DJFuego's post...I think the ini file may be limited to 1024 characters or so, so this may not be the best method.

    I will experiment with this a little more. But if this doesn't yield the results I want, is it even possible to set it up so that all items pull from separate ini files that can be called whenever you need them? Is this a realistic method, or is there a better way?

  8. #8
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Best method for settings?

    There is no limitation on INI files. My characters.ini with all the dialogs in the game is 214kb in size and I have no issues.

    Still I don't really understand what you want to do in the end.

  9. #9
    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)

    Re: Best method for settings?

    INI files are limited to 65,536 characters - and if one of your INIs ever gets anywhere near that, you should switch to another data storage method anyway

Similar Threads

  1. Resolution settings.
    By ineke in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 15th January 2013, 09:37 PM
  2. Accessing iOS settings with app?
    By ratty in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 28th June 2012, 11:19 PM
  3. MMF settings tab..?
    By KLiK-iT in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 2nd March 2012, 05:47 PM
  4. Optimization settings
    By MattKapa in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 7th February 2012, 12:10 AM
  5. Game Settings
    By PaulW in forum File Archive
    Replies: 12
    Last Post: 24th April 2007, 11:42 PM

Posting Permissions

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