Search Unity

Universal Fighting Engine 2

Discussion in 'Assets and Asset Store' started by Mistermind, Jul 20, 2018.

  1. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    I just tested the WebGL demo, here is a video:


    Create a new C# file called StartGUIInterface and paste the code bellow:
    Code (CSharp):
    1. using UnityEngine;
    2. using UFE3D;
    3.  
    4. public class StartGUIInterface : MonoBehaviour
    5. {
    6.     public int playerNum = 1;
    7.  
    8.     private GUIControlsInterface uiInterface;
    9.  
    10.     void Start()
    11.     {
    12.         uiInterface = gameObject.GetComponent<GUIControlsInterface>();
    13.         uiInterface.playerNum = playerNum;
    14.         UFE.GetController(playerNum).humanController = uiInterface;
    15.     }
    16. }
    17.  
    Next, open GUIControlsInterface.cs, remove the "sealed" keyword and add a new variable called playerNum:
    Code (CSharp):
    1. public class GUIControlsInterface : AbstractInputController
    2. {
    3.     public Fix64 hAxis = 0;
    4.     public Fix64 vAxis = 0;
    5.     public bool b1;
    6.     public bool b2;
    7.     public int playerNum;
    Now:
    * Create 2 new game objects in the hierarchy: P1Controls and P2Controls.
    * Add the 2 scripts to each of the new game objects: GUIControlsInterface and StartGUIInterface.
    * Assign the player number (1 or 2) to each instance of StartGUIInterface.

    Now the controls should work, but the 2 interfaces are overlapping. To fix that, add a condition under GUIControlsInterface.OnGUI to adjust the player UI accordingly (replace the initial declaration):
    Code (CSharp):
    1.    private void OnGUI()
    2.    {
    3.             bool upEvent;
    4.             bool downEvent;
    5.             bool leftEvent;
    6.             bool rightEvent;
    7.             bool button1Event;
    8.             bool button2Event;
    9.  
    10.             // Change the values to your liking:
    11.             if (playerNum == 1)
    12.             {
    13.                // Player 1
    14.                 upEvent = GUI.RepeatButton(new Rect(80, 320, 40, 40), "U"); // Up Axis
    15.                 downEvent = GUI.RepeatButton(new Rect(80, 400, 40, 40), "D"); // Down Axis
    16.                 leftEvent = GUI.RepeatButton(new Rect(20, 360, 40, 40), "L"); // Left Axis
    17.                 rightEvent = GUI.RepeatButton(new Rect(140, 360, 40, 40), "R"); // Right Axis
    18.                 button1Event = GUI.Button(new Rect(380, 360, 40, 40), "B1"); // Button 1
    19.                 button2Event = GUI.Button(new Rect(440, 360, 40, 40), "B2"); // Button 2
    20.             }
    21.             else
    22.             {
    23.                // Player 2
    24.                 upEvent = GUI.RepeatButton(new Rect(700, 320, 40, 40), "U"); // Up Axis
    25.                 downEvent = GUI.RepeatButton(new Rect(700, 400, 40, 40), "D"); // Down Axis
    26.                 leftEvent = GUI.RepeatButton(new Rect(640, 360, 40, 40), "L"); // Left Axis
    27.                 rightEvent = GUI.RepeatButton(new Rect(760, 360, 40, 40), "R"); // Right Axis
    28.                 button1Event = GUI.Button(new Rect(1000, 360, 40, 40), "B1"); // Button 1
    29.                 button2Event = GUI.Button(new Rect(1060, 360, 40, 40), "B2"); // Button 2
    30.             }
    31.  
     
    Last edited: Feb 9, 2022
  2. MTegarAsta

    MTegarAsta

    Joined:
    Oct 23, 2019
    Posts:
    39
    Commenting On this function seems really work but it also makes players cant collide with each other (if this happen there is some weird glitch that will happen), I just want them to not push each other but still can collide with each other

    Edit: NVM I decide to make the player a little bit heavier to push and Ground Collision Mass can do the work.
     
    Last edited: Feb 9, 2022
    Mistermind likes this.
  3. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    I noticed that just commenting the function won't do justice. The easiest atm solution would be to add the following code on top of the pushOpponentsAway function:
    Code (CSharp):
    1. if (!myPhysicsScript.IsMoving() || IsAxisRested(currentInputs)) return;
    This will prevent an idle opponent from moving when the controlling character is moving towards it. I'll add this as an editor option on the next major update.
     
    Last edited: Feb 11, 2022
  4. BurningHeroG

    BurningHeroG

    Joined:
    Aug 18, 2013
    Posts:
    33
    Hello @Mistermind ,

    I would like to know if it is possible to change the position Y transform and keep the player at that position until a button is pressed to change it back to the original position Y transform? I am trying to get my player to fly/teleport to a certain position on the screen and stay then stay and return when the button is pressed again. I am trying to set the position within the animation but the position is not being set. Do I need another script to do this, overriding UFE?



    Thanks
     
    Last edited: Feb 17, 2022
  5. MTegarAsta

    MTegarAsta

    Joined:
    Oct 23, 2019
    Posts:
    39
    Thanks for the advice, anyway I found that when you use Cinematic Move with Animation file when you pause the game the cinematic actually does not pause, I tried to disable the Animation then enabled it back when it unpause but it doesn't work, sure the animation stop when pausing, but when its unpause the cinematic it's kinda skipping and become unsync.

    EDIT: I found the solution
    Code (CSharp):
    1. emulatedCam.GetComponent<Animation>()["cam"].speed = 0;
    adding this in controlScript Whenever Pausing is happen
     
    Last edited: Feb 16, 2022
    Mistermind likes this.
  6. BurningHeroG

    BurningHeroG

    Joined:
    Aug 18, 2013
    Posts:
    33
    @Mistermind

    How can I make an animation play while a button is pressed then stop once the button is released? I am trying to make a dash that occurs when the button is pressed and held. The dash will stop when the button is released.

    Thanks
     
    Last edited: Feb 16, 2022
  7. BurningHeroG

    BurningHeroG

    Joined:
    Aug 18, 2013
    Posts:
    33
    @Mistermind

    I don't mean to sound impatient but is there any word on the two inquiries I posted here? I really would like to continue using UFE but if there is no solution please let me know. I am using UFE Basic.


    Subscribed to Patreon
    Thanks
     
    Last edited: Feb 18, 2022
  8. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    To make a character fly/float in mid air, you can use the "Ignore Gravity" under Move Editor -> General Options.

    There are currently no available function for teleportation out of the box. You can however code that yourself by using UFE Events:
    http://www.ufe3d.com/doku.php/code

    For example, you can use "OnNewAlert" to trigger a specific frame in the move where the character's position change and set the select frame under Move Editor -> Text Alert:
    Code (csharp):
    1. void Start() {
    2.  UFE.OnNewAlert += this.OnNewAlert;
    3. }
    I'll add teleportation to my TODO list.

    In order to link a move or cancel it into other stances, please refer to the documentation and template files:
    http://www.ufe3d.com/doku.php/move:chainmoves


    Edit: Unity forum is not allowing me to post the full code snipped.
     
    Last edited: Feb 18, 2022
  9. BurningHeroG

    BurningHeroG

    Joined:
    Aug 18, 2013
    Posts:
    33

    Ok. I will give that a try. How can I make a move like a dash that happens when you press and hold down a button then stop once the button is released?
     
  10. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    I sent you a discord invitation. There are more people there that can help you.
    You can also use UFE Forums: http://www.ufe3d.com/forum/
     
    Last edited: Feb 18, 2022
  11. Pixelroads

    Pixelroads

    Joined:
    Mar 15, 2015
    Posts:
    4
    As for the code to change GUIInterface thank you so much, it worked flawlessly, i really appreciate the help. As for the Video i found a work around changing the hit boxes but out of the box still doesn't work, maybe it is my version ( UFE2 Basic ) and you are testing a higher one that doesn't have the same issue, or is something with my install but regardless i solved it for me so thank you for your help.
     
  12. BurningHeroG

    BurningHeroG

    Joined:
    Aug 18, 2013
    Posts:
    33
    Hello all,
    I just made a small script to have the players position change on the Y axis. I would like for the player to stay at this position until they press a button returning them to the ground/original Y axis position. The script gives me no errors but does not move the player. Can some one here tell me what the problem with the script is?
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UFE3D;
    5.  
    6. public class SetPlayerPosition : MonoBehaviour
    7. {
    8.     // Start is called before the first frame update
    9.     void Start()
    10.  
    11.     {
    12. void OnNewAlert(ControlsScript player)
    13.         {
    14.  
    15.  
    16.             transform.position = new Vector3(0f, 200f, 0f);
    17.  
    18.         }
    19.  
    20.     }
    21. }
     
  13. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    That code would never work. You have a function inside a function, and the transform you are targeting is not the character's. Also, you must first learn how to subscribe to an event. OnNewAlert won't work by itself.
    Read more about events on this page: http://www.ufe3d.com/doku.php/code

    I also noticed that OnNewAlert is probably not the best event to handle this. Instead, use OnMove. Here is a code snipped on how you should do the code above (make sure you name the move that triggers this event "Teleport")
     

    Attached Files:

  14. xephis2024

    xephis2024

    Joined:
    Feb 26, 2022
    Posts:
    1
    I'm running into a couple issues. One is after my characters rotation keeps resting back to normal {looking away the opposite direction it should be) everytime I open it in the Character editor, is there a way to save the rotation so I don't have to retweak it to line up with my hitboxes each time? Second is an issue where I'm trying to set up a blockable area box for a move, but the box itself is not appearing in the scene. The hitboxes for the move are appearing and behaving as expected but I cannot see where the blockable area actually is.
    Thank you
     
  15. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    You should be able to update it going to Character Editor -> HitBox Setup, change the rotation and clicking on "Apply Changes". If that doesn't work, click on the character prefab under the Hierarchy, change the rotation from there, then click on Overrides -> Apply All.

    When you have the preview open, click on the inspector, select the character prefab and toggle "Preview All Boxes" under HitboxesScript:
    upload_2022-2-26_21-37-9.png
     
    Last edited: Feb 27, 2022
  16. Drymarti111

    Drymarti111

    Joined:
    Jun 23, 2013
    Posts:
    201
    Is UFE LITE with PUN multiplayer? Or how badly cut version it is?
     
  17. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    UFE Lite has no support for multiplayer. You will need UFE Standard for that.
    http://www.ufe3d.com/doku.php/prices
     
    Drymarti111 likes this.
  18. frothypants

    frothypants

    Joined:
    Jul 23, 2016
    Posts:
    17

    https://imgur.com/a/MU75qmd
    Tried posting this in the UFE forums but haven't heard back. Can anyone help me troubleshoot this? Every time I replace the robot kyle model with my own, they end up either way below the floor or with their hips aligned to the floor. Can't seem to figure out how to get the models to look like they're standing on the ground. Thanks!
     
  19. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    Hello, I don't think I've seen this post in the forums. I apologize if I missed it.
    The issue could be related to multiple things. Did you link the character's hitboxes to your model's transform?
    http://www.ufe3d.com/doku.php/character:hitbox

    The screenshot also seems to point out to some disparity in the stage's ground position. Did you try repositioning the stage's plane to match with the game's ground position?

    http://www.ufe3d.com/doku.php/global:stages

    Also, do you see any errors that could help in your console window?
     
  20. frothypants

    frothypants

    Joined:
    Jul 23, 2016
    Posts:
    17
    Thanks for getting back to me! No console errors and ground plane was set correclty. Not sure what it was but after deleting all hitboxes and starting from scratch it eventually fixed it. It must have been carrying over something weird from one of the two example characters I was using as a starting point.

    I'll update my forum post with the steps I took for anyone who finds it in the future.

    Unrelated but we're having another issue I hope you can help with.

    ** We're having is the Fuzzy AI breaking WebGL. I found this thread where it had been identified a few years back but wasn't sure if it had made it's way through your backlog yet. Is there a fix in place for this?

    http://www.ufe3d.com/forum/viewtopic.php?pid=8086#p8086
     
    Last edited: Apr 4, 2022
    Mistermind likes this.
  21. ShadowScarKnight

    ShadowScarKnight

    Joined:
    Apr 3, 2022
    Posts:
    1
    Hi there! I'm wanting to get into game development for a fighting game, and I came across this engine which sounds very promising! Especially with the updates it's been getting! I have read through this forum, and I feel like I might have missed some questions that might have already been answered, but I may as well ask just to be sure before I hop in:
    1) I know this will require Unity to work, but even if I buy say the Standard UFE2 version, will it work with the Free version of Unity? If so, will I be able to make a project I intend to sell with my own splash pages?
    2) Am I able to create my own custom health bars, timer box, etc? With emoting player portraits based on remaining health?
    3) I want the background to have destructible terrain, like in Fatal Fury where you can push an opponent into water or a trap to land a KO if you push them hard enough against the corner, is that possible?
    4) Is it possible to have customizable team matches? Say 3 vs 3, or 3 normal powered characters vs. 1 super powered character?
    5) Is there a story mode option to this engine? If so does it allow for custom AVIs to use as cutscenes?
    6) This fighting game I have in mind will have some comic-esque elements such as onomatopoeia popping up (ie "WHAM!" "BIFF!" "THOOM!") popping up around certain hits, as well as yellow boxes popping up as commentary for good combos or landing a super, is it possible to have such things pop up?
    I know this sounds like a lot but I would love to use this engine if this is all possible, just wanna double check! Thanks in advance!
     
  22. frothypants

    frothypants

    Joined:
    Jul 23, 2016
    Posts:
    17
    I'm not affiliated with the engine but have been working with it over the last few weeks.
    1) Yes, free version is fine. You will always have the "made by unity" screen with the free version but can add additional loading screens afterwards
    2) Yes, the emoting portraits will require some custom code.
    3) Yes, will require custom coding/scene creation using standard unity stuff
    4) There is supposed to be a beta version of this if you are a highest tiered patreon. I paid for that recently but haven't seen confirmation of the repo yet. This will likely require you to be very familiar with unity and C#
    5) Yes, yes
    6) Easy with another particle effect pack on the asset store.

    I'm not sure how familiar you are with unity or c# but to do any of these things you're looking to do well, it will require a strong knowledge of both. Don't expect this engine to have an easy to use GUI to customize these things you're looking for. That said, if you are making a fighting game, you won't find a better option out there that handles all of the fighting mechanics for you.
     
    Mistermind likes this.
  23. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    I believe this issue was never fixed due to a limitation caused by a change on the WebGL format that goes beyond our control.

    There is a feature under the Global Fuzzy AI options that was suppose to serve as a work around called "Multi Core Support" but due to an update, WebGL no longer allows for single threads CPU.

    I'll try reviewing this feature on the next update.
     
    Last edited: Apr 11, 2022
  24. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    New video tutorials are now available:






     
    Last edited: Apr 12, 2022
  25. MTegarAsta

    MTegarAsta

    Joined:
    Oct 23, 2019
    Posts:
    39
    hey, is there a way to preload the player and the move set script? I see this feature in the old version but not in the newer version because right now the game will freeze for a moment when the game started and it kinda ruined the multiplayer being not started at the same time on each client.
     
  26. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    Under Character Editor -> Character Prefabs there is an option called "Loading Method". Switch that to "Resources Folder" then write the path to the prefab file starting from the Resources folder.
    Example: If your character is located under Resources\Characters\MyCharacter, you should write Characters\MyCharacter.

    Second, under Character Editor -> Move Sets, use "Stances (Resource)" instead of "Stances (Preloaded)" to load your move sets. Click on "Create Empty Stance File" (or "Export Stance" if you already have a preloaded stance) and use the same example as above to dynamically load your stances. Make sure you delete the preloaded ones after converting it.
     
    Last edited: Apr 13, 2022
  27. MTegarAsta

    MTegarAsta

    Joined:
    Oct 23, 2019
    Posts:
    39
    Still the same result, it's probably something related to this. my idea is to spawn the players first then wait for a half-second then change the screen from loading to Battle before the game started, but I don't know how to do that, also don't know how to sync between the clients as well so they start at the same time, or probably is there any a better way?
    upload_2022-4-14_14-44-5.png upload_2022-4-14_14-45-43.png
     
  28. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    I'm sorry, I think I misunderstood your question.
    Preloading shouldn't really cause any desync between clients. In fact I strongly recommend not adding anything related to a timer inside these scripts unless you fully understand how the internal multiplayer components work.

    As for possible desync causes, if your game has rollback netcode enabled, make sure you run the map recorder on all of your characters and enable "Use Animation Maps" under Character Editor -> Move Sets.
     
  29. fablefox

    fablefox

    Joined:
    Jul 6, 2021
    Posts:
    4
    I'm not sure if this question was asked before, but can this tool be used to make "Sifu" style fighting game?

    Or at least Tekken 3 Force Mode (
    )

    Or is it 1v1 only ?
     
  30. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    UFE 2 only supports 1v1. There are plans to have support for Beat 'em up style on UFE 3, but I don't have an ETA at the moment.
     
  31. omoidearcade

    omoidearcade

    Joined:
    Jul 20, 2020
    Posts:
    4
    Hi!

    I am trying to play around in the 3d fighter and the character's hitboxes are appearing at the root. I tried to look for the animation map setting under the character editor and moveset tab but can't seem to find it, is there a fix for this? It adds animation maps during the game but can't seem to find where to turn it off.

    Thank you in advance.
     
  32. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    There are a few reasons this could be happening.
    First, if your character is using another character's hitbox setup, there might be missing body parts not assigned to your character's rig.
    For more on how to setup your character's hitbox, check out this page:
    http://www.ufe3d.com/doku.php/character:hitbox

    Also, watch this new tutorial series explaining it step by step (check the full playlist):


    Secondly, make sure you have the animation map toggle disabled under Character Editor -> Move Sets:
    upload_2022-4-17_15-27-22.png
     
    Last edited: Apr 18, 2022
  33. omoidearcade

    omoidearcade

    Joined:
    Jul 20, 2020
    Posts:
    4
    Thank you for the reply!
    I tried setting up the hitboxes manually but seems like it keeps spawning at the root no matter what I tried to do.
    I reloaded the sample and tried looking at the RobotKyle3D and Ethan3D prefab to see how it works on them and seems whats happening is everytime I open up the hitbox setup from the character editor and save it, it messes up the hitbox. Only when I open up their hitboxes from the editor it seems to mess it up...
    About the animation maps, sorry I think I made a mistake, seems like I don't have that option since I just have UFE standard.
     
  34. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    Humm. Try creating a move set from scratch instead of using the templates available, see if that works. Also, try saving the prefab changes from the prefab editor itself instead of using the character editor.
     
  35. omoidearcade

    omoidearcade

    Joined:
    Jul 20, 2020
    Posts:
    4
    I tried creating a moveset from scratch, make the moves from scratch, and saving the hitbox from the prefab editor and it works fine now!
    Thank you for the help!
     
    Mistermind likes this.
  36. gamesbydre

    gamesbydre

    Joined:
    Nov 25, 2014
    Posts:
    58
    Hello! I am on the verge of purchasing UFE Pro edition, but I need more clarification on some of the details from the main page. On your comparison page of all of the editions, you have a row for "Unlimited seats". What does this mean, or how many seats does the pro version come with? Is the seats some sort of licensing issue where we can only use a certain amount of downloads?
     
  37. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    Unlimited seats works the same as the "Muti Entity" license provided by Unity:
    https://support.unity.com/hc/en-us/articles/360039447411-What-does-Multi-Entity-Single-Entity-mean-
    https://forum.unity.com/threads/new-asset-store-license-single-multi-entity.821226/
    https://www.monkeykidgc.com/2021/03/unity-asset-store.html

    In short, this license is used by large teams or corporations so they can share the source code among team members. It costs about 3 times the price of the product, but if you choose to pay the patreon tier 4 (after acquiring UFE 2 Source) you'll have access to the repository plus authorization similar to that license (without the need to pay the extra fee).
     
    Last edited: Apr 26, 2022
  38. xeye

    xeye

    Joined:
    Jun 25, 2013
    Posts:
    37
    I did a search but having a hard time finding answers, very basic question - how capable/good of an experience is it using this engine to make a real-time multiplayer online iOS-only game? Does it basically just handle this out of the box - are there posters in this thread who have successfully done this & can provide insight into what their experience was like? Also are there any examples on the iOS store that can be pointed to? Thank you for your time.
     
  39. shanu12joshi

    shanu12joshi

    Joined:
    Aug 11, 2020
    Posts:
    2
    Hey Mistermind, Is this package still working? If yes in which version?
     
  40. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
  41. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    You can take a look at our "Showcase" forum section:
    http://www.ufe3d.com/forum/viewforum.php?id=2

    As well as a youtube playlist:
    https://www.youtube.com/playlist?list=PLlcOmi7_IKT2Qw6jA8cQfB5GMXf6s9II3

    Its hard to say what games are available out there using the engine, but you can try searching for "fighting game" on the iOS Store.
     
  42. yewol

    yewol

    Joined:
    Aug 2, 2018
    Posts:
    9
    Hi Mistermind,

    I was wondering if it was possible to integrate realistic 3D physics in UFE without breaking it.

    We are looking at various packages like Puppetmaster, Final IK, or even other Physics engines (like Unity Dots). Can they really be integrated with UFE?

    Would you recommend us to use UFE as a foundation for our game if we plan to have a 3D realistically-looking physics in our game?

    Very keen to have your thoughts!
     
  43. xeye

    xeye

    Joined:
    Jun 25, 2013
    Posts:
    37
    Thank you for your response. I tried to register with your forum last week but I am still waiting on a confirm/acceptance so that I can post over there.

    I understand your answer, and just to double down on my question - the project that my team wants to build will center around a 1-on-1 realtime fighting game on iOS, can you provide any insight into the feasibility of this with your framework? Considering that most people won't be using wifi, or bluetooth - is it worth to go down this route, or should I seek other options? Thank you-
     
  44. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    Might be hard to integrate a different physics engine onto UFE. UFE uses custom physics and deterministic math to synchronize network games:
    http://www.ufe3d.com/doku.php/global:netcode
     
  45. frothypants

    frothypants

    Joined:
    Jul 23, 2016
    Posts:
    17
    xeye likes this.
  46. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    I'm sorry to hear that. Unfortunately my time is a bit limited (RL issues) making it hard to provide a more personal support atm. You can however ask for help in the discord or our Job forum. There are several developers in the community who are just as experienced and more than willing to help with UFE and Unity.

    That said, I just replied to your post in the forum. Hope my input helps.
     
    Last edited: May 13, 2022
  47. yewol

    yewol

    Joined:
    Aug 2, 2018
    Posts:
    9
    Hi Mistermind,

    We recently bought UFE Standart and noticed that we can't build a webGL build. It relates to this issue http://www.ufe3d.com/forum/viewtopic.php?id=1983 which is still unsolved 3 years later.

    We tried with different versions of Unity without success.

    What would you recommend?

    If no update is planned on this topic, can we get a refund of the solution please?
     
  48. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    As far as the last release goes, unless something recently changed on how WebGL or Unity operates, it does work:
    http://www.ufe3d.com/demo/ufe2/webgl/

    That said, I'll run some tests myself and get back to you on this.
     
  49. Mistermind

    Mistermind

    Joined:
    Jun 8, 2013
    Posts:
    844
    I just ran some tests, and the Random AI works. What I believe is happening is that the demo automatically sets the AI to Fuzzy, and you have to change it in the options menu:
    image (1).jpg
    (You can change these in the templates)

    As for the Fuzzy AI, the issue is a lot more complicated than it sounds. WebGL builds limits the use of multi-core CPU causing unintended behaviors to the emulated cognitive system we built for Fuzzy.
    I'll keep running more tests, but due to its nature and debugging limitations, I can't say for a fact that I'll have an answer for it soon.
     
  50. frothypants

    frothypants

    Joined:
    Jul 23, 2016
    Posts:
    17
    I haven't had the chance to dig into it too much more but it looked like there were just one or two places that threading is being used to make the best fuzzy ai decision. Since WebGL isn't supporting threading I think you'd need to switch those threaded computations to a coroutine or something like that. Or revert to an older version of fuzzy ai that maybe doesn't use threading.
     
    Mistermind likes this.