426

(14 replies, posted in UFE 1 Source (Deprecated))

You're better off with UFE and modding it to your needs  - which would only be fatalities, everything else you mentioned is either already included or coming in an update very soon.

427

(1 replies, posted in UFE 1 (Deprecated))

www.ufe3d.com, then scroll down to Navigation and click Installation.
(direct link: http://www.ufe3d.com/doku.php/installation)

I'd bookmark this page.  I was coming here about 5 times a day in my first few weeks getting to know UFE wink.

428

(4 replies, posted in UFE 1 (Deprecated))

Check this post, which I suspect is the same issue.  Essentially, you need to make sure you have a collider mesh as the ground plane, set in correct position, and layer set to Ground.

429

(4 replies, posted in Tips & Articles)

For your animation question, as long as you don't trigger that animation, missing said animation should be fine.  You can see this by disabling Parry and removing all parry related animations.  Same should work if you remove bounce animation and ensure no attacks cause bounce.  There might be an issue with a couple standard animations that you never see, but using a default animation for that should work as a quick fix.

-----------

The way I see it, there's three things from Smash you'd want to look into.  Attack/combo system, health/percent system, and the platforming system.

Attack/Combo system
The attack/combo system should be fairly easy to copy, with minimal code changes.  It's mostly your attack data, and a low-ish movement friction.  If you want DI for falling characters, you'll need to alter code in ControlsScript for that (it is a bit of work, but shouldn't be too hard).  You'll probably want to add a new variable in CharacterInfo's PhysicsData for DI (controlling how much influence they have with DI), and use that in the ControlsScript DI code.

Additionally, check this post about editing the combo counter to be live updated instead of after the combo finishes.  If you want to be exactly like Smash, you can remove combo text display altogether.

Health/Percentage System
For the health system, you'll definitely need to alter code, and you'll also need to integrate it into the knock back physics of each character.  Essentially it's a new health system.  I'd create a new variable for hit percentage, don't use Life Points as that could create more issues.  Those variables should be added to CharacterInfo, but you'll need to change corresponding functions in ControlsScript (each hit adds percentage instead of damaging Life Points, and percentage also affects knock force).

Oh, and slightly related would be the rounds system tweaked with stock/time instead.  Unless you want unique stock values for each character, I'd put this into a global config class, probably Round Options.  While there, you can also change Spawn positions from float to Vector2 (for height) to prepare for platforms...

Platforming System
But to me, the hardest part is the platforming aspects (multiple platforms you can jump through from below, and the kill zones at far edges of the world space).  UFE is base on traditional 2D fighting game mechanics, which doesn't have multiple grounds.  You would need to completely alter how UFE handles jumps and registers ground states.

For the killzone, your best bet is to create a manager that tracks all on-screen character's positions and just triggers appropriate KO animations/functions when they reach stage limits (which you'd have predefined in the manager script - could also be specific to the stage).  You won't be able to use Unity's OnTrigger since there are no rigidbodies / colliders on UFE characters (hitboxes aren't colliders).

-----------

Looking at the video MisterMind posted on Unity forums, they managed to get everything except the multiple platforms bit.  However, they got the killzones (at least at the bottom), so that's a good start.

There's also this post from PsychoGames a while back.  He's made a small start by looking at IsGrounded() in PhysicsScript (where I'd start looking to), but not sure of his progress since.

Honestly, each of these systems is pretty much worthy of their own thread!  Normally, I try testing ideas myself and posting my findings.  But "make UFE like Smash" isn't a 10 mins coding task tongue.  It's likely going to take a while to get everything working right.  If you can design your game to work without multiple platforms (like the video), then it's probably not as daunting a task since you're not not altering so much base code.

Good luck!  If you're desperate, or get really stuck, keep posting here and I'll try to pitch in where I can.

430

(69 replies, posted in UFE 1 (Deprecated))

You will need to open all moves in 1.1 so UFE can process them with the new system.  And this is just the first time, so it's a once only action.  But other than that, you won't need to redo hitboxes or anything.

I'm not 100% sure about global config and character files, but at worst the same applies.

Yeah, I thought you might have already considered mobile friendly assets.  I was posting more to cover all bases and help others that might be having issues. wink

There's a story mode with a new loading screen, that's scheduled for released once Unity 4.6 is released.  So it might be worth holding out for that if your project isn't due anytime soon (we're all waiting on the Unity 4.6 GUI update, basically).

I've done a few tests with vanilla UFE on iOS (iPhone 4, running iOS5.1.1).

The very first time it built to the device, the load time was 20 seconds or so.  But every other time since, it's been between 3-7 seconds.  I thought I saw an improvement when I turned stripping level to full, but my results aren't consistent (I can get 3 second load times without any stripping).

Now, keep in mind my testing is with default project and no touch screen controls.  So I can't actually play the game once it's loaded, just tap on character select and menu options.

If your results are similar to this (for your game, not a vanilla build), then I would say this is just how UFE performs on mobiles for now. 

The long load time on first build is something I've seen in my non-UFE mobile projects too.  It usually only happens early on in development (and only just on the first install of a clean build), before I had any real optimisation to the scenes (just a loading scene, which is highly recommended for all mobile titles).

Another thing you'll want to look into, if you're not already doing it, is draw call reduction.  This will definitely help keep fps smooth during gameplay, but I'm not sure how much it will help your black screen load problem (I suspect maybe just a little).  The base game with Mike and Kyle fighting is about 220 draw calls.

To test this, I also added a mobile friendly character (copied Kyle's character file), and changed the stage's shader to be mobile friendly.  I saw a dramatic improvement in draw calls just from that alone, but it was still around 30 average.  The biggest contributor to draw calls (aside from having many texture's per character) is OnGUI().  In the editor, just disabling all UI items you will see nearly all other draw calls drop suddenly.  But of course, you'll have no life bars or text notifications.  So you'll need to come up with your own solution (or use convert them to NGUI).

Oh, you're building to mobile.  That makes a big difference.

Let me try building to iOS.  It's been on my to do list for a few days now, so it's about time I tackled it wink.  I'm in +11 GMT, so hopefully you'll see something by the time you get up (I'm assuming you're in a US timezone).

Since it does look like it stuffs the camera, I would revert your UFE.StartGame back to default, and wherever it's called send a fadeTime of 0.  You'll get the same effect and shouldn't have any issues.

As for the other stuff, it's strange both you and your boss have had these delay issues since the start.  I would say your UFE is messed up at a guess, since that's not how it's supposed to behave.

Lets test a new clean vanilla build.  Start a new Unity project, go to Asset Store and re-download UFE and import the package.  If you still get the delays with this vanilla version, then the problem must be your computer.

What is the specs of your machine, btw?  And what version of Unity are you running?

This is a fairly hard one to answer without seeing the project for myself.  But let's try and see what we can find smile.

  • Is this delay only on your custom project and not on vanilla UFE?

  • Is the delay also present when using Start Game Immediately option in Global Config? If no, then this would mean it's not the characters/stage that's causing the issue, could be one of the select screens.

  • Have you made any modifications to default scripts?  I see you've done something to ControlsScript, which is probably the most likely offender here as you've noticed.  Any other changes to it?

  • Do your characters have large move sets?  This is probably the only thing I can think of, outside of modding, that could cause such a delay.

  • Have you done any isolation tests?  i.e.: load with your stage, but use default UFE characters; load with default UFE stage and your characters; both with/without start immediately option…

Essentially, I'm trying to figure out what could be causing the delay.  I'm hoping it's not something specific to your machine (running out to hdd wink), since I've never noticed any lag issues on my projects.

Simple way, but you'll have portraits at default size:
In the Inspector for the CharacterSelectScreen object, the Characters Grid, Grid Columns and Grid Rows are what controls the layout and size. 

Default grid is 4x2, so if you changed it to 3x2, you should see the default four characters take up two rows (Kyle gets pushed to 2nd row). 

If you want to go larger than default 8 character grid, you'll also need to change the Characters Grid width and height to compensate.  By default, it's only large enough to view a 4x2 grid, but if you changed the height to 335 or so, you'll get another row.  Of course, you'll probably want to adjust the x and y positions as well, as it's aligned from its top left corner, so won't be centred on screen.

Slightly harder method (involves coding), but you'll get full control over the portrait size:
This is actually fairly straight forward. In CharacterSelectionScript.cs, look for the OnGUI() method, and find these lines:

            foreach(CharacterInfo character in UFE.config.characters){
                float xPos = 96 * xCount;
                float yPos = 114 * yCount;

                xCount ++;
                if (xCount == gridColumns){
                    yCount ++;
                    xCount = 0;
                }
                GUI.DrawTexture(SetResolution(new Rect(xPos, yPos, 86, 105)), character.profilePictureSmall);

In the last line, see the 86 and 105 embedded inside the GUI.DrawTexture() call (it's in the Rect() part)?  That's the size of each portrait.

Near the top, the xPos and yPos are the size of the character portraits with a buffer.  And we know the portrait size, so we can also work out there's a 10 pixel buffer for width, and 9 pixel for height.

I suggest exposing these variables to the inspector to make it easier to edit on the fly.  Since these are done in OnGUI(), you can change them on the game object's inspector while the game is running too, to see what values suit best.

Good luck!  I'd love to see your screen shot of 75 characters once you get them all in!  Filling in the roster must be tedious O_O

437

(3 replies, posted in UFE 1 (Deprecated))

Oh, yeah.  I forgot to mention.  For this script to work, the weapon bone can't be animated.  So it must be just a static child of the hand bone.  The hand effectively does the weapon's animation.

This will be fine for swords.  But things like bo staffs or nun chucks, where they can move within the hand, it wouldn't work out of the box. 

Accommodating animations should be possible.  If you get stuck on implementing it, post back here and I'll see if I can figure it out.

438

(3 replies, posted in UFE 1 (Deprecated))

The auto mirror option mirrors the animations only, not the rig itself.

To enable weapons swapping between hands when the characters mirror (like Vega's claw in SF2/SF4), you'll need to create your own script for it.  It's a hack, but the below script does work.

using UnityEngine;
using System.Collections;

public class WeaponSwapper : MonoBehaviour {

    public Transform startSide;
    public Transform otherSide;

    private Quaternion origRot;

    private ControlsScript myCS;

    // Use this for initialization
    void Start () {
        myCS = GetComponentInParent<ControlsScript>();
        origRot = transform.localRotation;
    }
    
    // Update is called once per frame
    void Update () {
        if (myCS.mirror == -1) {
            transform.parent = startSide;
            transform.position = startSide.position;
            transform.localRotation = origRot;
        } else {
            transform.parent = otherSide;
            transform.position = otherSide.position;
            transform.localRotation = origRot;
        }
    }
}

Attach it to a weapon and assign the transforms for left/right hands to startSide and otherSide in Inspector.  If your weapon's centre isn't at the point of the transforms or you have an offset from the left/right hands, you'll have some offsetting issues when swapping.  Either correct the offset in your 3D package, add more transforms (empty parent for weapon, another for location), or edit the script to cater to that as well.

Be warned this is a very inefficient way of doing this.  You'd probably want to edit ControlsScript itself to handle this during the mirroring functions for a better solution.

439

(69 replies, posted in UFE 1 (Deprecated))

We're still in debugging phase, so it's hard to tell exactly when.  But it should be soon now.  Sit tight! smile

440

(9 replies, posted in UFE 1 (Deprecated))

Ah, damn.  OK, your best bet is to create your projectile as a particle effect that is independent of direction.  Look into Unity tutorials on how smoke trails and jet engine boosters are done using the Shuriken particle system, I think that's a good basis to start with and should translate easily to creating basic projectile.

It won't look like your 2D one though, but will work nicely in any direction.

441

(9 replies, posted in UFE 1 (Deprecated))

That is correct, projectiles do not mirror. 

Test your projectile in Scene view by dragging it around:

  • If trail follows behind it correctly, then you're fine.

  • If the trail does not follow behind and stays in set orientation, either modify particle effect so it follows behind or you'll need to modify some code to get it working.

Looking at ProjectileMoveScript.cs, I think adding:

transform.localScale = new Vector3(transform.localScale.x * -mirror, transform.localScale.y, transform.localScale.z);

// below line is in case angled projectiles don't mirror correctly
transform.localEulerAngles = new Vector3(transform.localEulerAngles.x, transform.localEulerAngles.y, transform.localEulerAngles.z * -mirror);

in the Start() method just after the transform.Translate() line should work.  But depending on how your projectile is generating its effect, this might not be enough for it to look right.  Yours looks to be 2D, so this might work for you.  Just make sure the pivot of the projectile object is the middle of the ball part and not the flame part.

EDIT: added line for angled projectiles.

442

(3 replies, posted in UFE 1 (Deprecated))

OK, I wasn't satisfied with my findings yesterday and since ProCore is on sale, I figured I'd grab it and try again.  Still got the same results, so started looking online if anyone else had prefab issues with ProBuilder.  Turns out, you need to call ProBuilder.Instantiate() instead of Unity's Instantiate().  This makes more sense, and it allows you keep their nice functionality along with prefabs. 

So yeah, ignore my previous post, this one has the proper solution smile.

I managed to get it working by editing the UFE.cs script.  Find:

        if (config.selectedStage.prefab == null) 
            Debug.LogError("Stage prefab not found! Make sure you have set the prefab correctly in the Global Editor");
        GameObject stageInstance = (GameObject) Instantiate(config.selectedStage.prefab);
        stageInstance.transform.parent = currentScreen.transform;

and change it to:

        if (config.selectedStage.prefab == null) 
            Debug.LogError("Stage prefab not found! Make sure you have set the prefab correctly in the Global Editor");
        GameObject stageInstance = (GameObject) Instantiate(config.selectedStage.prefab);
        pb_Object stagePBComp = stageInstance.GetComponentInChildren<pb_Object>();
        if (stagePBComp != null) {
            Destroy (stageInstance);
            stageInstance = ProBuilder2.Common.ProBuilder.Instantiate(config.selectedStage.prefab, Vector3.zero, Quaternion.identity);
        }
        stageInstance.transform.parent = currentScreen.transform;

This is a very hacked up workaround, but it will work.

443

(9 replies, posted in UFE 1 (Deprecated))

Ah, I think I figured this out.  Do you have your Right Hand assigned in your hitbox set up?  The projectile is trying to instantiate from the right hand, but if no right hand has been assigned then it will default to world 0 on instantiating.  I just tested my projectile by assigning to Custom 7 which isn't assigned to anything and got the same results in your video. wink

Since you have two heights of fireballs, my guess is the yellow one isn't a prefab at world 0?  Check all child objects of your prefab.

444

(7 replies, posted in UFE 1 (Deprecated))

Ah, yes.  If you drag into the Scene window, it won't be at world 0.  But if you drag it into the Hierarchy window instead, it will be at its prefab position.  I've made it a habit to drag things into the Hierarchy instead of Scene window, so didn't realise others could be dragging into the Scene window wink.

445

(3 replies, posted in UFE 1 (Deprecated))

I picked up Prototype yesterday, so thought I'd give this a try.

Prototype (and I assume ProBuilder as well) uses their own system for generating the meshes.  This is good, in that it helps them create a nice fast and simple workflow; but bad for us because when we try to create prefabs out of it it just doesn't work like you'd expect.

From what I could figure out, it looks like Probuilder needs to export the mesh for you to be able to save as a prefab.  The only way I could get it to work in Prototype:

  • Make your Prototype mesh, then goto Tools -> Prototype -> Actions ->Make Asset, to put the mesh into the heirarchy.

  • Then Actions -> Strip all pro builder scripts in scene.  This will remove it from their system and make it a normal Unity game object.  Without this step, Prototype will take control of the mesh when the prefab is Instantiated into the scene and you won't be able to see it or add the mesh data into it.

  • Rename Mesh and drag into Project folder to create prefab.

  • Delete scene mesh.

  • In Project folder, look at prefab and you'll see it's missing the mesh data in Mesh Filter component.  But you should have that mesh data in your Assets folder (mine was pb-Cube[Detail]-XXXXXX, so look for a similar name).  Just drag that into the prefab's missing spot.

After that, just making sure you've copied the ground Plane from the Training Stage, and it should come up as a level.  I was able to get this to work, but the workaround just felt really dumb to do.  Not to mention that having removed all Probuilder scripts means you can't edit the mesh again.  Which completely destroys one of the key features of Probuilder. 

I'm hoping this is just a Prototype limitation and not in Probuilder as well.  I can understand them wanting to keep major features out of the free version, but this makes it practically useless if we can't prefab their meshes.  I'm sure I'm missing something, but what ever the step is it's not entirely obvious...

446

(7 replies, posted in UFE 1 (Deprecated))

Yep, I've had the vertical issue before.  It's due to the plane not being in the exact right spot.

Is your default training stage messed up as well (like in video)?  If so, you'll need to reimport that asset.

I don't have the facility to make a video, but it it's pretty straight forward.  The Plane GameObject needs to be at world Y=0.  If lower, you get the vertical issue;  if higher, you get characters falling through the stage.

Also check it's aligned with in Z 0 (the default plane is fairly deep, so you can move it between Z -12 to Z 12 or so and you'll still be OK).

See how you go, I can take some screen shots if you still need help smile.

447

(7 replies, posted in UFE 1 (Deprecated))

When you say jump vertically, do you mean they can't jump forward/back, or something else?

Check your Input Options.  If you're using Unity Input Manager, you'll need to map all your inputs there.  Not sure of cInput workflow, but I imagine it's similar or slightly easier.

Due to all those inputs, I've found it's far less work to just copy the default UFE_config file and edit it as you need for your own project.

449

(3 replies, posted in Animation)

It looks like a transform position issue in Max.  I haven't used Max in a while, but in Blender there's a common issue where if something is not at origin then it's offset during movement.  You just need to apply it's position to fix it.  Not sure what the Max equivalent would be though.  Hope this helps at any rate.

Do you mean you edited the global editor file to make your own, or that you created a fresh global config file?