1

(25 replies, posted in Tips & Articles)

Ah, yeah, looks like the image host I used is no longer around. I definitely don't have those screenshots anymore, but it looks like UFE has built in 2d support now so you should probably use that instead of my archaic workaround

2

(25 replies, posted in Tips & Articles)

camtheman wrote:

What software did you make the 2D sprite examples with?

Well, it was filmed, green screened in premier I think, touched up in photoshop, and sprite sheets were created with texturepacker.

mizael86 wrote:

Hi, I'm sorry to relive this post, I'd like to know how you did to put shadow on a 2d sprite. I was able to do what you did there, but I could not place that shadow.

Hm, not sure what I did differently. I think they just work from the directional light in my scene

Sorry for the late replies. Not on here too often these days.

Yeah, why not just disable the weapon element for the duration of that animation?

4

(25 replies, posted in Tips & Articles)

That could be so many things, and I don't really have the time to play guess that bug, but I would love to help. If you pack up your project and PM me a link to download it, I will be more than happy to take a look.

5

(25 replies, posted in Tips & Articles)

Could be a ufe update or something else I'm not really sure.  I'll take a look in the next couple days.

6

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

Your light culling mask should look like this. First click 'Nothing' then click 'Player'. Your player prefab should be set to the 'Player' layer. The included UFE characters are already set this way if you need an example.
http://i.imgs.fyi/img/3b80.png

7

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

Create lights that only light the "Player" layer and make sure you player prefab layer is also set to "Player"

A useful feature. In our game, we used to have it switch player stances depending on your health, and each stance had various moves available

9

(25 replies, posted in Tips & Articles)

I tested this with the included UFE characters. Under each bone I created an Empty Object and assigned the hitboxes to that instead of the actual bone. I then went back to an included animation and moved that object around. This way, the animation looks the same but your hitbox is moving around the screen where you like. Worked in game, so should work just fine for you. As for the animation file controlling the size of the hitbox, I don't know. UFE usually handles that in the character config or the active frame section for the attacks, and haven't messed with them outside of that. Could try scaling the object and see how that goes.

10

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

Ok, after a few days of back and forth with this, we've found the solution to the problem.

In UFE.cs find this function

