User Tag List

Page 3 of 3 FirstFirst 1 2 3
Results 21 to 29 of 29

Thread: I am going full Behavior programming, any tips?

  1. #21
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MuddyMole View Post
    Come on, don't be a tease - what's this extension you're working on?
    Let's just say it makes the lives of widget designers and widget users much easier...it's still in very early stages though so I can't really explain much more of it. I expect to release it some time next summer.

    @EdibleWare, you should avoid behavior programming if it does not work out for you, not go all out on it in the case of failure...
    Working as fast as I can on Fusion 3

  2. #22
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by LB View Post
    @EdibleWare, you should avoid behavior programming if it does not work out for you, not go all out on it in the case of failure...
    That's a bad philosophy - if at first you don't succeed, try try again!

    Although keep in mind: "Insanity is doing the same thing over and over again and expecting to achieve different results" - Albert Einstein

  3. #23
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its complicated, I mean, I see that when using behaviors, I can assign a pattern anytime anywhere, if I do it right.

    "How about this enemy can bounce too?, or, can I cause a poison status?"

    Things like these, that I find myself redoing and reasigning all the time, I will only need to do once... also, grouping always tend to go wrong, sometimes I get wrong animation because of grouping events, so I just droped it.

  4. #24
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well im fairly new to behaviour as well, but i think i understand both the uppsides and downsides of using it, and will try to explain it as clearly as possible...
    ------
    THE UPPSIDES: cloning conditions
    ...
    Example A1:
    Lets say you created a fairly complex game where you control a character named 'Spaceman Joe' ( object name is Spaceman Joe )
    Spaceman Joe can walk, run, stand on platforms, collide with walls, shoot, throw grenades, jump, wall jump, climb ladders, duck and use a jetpack amongst other nifty things.
    This takes about 300 conditions.

    You then decide you want to make a second chatracter available ( similar to Spaceman Joe ) , either as an alternative charater or for a 2 player mode, named 'Spaceman Mac'.
    You want to create a new object named 'Spaceman Mac'.

    If you programmed the conditions which affect Spaceman Joe in Spaceman Joes 'behaviour' instead of in the 'Frames event editor', you could simply clone Spaceman Joe object ( and rename him Spaceman Mac ).
    If not ( if all conditions for Joe is programmed in the 'Frame event editor' ), you would need to correctly create 300 new conditions for Spaceman Mac so he can function like Spaceman Joe. Doable, but time consuming and a big pain.

    If you clone Spaceman Joe, his behaviour is cloned not just copied ( for your convenience ). a simple illustration below illustrated what happens in the 'cloned' bahaviour of a cloned object.

    This is convenient when creating content for many types of games.
    ...
    Example A2:
    In a RPG type game you might have an enemy ( 'Dark Soldier' ) which can recieve damage, different status effects and is destroyed when health reaches 0.
    If you programmed theese conditions inside Dark Soldiers behaviour it is very easy to create a new type of enemy which inherrit theese traits ( can recieve damage, different status effects and is destroyed when health reaches 0), by simply cloning Dark soldier ( and renaming it 'Lizzard Warrior' or something else ).
    ...
    This makes creating conten effective and time saving! But you have to ( or at least should ) plan and think ahead to avoid future problems
    ------
    THE DOWNSIDES: Loosing controll of the 'order of your conditions'
    ...
    When you have been using MMF2 for a while and try creating complex things, you beginn to understand the importance of the actuall 'order' your conditions are handeled in. If your fairly new to MMF2 or programming you might not see this.

    For instance, first moving an object, then checking for collition is very different from doing it the other way around.
    Another example, first delivering/ recieving damage, then checking if health is 0 is very different from doing it the other way around.
    ...
    You dont actually 'loose control' of the order in which your conditions are handeled, but it makes it very hard too keep track and controll the order they are handeled in.
    Lets take a look at in what order MMF2 handles conditions:

    - Frames event conditions, in the frames event editior are handeled first
    - Global event conditions are handeled thereafter
    - Behaviour event conditions are handeled last*

    *You may have multiple object wich have their own behaviour, they all cant be handeled at the same time, so which objects behaviours ( conditions ) are handeled first?
    The answere is the first object to enter the frame, then the secound object, then the tird and so on...
    ...
    Example B1:
    You create 'Spaceman Joe' ( he is the fist to enter the frame )
    Then you create an enemy for Joe to fight 'Dark Soldier' ( enters the frame secound )
    Then you decide you want a secound player controlled character to be available 'Spaceman Mac' ( enters the frame third )
    Then you create a secound enemy 'Lizzard Warrior' ( enters the frame forth )

    In this example here is the order in which the conditions are handeled:

    - Frame event conditions
    - Global event conditions
    - Behaviour event conditions
    - 'Spaceman Joe' behaviour conditions
    - 'Dark Soldier' behaviour conditions
    - 'Spaceman Mac' behaviour conditions
    - 'Lizzard Warrior' behaviour conditions
    ...
    Example B2:
    To my understanding this order of 'behaviour event conditions' do not change by destroying or re-creating the different objects at runtime.
    For example, to make 'Dark Soldier' enter the frame forth instead of secound ( making his behavior conditions handeled forth and last ) you will have to physically delete all instances of 'Dark Soldier' from the frame and create a new one, or clone him ( 'Dark Soldier 2', enters the frame fifth and last )and delete the original ( 'Dark Soldier', no longer exists ). If you then have Frame Event Conditions ( conditions in Frames Event Editor ) which included the original 'Dark Soldier', you might think about adressing that issue to work with the new 'Dark Soldier'
    ...
    Iv only been learning about behaviours from the last coupple of days, so my information might not be correct, although i think it is.
    I dont want to missinform anyone, so feel free too correct me where im wrong

    There probably are other aspects of behaviors which can be beneficial, like the 'import new object' function in the 'behaviour event edior' which i havent paid much attention to

  5. #25
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was thinking maybe 'less imported objects' in the behaviour editor could mean it would handle conditions faster or something ( because it doesnt need to 'think' about all the objects ) :P
    ...
    But your probably right, its probably just a cinvenient option for the user to be able to only view the objects relevant to the behaviour

  6. #26
    Clicker Fusion 2.5

    Join Date
    Mar 2007
    Posts
    495
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Behaviours are pointless because the global objects don't always update themselves across frames properly ... so you end up having a dozen versions of your code spread all around your application.
    Stick to the main event editor is my advice.

  7. #27
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,642
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    Another good use for behaviours is when making multiple platform games/applications. Instead of placing actions under the events, behaviours can be used so that they remain contained. When it comes to using something like a mouse pointer object (for example) which might not be compatible with the iOS exporter, you can simply delete the object and it doesn't affect any of the main event code or leave any empty events behind.

  8. #28
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot everyone, I am thinking a lot before starting wrting the engine again, Behavior mode in mind.

    One of my ideas is to asign confirmations as behaviors too, loading from another objects used to store Value data, such as life for all kind of oponents and such.

    I will upload an example when I start doing it.

  9. #29
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am thinking of using comand and activation Behaviors:

    *Death Behavior: When Alt A=1, Game pauses, flash X times until destroy

    *Death Trigger Behavior: When life= 0, set Alt A to 1

    I can use death for all objects, but Trigger will have to be customized depending on preferences, or I can creat many of then and just set depending on the situation. One good advantage is that I can this to test stuff

    *Click Trigger Behavior: Click over object, set Alt A to 1

    I am hoping this works!

    ---

    Also, I will start from the idea that every object can do everything, what changes are the values of it and how these events will be activated, thus, limiting their actions if these events never happens at all, and possibliting any behavior when I want.

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. 256 R34 Behavior Bug : Object is not created but its behavior runs anyways
    By Shmuper in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 2nd March 2013, 07:15 AM
  2. Made my first semi-full fledged game, any tips...
    By Wra1thus in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 31st December 2010, 08:34 PM
  3. Help with programming ..... I am
    By Digitalmayhem in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 15th February 2009, 10:29 PM
  4. Some Programming help, please
    By JoeText1 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd October 2008, 09:39 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
  •