User Tag List

Results 1 to 4 of 4

Thread: A Couple of questions - (not bugs)

  1. #1
    Clicker Fusion 2.5

    Join Date
    Mar 2007
    Posts
    495
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    A Couple of questions - (not bugs)

    In my game, the player ships fire automatically at enemies that are behind you. This is normally nice and simple but I have a new player ship that rotates in 45' steps.
    So, I need to make it able to detect when an enemy is 'behind' it, even when the player ship is at a diagonal angle.
    You'd think you could compare two sets of general values:
    "x-player + x-target" against "y-player + y-target"
    but it doesn't seem to be working the way I figured it would.

    I wondered if anyone had a good formula to test whether an enemy was on a 45' / 135' / 225' / 315' bearing from the ship (give or take say 50 pixels either side).

    The other thing is that I wondered if it was possible to use fonts that were stored in a subdirectory relative to the MMF application.
    It would be nice if you didn't have to install them into C:\Windows\Fonts because obviously, then you need an installer, admin rights etc.

    Any thoughts or suggestions anyone might have about the above would be greatly appreciated.

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    353
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: A Couple of questions - (not bugs)

    So it sounds like you want the ship to have a "vision cone" where it can see and detect an object within a certain range of itself. This is pretty standard AI kind of stuff.

    In MMF2, I would recommend to use a cone shaped invisible Active Object to detect the area. Just draw out the vision cone and set its position to the Ship's position. Set its direction (or angle) to the opposite of the player's ship.

    The bigger/longer you make the cone, the more area your ship will be able to detect enemies.

    This is generally the simplest method.

    About the fonts, I don't know. I also am interested in using custom fonts in my game, and would like this answered.

  3. #3
    Clicker Fusion 2.5

    Join Date
    Mar 2007
    Posts
    495
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: A Couple of questions - (not bugs)

    That's it exactly. I think your idea might be the best one - will cut down on the number of events for sure. I guess I was half-hoping not to add another object to the application.

    I have this in my bookmarks actually but I've never tried it.
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=205885#Post2058 85
    But I wasn't planning on embedding them in the application or necessarily hiding them from the user at all, still seems like a good option.

  4. #4
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    353
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: A Couple of questions - (not bugs)

    Yeah, I know what you mean about adding more objects. I am pretty reluctant about it too. Especially because every new object means more testing for me.

    Since its just your player needing the detector, I'd suggest this simple method. If you needed your 1000 enemy ships on screen to all have vision cones, then I would have to suggest another more complicated method.

    The only problem with MMF2 is that simple doesn't always mean efficient.

    I try to keep the object count down, but its hard. My enemies usually contain about 3-4 objects each. But its hard to coordinate all of those objects together sometimes.

    MMF2 needs to either have better multi-object grouping support, or needs to allow multiple embedded collision mask within objects. Preferably both.

    Oh yeah, thanks for the Font link. I'll have to try that sometime. A perfect pair with embedded fonts would have to be FontStruct:
    http://fontstruct.com/

    I've made a few fonts using it. Its absolutely perfect for bitmap style fonts.

Similar Threads

  1. A couple of bugs
    By Yos in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 29th August 2012, 07:04 AM
  2. A couple of questions
    By galer in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 1st September 2009, 01:36 PM
  3. A couple of questions
    By pkScary in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd March 2007, 11:01 AM
  4. MMF 2 Bugs and a couple of ideas
    By QuickSilva in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 18th July 2006, 04:00 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
  •