2.5D Small Fighting Game From Zero and I Need Your Help

hello, I’ve been using unity for 4 years, and I’m still learning until I can only think of a fighting game in my head 4 years ago and I can’t understand 100% with the codes, and I’m just going to make a small fighting game , so, here i am going to tell what you need, i am trying to make a 2.5d fighting game from scratch in c++ (a small 2.5d fighting game) i cant show the game nor reveal i just ask you to help me my game
you can send a video if you have an idea of the solutions
you can only send when you are bored or if you have the day off
I don’t force him to do it
why do you need to upload video? If you were wondering, it’s because sometimes I don’t understand when you write them without an image,
if i want to do like street fighter or mortal kombat, please,
here they are for empty code

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.InputSystem;

public class Fighter1 : MonoBehaviour
{

    void Start()
    {
       
    }


    void Update()
    {
       
    }
}

I already know how to make the player move but I don’t know what the original codes are to move a fighter1 and player2

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.InputSystem;

public class Fighter2 : MonoBehaviour
{

    void Start()
    {
       
    }


    void Update()
    {
       
    }
}

that if you can send the code,
I would appreciate it and I will continue.

you can use ryu or ken or scorpion or sub-zero in mixamo as an example.

Unity uses C#, not C++. That should make a big difference when you do your research.

Check out this:
https://learn.unity.com/project/2d-game-kit

1 Like

oh thanks, I’ll use the 2D Game assets Kit later to pass my characters in 3d because I’m going to do something else around the house like cleaning the floor throughout the house, now I’m looking for the detection of weak punch and medium punch and strong punch, I don’t want it to be weak punch and strong punch, I want all three I detect and also the kicks I don’t know what the original C# code is or make a video only in private so I can understand how to add the collisions,
after I show a picture of my way.

So the 2d game kit covers setting up a 2d character and also jumping and attacking, so that should include what you’d need to know about handling input, triggering animations, collisions, etc. That should make for a good starting point.

you can also do fighter 1 look at the opponent fighter 2 like this?

By the way, if I accidentally write in Spanish it’s because I’m Argentine and I translate it in google translate



sólo me preguntaba.

I’m sorry, what did I mean, I was just wondering.

I’m sure in the 2D game kit, the player character will face a different direction depending on what direction you’re moving. Use the same method except instead of changing the direction when the character is moving, compare the position (x,y) of the 2 characters, if character2’s x value is greater that character1’s x, then character1 should face the right side. If character2’s x is less than character1’s x then character1 should face the left side.

1 Like

when I was fighting the final boss I stood behind him and did not attack from behind, if I have to modify the code?

i would cheat with this

and that’s what I want to do, make fighter1 look at the opponent to fighter2 and fighter2 look at the opponent fighter1 I don’t know where I have to modify that.

I have to duplicate Ellen who is a fighter2 to do the test and since she didn’t know how to do it, do the code

I need help, I can’t find where it is, what to do to move the player.

using Gamekit2D;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;


    public class PlayerCharacter : MonoBehaviour
{
    protected Vector2 m_MoveVector;

    public float maxSpeed = 10f;
    public float groundAcceleration = 100f;
    public float groundDeceleration = 100f;
    [Range(0f, 1f)] public float pushingSpeedProportion;

    public float maxHorizontalDeltaDampTime;
    public float cameraHorizontalFacingOffset;
    public float cameraHorizontalSpeedOffset;
    private void Start()
    {
        if (!Mathf.Approximately(maxHorizontalDeltaDampTime, 0f))
        {
            float maxHorizontalDelta = maxSpeed * cameraHorizontalSpeedOffset + cameraHorizontalFacingOffset;
          
        }
    }

    public void SetMoveVector(Vector2 newMoveVector)
    {
        m_MoveVector = newMoveVector;
    }

    public void SetHorizontalMovement(float newHorizontalMovement)
    {
        m_MoveVector.x = newHorizontalMovement;
    }

    public void SetVerticalMovement(float newVerticalMovement)
    {
        m_MoveVector.y = newVerticalMovement;
    }

    public void IncrementMovement(Vector2 additionalMovement)
    {
        m_MoveVector += additionalMovement;
    }

    public void IncrementHorizontalMovement(float additionalHorizontalMovement)
    {
        m_MoveVector.x += additionalHorizontalMovement;
    }

    public void IncrementVerticalMovement(float additionalVerticalMovement)
    {
        m_MoveVector.y += additionalVerticalMovement;
    }

}

I don’t know what to do?

I have promised that I have to send an image of my version of putting hitCollider of weak and medium and strong because it is this
8495033--1130633--1106765-e978af3de2d02240f78d78e94283e535.png
and I have to put the type tag of the Collider,
I’m feeling that adding a new hit collider from weak and medium and strong is a big saver when exporting to the game
apply it to ryu.

Before continuing to use the 2d game kit I want to make another post about whether there is an antenna to create hitcollider from weak and medium and strong, if I learned a little from that asset and if I learned from that hitcollider and I will continue learning I just want to know if there is an antenna of hitcollider, if I will say later what is the reason that type of hitcollider of what I want.

a question which is the characters that make the script move?

If you’re not able to discern what the script does by reading it, you probably want to take a step back and do some basic scripting lessons and tutorials.

If you ever want to know what a function or type does, anything related to Unity is documented here: https://docs.unity3d.com/ScriptReference/

If it’s not in the Unity Script reference then it’s probably part of the standard .NET library. These are all well documented on the internet.

1 Like

Thanks, I will still continue to upload a publication because sometimes when I look for the documentation or ask what I want to know, what I am looking for does not appear, because I do not know what those bugs are called.

Asking questions online can’t replace fundamental knowledge. It’s probably a good idea to head to learn.unity.com and start with the Essentials course.

You’re not going to complete a game by hoping that passers by on the internet write your code for you.

Thanks, how do I learn to make a fighting game? Is there a page on how to make a fighting game at learn.unity.com?