private static void _StartGame(float fadeTime){

and find this line at the end of that function

UFE.PauseGame(false);

Right after that line, add this line

UnityEngine.SceneManagement.SceneManager.SetActiveScene(UnityEngine.SceneManagement.SceneManager.GetSceneByName(stageScene));

11

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

We're entering the realm of hard to say what the issue is without looking at your stuff.

Where is the white light coming from in the in-game shot?
What environment light source are you using (skybox/color/gradient)?
If you're using color, is it also overriding the base stage setting?

This does work, just need to figure out what's not set right
http://i.magaimg.net/img/2g9f.png

12

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

Steviebops wrote:

Thanks, that's all working for me, more testing to do, but looks really good so far.

Cool. glad I could help. Lemme know if you have any other questions

13

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

At the beginning of the file where everything else is declared is what I have

public static string stageScene;

Also, in EndGame() I have this

       if (gameEngine != null) {
            GameObject.Destroy(gameEngine);
            UnityEngine.SceneManagement.SceneManager.UnloadSceneAsync (stageScene);
            gameEngine = null;
        }

14

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

I never know how much code is ok to post, but here's my whole PreloadBattle block

public static void PreloadBattle(float warmTimer) {
        if (UFE.config.preloadHitEffects) {
            SearchAndCastGameObject(UFE.config.hitOptions, warmTimer);
            if (UFE.config.debugOptions.preloadedObjects) Debug.Log("Hit Effects Loaded");
        }
        if (UFE.config.preloadStage) {
            //#if !UNITY_EDITOR
            print(UFE.config.selectedStage.stageName + " STAGE");
            Material newSkybox = UFE.config.selectedStage.stageSkybox;
            RenderSettings.skybox = newSkybox;
            Color newAmbientColor = UFE.config.selectedStage.stageColor;
            RenderSettings.ambientSkyColor = newAmbientColor;

            switch (UFE.config.selectedStage.stageName) {
                case "Titan's Alley Clear Day":
                    print ("switch for Titan's Alley Clear Day");
                    stageScene = "TitanClearDay";
                    break;
                default:
                    break;
            }
            UnityEngine.SceneManagement.SceneManager.LoadSceneAsync (stageScene, UnityEngine.SceneManagement.LoadSceneMode.Additive);
            //#endif
            //#if UNITY_EDITOR
            //SearchAndCastGameObject(UFE.config.selectedStage, warmTimer);
            //#endif
            if (UFE.config.debugOptions.preloadedObjects) Debug.Log("Stage Loaded");
        }
            string p1Char = UFE.config.player1Character.name;
            string p2Char = UFE.config.player2Character.name;

        instance.StartCoroutine (instance._PreloadCharactersAsync (warmTimer));

        if (UFE.config.warmAllShaders) Shader.WarmupAllShaders();

        memoryDump.Clear();
    }

You can ignore the end, where I butcher the character loading. We have to handle characters differently so that's all changed. I also don't remember what the original code looks like, which is part of why I asked you to send me yours, but that's ok we'll work with what we have.

The important stuff is everything in the preload stage block. You can also ignore the skybox and color settings -unless- you want to set those through the editor per stage, but we can deal with that later. I used to, but don't anymore and haven't taken it out.

Abuse print statements. It will at least help me figure out where the code is getting to before doing nothing. You should probably put one in the default section of the switch, too, so you know if that's getting called ie nothing is getting called. Since I don't know where your code is not working, I'll run through the obvious fixes and we'll go from there.

Make sure your switch case is named properly in the code, or nothing will happen
http://i.imgs.fyi/img/2azc.png

Make sure your stageScene is named properly in the code, also.
http://i.imgs.fyi/img/2azd.png

Last, make sure the scene is included in your build list. Order doesn't matter, and you don't have to build, just has to be in the list
http://i.imgs.fyi/img/2azg.png

If it's still not working, try to give me a detailed post like this with some screenshots of your stage settings and the print results of your console so we can see where it's stopping, otherwise I'm just guessing.

15

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

Steviebops wrote:

The UFE class is unchanged from the vanilla version. The code above is the only addition.

OK I'll try to take a look today and get you sorted.

16

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

Steviebops wrote:
if (UFE.config.preloadStage) {
            switch (UFE.config.selectedStage.stageName) {
            case "Your Stage Name":
                stageScene = "YourSceneName";
                break;
            default:
                break;
            }
            UnityEngine.SceneManagement.SceneManager.LoadSceneAsync (stageScene, UnityEngine.SceneManagement.LoadSceneMode.Additive);
            #if UNITY_EDITOR
            //SearchAndCastGameObject(UFE.config.selectedStage, warmTimer);
            #endif
            if (UFE.config.debugOptions.preloadedObjects) Debug.Log("Stage Loaded");

I can't seem to get this working. No errors on the code, but it won't load the new scene for me, it just stays in whatever scene Im in.

Wrapping up another project right now but I'll take a look and see what I can do for you. Any chance you can pm me your preloading section of code so I can take a look?

17

(25 replies, posted in Tips & Articles)

xFTLxKingPhoenix wrote:

welll I made the sprite sheet.

I'm bascially on #4 how do you make the animation

Did the second writeup help you, or are you still stuck?

18

(25 replies, posted in Tips & Articles)

Let me know if this doesn't answer your question.

1. Create an animation file, drag it to your prefab, and in the Animation window click the dropdown and choose your animation (or it'll already be selected if you haven't done this yet).
01

2. Click Add Property, twirl down Render, Sprite Renderer, all the way at the bottom hit the plus sign next to Sprite.
02

3. Select all of the sprites in your spritesheet for this particular animation and drag them into the Render:Sprite section of your animation. Delete the last keyframe and adjust your Samples to an appropriate number (hit the Play button on the Animator and adjust until it looks right; we use 30 but we have a ton of frames).
03

4. If you have a material, add it using Render, Sprite Renderer, Material Reference, and drag the material to the first frame of your animation like you did with the sprites.
04

5. Your animation works now in the game, you just need to animate the hitboxes. Make sure you hit the record button, and on each frame of animation adjust the hitboxes to match your character.

19

(25 replies, posted in Tips & Articles)

xFTLxKingPhoenix wrote:

welll I made the sprite sheet.

I'm bascially on #4 how do you make the animation

OK, when I get back to a computer I'll work on something a little more detailed.

20

(25 replies, posted in Tips & Articles)

xFTLxKingPhoenix wrote:

completely lost cant actually use the animations

If you can be a little more specific I will do what I can to help you out. Didn't really want to make a vid but I could if I have to.

21

(25 replies, posted in Tips & Articles)

kokakee wrote:

Hopefully a gameplay video will be available soon

We had it at the arcade a while ago and streamed it. I don't think the archive got saved, though hmm

22

(25 replies, posted in Tips & Articles)

kokakee wrote:

Is Dark Presence your game?

It's technically Doc's game but I work on it.

23

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

I haven't touched that, no; I just got our project updated to 2017.3 after being stuck on 5.6 for a long time.

24

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

Don't overthink it. Just create a new Enviro prefab for each stage and give it the settings you want. Keep that prefab in the stage scene and it'll load with the rest of it. Make sure you set Enviro to grab the camera on runtime using the MainCamera tag.

25

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

You only need a normal camera in your stage scene for testing purposes while working in that scene. Disable it before you save the scene to be loaded in game.

This is the basic code you'll need, find the first line in UFE.cs and go from there:

if (UFE.config.preloadStage) {
            switch (UFE.config.selectedStage.stageName) {
            case "Your Stage Name":
                stageScene = "YourSceneName";
                break;
            default:
                break;
            }
            UnityEngine.SceneManagement.SceneManager.LoadSceneAsync (stageScene, UnityEngine.SceneManagement.LoadSceneMode.Additive);
            #if UNITY_EDITOR
            //SearchAndCastGameObject(UFE.config.selectedStage, warmTimer);
            #endif
            if (UFE.config.debugOptions.preloadedObjects) Debug.Log("Stage Loaded");

I'm using a weather controller for skyboxes and such, but if you want to transfer the skybox and the ambient light, just add spots for those in the Stages section of the Global Editor and they can be called in this block, right before the switch using something like this:

            Material newSkybox = UFE.config.selectedStage.stageSkybox;
            RenderSettings.skybox = newSkybox;
            Color newAmbientColor = UFE.config.selectedStage.stageColor;
            RenderSettings.ambientSkyColor = newAmbientColor;