Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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

Discussion in 'Game Design' started by TheFighterSFMK2022, Oct 1, 2022.

  1. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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

    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using UnityEngine;
    4. using UnityEngine.InputSystem;
    5.  
    6. public class Fighter1 : MonoBehaviour
    7. {
    8.  
    9.     void Start()
    10.     {
    11.        
    12.     }
    13.  
    14.  
    15.     void Update()
    16.     {
    17.        
    18.     }
    19. }
    20.  
    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
    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using UnityEngine;
    4. using UnityEngine.InputSystem;
    5.  
    6. public class Fighter2 : MonoBehaviour
    7. {
    8.  
    9.     void Start()
    10.     {
    11.        
    12.     }
    13.  
    14.  
    15.     void Update()
    16.     {
    17.        
    18.     }
    19. }
    20.  
    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.
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    3,702
    Socrates likes this.
  3. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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.
     
  4. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    3,702
    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.
     
  5. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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
     

    Attached Files:

  6. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    sólo me preguntaba.
     
  7. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    I'm sorry, what did I mean, I was just wondering.
     
  8. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    3,702
    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.
     
    angrypenguin likes this.
  9. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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
     

    Attached Files:

  10. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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.
     
  11. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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
     
  12. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    I need help, I can't find where it is, what to do to move the player.
    Code (CSharp):
    1. using Gamekit2D;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5.  
    6.  
    7.     public class PlayerCharacter : MonoBehaviour
    8. {
    9.     protected Vector2 m_MoveVector;
    10.  
    11.     public float maxSpeed = 10f;
    12.     public float groundAcceleration = 100f;
    13.     public float groundDeceleration = 100f;
    14.     [Range(0f, 1f)] public float pushingSpeedProportion;
    15.  
    16.     public float maxHorizontalDeltaDampTime;
    17.     public float cameraHorizontalFacingOffset;
    18.     public float cameraHorizontalSpeedOffset;
    19.     private void Start()
    20.     {
    21.         if (!Mathf.Approximately(maxHorizontalDeltaDampTime, 0f))
    22.         {
    23.             float maxHorizontalDelta = maxSpeed * cameraHorizontalSpeedOffset + cameraHorizontalFacingOffset;
    24.          
    25.         }
    26.     }
    27.  
    28.     public void SetMoveVector(Vector2 newMoveVector)
    29.     {
    30.         m_MoveVector = newMoveVector;
    31.     }
    32.  
    33.     public void SetHorizontalMovement(float newHorizontalMovement)
    34.     {
    35.         m_MoveVector.x = newHorizontalMovement;
    36.     }
    37.  
    38.     public void SetVerticalMovement(float newVerticalMovement)
    39.     {
    40.         m_MoveVector.y = newVerticalMovement;
    41.     }
    42.  
    43.     public void IncrementMovement(Vector2 additionalMovement)
    44.     {
    45.         m_MoveVector += additionalMovement;
    46.     }
    47.  
    48.     public void IncrementHorizontalMovement(float additionalHorizontalMovement)
    49.     {
    50.         m_MoveVector.x += additionalHorizontalMovement;
    51.     }
    52.  
    53.     public void IncrementVerticalMovement(float additionalVerticalMovement)
    54.     {
    55.         m_MoveVector.y += additionalVerticalMovement;
    56.     }
    57.  
    58. }
    59.  
     
  13. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    I don't know what to do?
     
  14. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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
    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.
     
  15. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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.
     
  16. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    a question which is the characters that make the script move?
     
  17. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    3,702
    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.
     
    angrypenguin likes this.
  18. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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.
     
  19. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    14,958
    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.
     
  20. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    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?
     
  21. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    I only look for an alternative way without having errors or script bugs and then I can understand it.
     
  22. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    14,958
    That's really not how it works. You need to generally understand your tools before you can start applying them to a specific piece of work. As you said, you're having trouble finding what you need because you don't know what things are called.

    The course I suggest starting with is called "Unity Essentials". It's called "essential" because it's the basic knowledge that you need in order to learn more advanced stuff. After that I'd probably do the next two items in the list, Junior Programmer and Creative Core.

    They won't be specific to creating a fighting game, but until you understand how your tools work you're going to be guessing at what you need, at best. There is no fast path to expertise, it requires study and practice.
     
  23. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    14,958
    Alternatively, if you really don't want to learn about game dev and want to jump straight to skinning your own 2D fighting game, I suggest looking up the following:
    - MUGEN is an open-source fighting game, you could probably mod it somehow. Check the license.
    - Universal Fighting Engine is a paid fighting game asset for Unity, which seems to have purpose-build fighting game creation tools built in.
    - Search for fighting game-specific engines or tools via your search engine of choice. If you don't care to learn Unity in general then you've no reason to stick to Unity.
     
  24. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    I'm sure they'll moo if they can help me, Universal Fighting Engine I don't know how to buy because I'm in Argentina and I don't have a credit card, I downloaded the kit game to learn (which kdgalla recommends), I've learned a bit of unity until It's time to create an account for forum unity, I forgot to tell you that I have been using mugen, and I had an idea that I saw that I have to use float and I don't know how to make functions to increase the float with the keyboard, if I press keyboard "Q" increases 1.5f if I press keyboard "E" it increases 2.5f that's what I want to do and I don't know how (im still new to unity forum).
     
  25. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    maybe it's true.
     
  26. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    yes i understand what you are talking about
     
  27. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    thanks for your asset recommendation, kdgalla.
     
    BrandyStarbrite likes this.
  28. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143

    Yes, I have found the way to increase the float, I wanted to increase the float with a script by pressing a keyboard button but I have not found how to do that, however, if I can increase it with an animator, I did it as if it were mugen but I don't know if is it a good idea or not, here it is.
     

    Attached Files:

  29. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    I'm sorry, it was because sometimes the person says that it's not a good idea or yes, and since you know about unity, I just wanted to know if the idea is good, and also to say thank you for your advice.
     
  30. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    I know I don't have to ask that type of question but I just wanted to know if I did a learning process, my question is the idea of doing increase the float with animator is a good idea or not (for hitcolider), that's the last editor question of unity, and then I will continue to learn.
     
  31. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,449
    Fighting games are 99% animation.

    are you good at animation? Like really really good?

    like over a decade of experience in the field good?

    no?

    Reel in your scope.
     
  32. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    not really, the animation was done by Miguel Escalera, oh yes, I forgot that I didn't show you the animation.
     
  33. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    it is him
     
  34. BrainwavesToBinary

    BrainwavesToBinary

    Joined:
    Jul 8, 2019
    Posts:
    23
    With respect, it is not "maybe". Based on what you've said in this thread and others you've been active in, you very much need to put this fighting game to the side while you go through some courses. If you don't, you will struggle to build this game, you won't understand the help that people give you, and because you don't really understand what you're doing and why you're doing it, you won't be able to effectively communicate what you really need. You seem to be approaching game development with only a vague idea about what it entails, and you don't appreciate how much work has to go into it. As @angrypenguin suggested, going through the coursework on Unity's website is a good start.
     
  35. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    yes, I know it will take me years to make a fighting game, and I already left my project aside
     
  36. TheFighterSFMK2022

    TheFighterSFMK2022

    Joined:
    Oct 1, 2022
    Posts:
    143
    I put it aside a week ago, now I'm still learning junior programming.