User Tag List

Results 1 to 7 of 7

Thread: Football engine

  1. #1
    No Products Registered

    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Football engine

    This is part of the engine which I started - which covers selection of players. MMF runs a loop, calculating the average distance between the ball and each player. After the loop has finished, it is left with the player closest to the ball - and sets a counter to the ID number of that player.

    When a player is selected, you can use W,A,S, and D to move around.
    To select the player closest to the ball, press the Z key.
    Use the mouse to look around.

    It's fairly simple - and although there are probably more efficient ways of achieving the same thing, this is how I've done it.

    I made this in response to the post made by Rollit - I may add shooting, passing and opponent AI later depending on whether I have time. If you want to do any of those, then feel free to add them on and re-upload the file.
    Attached files Attached files

  2. #2
    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: Football engine

    The concept is interesting - you can probably simplify the picking of the closest player by using an action of the Advanced Direction object.

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Football engine

    Quote Originally Posted by DavidN
    The concept is interesting - you can probably simplify the picking of the closest player by using an action of the Advanced Direction object.
    With the Advanced Direction Object, it is only two events to find closest (or more if your doing something more complex).

    +Always
    -Find Distance and fixed of Player to 0,0 from Ball

    +Fixed("Player")=Fixed("Advanced Direction Object")
    -Give player control

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Football engine

    I don't like using extensions. Doing it yourself in MMF is a lot more productive than using a simple event from an extension - I think learning it would probably benefit the user who requested it more in the long term.

    But if he'd rather use an extension to tidy up, whatever way is fine for him.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Football engine

    An extension would be easier and probably faster at runtime, however.

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Football engine

    Yes but you don't really learn anything that way. This is just an example file - the person who uses it can feel free to replace the necessary bits with an extension if they so wish.

  7. #7
    No Products Registered

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

    Re: Football engine

    Well, thank you for the engine. Now i'll try working on it. Anyway, as i said on the other topic, i'm a total newb with Mmf2, so i want to ask: what do you mean i could use an extension to work on my game? And how it would make the whole thing easier? Sorry for the stupid question.

Similar Threads

  1. Micro Soccer Football
    By Patrice in forum Released Games & Apps in Flash
    Replies: 0
    Last Post: 4th May 2012, 01:26 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
  •