User Tag List

Results 1 to 5 of 5

Thread: Fixed values?

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

    Fixed values?

    Every object has a unique fixed value. I am curious to how these are assigned?

    Cheers!

  2. #2
    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)
    Chris. They are numbered by type and then by order created in the frame editor.

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

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    How unique are fixed values? I mean are fixed values unique across the entire application or just that frame? What I mean is, if I have two frames will the fixed values of every object in both frames be completely different or will it start numbering them again in a new frame? I can't seem to find information about fixed values in the help file.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    A fixed value is just a hexadecimal string (converted to an integer), composed of three parts:

    0x | t | i

    "0x" is just those two characters (in computing, 0x always represents a hexadecimal).
    "t" is the total number of objects which have already been created in the current frame. It doesn't make any difference if objects have been destroyed, "t" can only increase. Initially, "t" is only a single character in length, but it increases in length if there are more than 15 objects (15 = F = the highest value that can be expressed in hexadecimal with one character).
    "i" is related to the total number of objects that are on screen - so if there were no other objects it would be "0000"; if there were 1 it would be "0001"; and so on. However, if an object has been destroyed, MMF2 will go back and reuse its "i" value the next time a new object is created (starting with the lowest unused value). "i" is always 4 characters in length.

    For objects created in the frame editor, fixed values are assigned according to object type, starting with background objects, then actives and extensions, and finally windows controls (edit boxes, lists, etc). You can see the exact order by selecting everything and looking at the values that appear in the blue boxes at the top-left corner of each object.

    Why Clickteam didn't just use "t" alone as the fixed value, is something of a mystery to me...

    See Aphant's article here: http://www.create-games.com/article.asp?id=2139

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    That's awesome. I had a system where I got the game to remember what objects had been destroyed in an earlier frame by spread value, and stored them in a string with delimiters, so you could return to an earlier frame with the objects destroyed at start, think of a Metroid type game where enemies don't respawn for example. Now though, due to these, I could just use the fixed value instead.

    But I'm still none the wiser about frames, the top-left shown value starts from 1 again in each frame, but I've been told that fixed values are unique throughout the entire application, as in if I have three objects in frame 1, and three objects in frame 2, there will be six unique fixed values? Or will it be three repeated twice? To put it simply, do I have to add the frame number into the equation when storing references to objects?

    Also I need to know if fixed values change at runtime (OK they're called 'fixed' I know, but that article gave me the impression that they can change), for example, if I create a new object at runtime, do fixed values of previous objects change? If this is the case I can't rely on fixed values to remember, for example, which enemies have been killed.

    EDIT: After some experimenting I found that fixed values DO restart in different frames (e.g. if 8 active objects in each frame Active Object 1 in Frame 1 will be 65536, Active Object 1 in Frame 2 will also be 65536), so it's better to identify objects in my string as say Str$(frame)+"."+Str$(fixed value) I think.

Similar Threads

  1. Fixed Values
    By Ganryu in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 5th November 2008, 09:52 PM
  2. What are fixed values?
    By pinacoladaxb in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 3rd November 2008, 11:15 PM
  3. Confused on fixed values
    By Gamerdude in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 9th July 2007, 04:51 AM
  4. Fixed Values?
    By Durnus in forum Extension Development
    Replies: 17
    Last Post: 25th July 2006, 03:22 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
  •