User Tag List

Results 1 to 7 of 7

Thread: Randomizing enemy/boss attacks and movements.

  1. #1
    No Products Registered

    Join Date
    Mar 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Randomizing enemy/boss attacks and movements.

    Currently I have a boss running entirely off of timed events. It makes it dull and uninspired and I was wondering how to randomize attacks and possibly movements too.

    It's not meant to be AI, I don't believe I'm good enough to work on that yet but currently I need enemies that aren't stationary, same with bosses.

    Thanks in advance for the help.

  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: Randomizing enemy/boss attacks and movements.

    My bosses (and many of my usual monsters) have an alterable value called "State" that is used to decide what movement pattern or behaviour they should use. If you base your boss's movements and attacks on a value in this way, you can control their patterns just by setting that value - including introducing random behaviour by setting the value to random(x).

  3. #3
    No Products Registered

    Join Date
    Mar 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomizing enemy/boss attacks and movements.

    Ah I see, I tried something similar to that before as a friend reccomended it. I must've botched it up as it didn't work right, thank you though. I'll keep at it.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jun 2007
    Posts
    157
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomizing enemy/boss attacks and movements.

    I'm doing something related

    I generate a random number, say in an active object's alterable value.

    then I have an action based on that random value, maybe I put that in an inactive group

    then when as numbers 'pop' up it goes something like this:

    val = 1
    do a thing ( by activating group 1)

    val = 2
    do a different thing (by activating group 2)


    val = 3
    do still anotehr thing (by activating group 3)


    lather, rinse, repeat

    Dave


  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export Module
    Chaos's Avatar
    Join Date
    Aug 2006
    Location
    Burnsville, MN, USA
    Posts
    806
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomizing enemy/boss attacks and movements.

    Yes, DavidN's method is generally the best and easiest way that I've bumped into myself.

    What I do for my bosses and baddies, is give them an alterable value for state, or command such as David suggested, and then do something similar to this:

    Every 3" (three seconds) --> Alterable Value ("Command") to "Random(3)+1" --(I use the +1 to ensure that a command will always be a positive number, whereas a 0 means to do nothing at all, or to reset the event trigger)

    and then just assign commands to numbers:
    If Alterable Value "Command" = 1 --> Shoot slime + set Alterable Value "Command" to 0 ;
    If Alterable Value "Command" = 2 --> Move in direction of "Player" at speed 20 + Alterable Value "Command" to 0;

    It takes some tweaking and changing but it's easily modifiable and you can apply it to almost any bad guy. Movement can be a bit tricky, as in platformers you need to add in the fact enemies can bump into walls and fall off edges, but there are ways to handle that as well. (Personally, I use hidden sensor objects that change the direction of enemies I don't want falling off ledges to head back onto land)

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export Module
    Chaos's Avatar
    Join Date
    Aug 2006
    Location
    Burnsville, MN, USA
    Posts
    806
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomizing enemy/boss attacks and movements.

    Ahh Dave beat me to it

  7. #7
    Clicker Fusion 2.5 Developer
    00J's Avatar
    Join Date
    Jun 2006
    Location
    Virginia, USA
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomizing enemy/boss attacks and movements.

    All of this is called A.I. Whenever the "Monster" does things based on a set of choices or circumstances it is making an intelligent decision based on it's knowledge, how many parameters you program into the Monster determines just how smart it is. Hence A.I. Artificial Intelligence... [smile]
    Now you COULD have a Monster that understands and responds to it's entire environment, and every state of the player, but it's your time.

    Most game designers don't bother making Monsters/Enemies TOO complicated when it comes to their A.I. because they will only exist for a very short amount of time, once the player encounters them... Now you could theroretically have an Unbeatable A.I. but then the player would always lose. The trick is to make the game fun by making the Monster "seem" intelligent, but not too intelligent as to make the game impossible to play...

Similar Threads

  1. Enemy Movements
    By FlinkGigitty in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 18th January 2010, 02:03 PM
  2. enemy boss area
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th January 2010, 03:05 AM
  3. Enemy or Boss movment help
    By 007 in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 9th May 2008, 04:30 PM
  4. how do you make boss enemy charcters?
    By kainan in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 1st December 2007, 06:51 PM
  5. Handling Enemy Movements
    By Zenoff64 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd August 2007, 01: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
  •