This tutorial taught me a lot. I was afraid that it would need CharacterBase, but as you've pointed out in the comments, you can do just fine without it. It definitely isn't a beginner-friendly tutorial, but a turn-based combat system isn't very easy to make to begin with, so it's fine. If anything, I really felt like I was improving as a dev at the end of this tutorial. Thank you so much!
Im actually working on a turn based combat game, and i just thought id watch some tutorials, see how others implement things, and you handled things way better than i had planned to do them, thanks! Very nice video
Hi Code Monkey, great tutorial, great pace, not too slow, not too fast. I understand you can not do this for free, but the amount of commercials during this video makes it really painful to watch. A real pity.
This is a good tutorial, but my biggest criticism is that a significant part of this tutorial heavily depends on the characterBase script, which is something you don't show us on how to make. I literally had to skip the first half of the tutorial and I had to eventually look for another tutorial. Sorry.
The Character base is related to the Animation system which should be completely separate from the Battle System. You shouldn't write your code with dependencies all over the place, you should be able to easily change the animation system if you want to.
@@CodeMonkeyUnity We don't care what is more effective. He just said you didn't show how to create half of contents in this video. Your tutorials are not good and I don't know why you have more subs than a lot of game creater that I know xd.
Great tutorial! Super informative and in depth stuff but taught in a simple easy to understand way in a reasonable amount of time. Btw, is there a follow up video that shows how you do the special attacks and multiple enemies. Really interested in seeing how that all plays out.
Sadly I didn't end up making the follow up video, but I did finish the prototype where this system came from, you can download the project files for that to see how I implemented the special abilities unitycodemonkey.com/video.php?v=rmeSwk6AOO4
Nice Tutorials you got, i wish you made the followup video :D im bit new to programming and are stuck at exact that point you would show in the follow up video :D .
very good tutorial but, but many things handle by character base which is we dont know what it is, how it is set up especially for beginner like me, and make it bad or you have other tutorial to make that character base?
Great tutorial!! I'm working on a game where this turn-based system fits perfectly. I have two questions that have come up. Firstly, I'd like the health bars to be static and styled like Street Fighter, but I can't seem to achieve that using the techniques from this video. Secondly, I'd like to add a probability for extra attacks to occur before the character returns to their initial position. How could I implement this? Can the code from the video be used for this? Thank you so much in advance!!
@@CodeMonkeyUnity It's just a little quieter and the audio seems a bit "tinny" compared to your other videos, but I love your content. Keep making great stuff!
Love this video. Just one question: Is there a way to make damage determined by action commands instead of random? Like if a player presses a button at the right time, that would make the enemy take more damage.
Anyone who got the dark characters as you start that tutorial. Open the character prefab, select the body part, in the inspector, go down to the shader. To get good colors and not mess up later in the video the flash red when you get hit. In my case I've changed the shader to VertexLit CG
Awesome video think I can ad like a timer and make like a grandia2 battle system with time to get to your turn then a acting time then the atack or skill goes off XD I loved that game abit disappointed that the anniversary edition didn't have better graphics though XD but anyway thx for the vid
That's exactly what i was looking for! Thank you so much! Everything you say make me understood more about Unity!! Do you have the later version available? The one with multi characters and special attacks? Thank you :)
After this video I got caught up in some other projects so never made that one sorry But you can download the project files for the game where I used this system unitycodemonkey.com/video.php?v=rmeSwk6AOO4
@@CodeMonkeyUnity It seems to have an error for the damage popup but i cant find a way to resolve this. is it from a custom library of yours? Thank you in advance
@@christinampalla9078 What is the error? The only library is my utils which should be included in the project files. This video was made a long time ago so perhaps there's a difference in the Unity version, perhaps that project still has references to the Lightweight Render Pipeline which is now known as the Universal Render Pipeline
Do you have any recommended resources for learning how to add network capabilities in order to turn something like this into a simple multiplayer battle? I have a little socket and networking knowledge.
That's tricky because Unity have been talking for a long time about how they will upgrade their entire network tools but there hasn't been much news on it for a while. So if you absolutely must do that right now I think the best option is to use 3rd party tools like Photon.
Hey Code Monkey, @ 12:39, you added () => inside the parameter, was confused about this I havent seen it before. What does this do exactly? wrap the state change inside the parameter?
When I download the project and make "BattleHandler" and attach the code when I hit play nothing shows on the camera but the 2 clones are present in the scene, but you cannot see theme in the "Game" view. Also, I do not have Gamehandler is that ok?
The actual system part of this is good but man you spend a vast majority of the video working on animation stuff to make it look pretty. I personally would've preferred a little more focus on the actual system
You can use whatever character system you want, the character system is completely decoupled from the turn based logic, you can use 3D characters or anything else you want. If you're curious about my specific char animation system it's all about dynamic Meshes th-cam.com/video/11c9rWRotJ8/w-d-xo.html
This tutorial since pretty good, but i'm totally lost. Which video i need to watch before watch this one ? (Cuz i don't understand the animation system, how works the character_base, ... I tried to install the project, but i don't understand better. So what i need to watch ?) Thanks
The Animation system and the Battle system are completely separate, you can use whatever animation system you want. I made my own system, it's based on dynamically modifying meshes in runtime th-cam.com/video/11c9rWRotJ8/w-d-xo.html but like I said you can use whatever animation system you want.
help, it's like I have to use character base, what if I don't wanna use characterbase.cs , I want to attach the player sprite and enemy manually, by the way, thanks for the tutorial
The CharacterBase contains my implementation of my animation system, you can easily swap it out with whatever animation system you use. As long as you expose the same functions the Battle System will work flawlessly.
@@CodeMonkeyUnity how do you call like that the animations? its like a function with a name in character base? Or just the name of the anim, and it finds it through the animator?
@@lablabs3726 It is using my custom animation system and not the Unity Animator so its specific to my case which is why I abstract away the animation implementation
Have been working on some games with a friend and slowly learning more about C# and unity's systems without a background in computer programming so my knowledge isn't the best. I'm curious what the point of using the Action delegate in the your methods is to trigger what will happen when the call completes. Could you not just write the next lines underneath the method call?
Not sure what part of the video are you referring to, the OnActionComplete? Yes you can just copy paste the same lines of code, but a delegate allows you to be more flexible in your logic, you can make an attack and afterwards do completely different things, maybe one ends the turn after attacking, maybe another does a second special move after attacking, etc. I covered delegates in more detail here unitycodemonkey.com/video.php?v=3ZfwqWl-YI0
I have been struggling with this tutorial for days now. How can you mention an animation system at 9:35 and never show what it looks like or how to make our own that could be triggered with botton presses..
@@CodeMonkeyUnity that is a video handling Sprite animation. Not the creation of character_base which has those functions you keep calling such as playidleanim() The tutorial is good until you start using functions you wrote such as taking the attackDir. I looked deep for days at your custom scripts and couldn't grasp it all. I don't know how to move forward without needing scripts like you have.
I have a query When i start there actually 3 characters 1 hero 1 villain and 1 villain sprite in middle can u tell me how to fix it? pls need a reply doing for a school project
Dude, I was a beginner in unity, I was trying to make a turn-based rpg game for a school project. I spend 3 days trying to figure out size and camera problems because your prefabs doesn't match the starting camera and background size I had to deal with giant figures and finally give up this video was a huge let down.
I'm trying to run the game after importing it but it doesn't seem like it's working at all. Should it run? Or the file import is to follow the tutorial?
What's the reasoning behind using mesh renderer components instead of sprite renderers? I thought sprites and the corresponding renderers were for 2D, and the former was for 3D? Am I mistaken? Also, what's the reasoning behind using methods like GetMaterial() and modifying the return of the method, rather than just storing the material in a variable and modifying that? Method calls should be much more expensive than variables, no?
@@CodeMonkeyUnity Wow! I am getting older (40+) and trying to find a new hobby (and why not a new job) and I am very surprised with what people can accomplish today in this area! Good job!
Is there a grid based tutorial looking to learn more about making something similar to hero clix with pvp ranked systems If there is a reference guide to different terminology i can read, a glossary of sorts to help me understand the functions of the different inputs I would appreciate a link to read up on if it's not too much trouble
Hey I just got to this tutorial and would love to get to the "next" one where you expand it to more enemies, characters, skills, etc, but I couldn't find it, am I missing something?
At the time I got caught up with a bunch of other projects so sadly never made it, although you cn download the project files for the Game jam game I made based on this unitycodemonkey.com/video.php?v=rmeSwk6AOO4 Or look into my TBS course th-cam.com/video/QDr_pjzedv0/w-d-xo.html
@@CodeMonkeyUnity Thanks, will take a look into both! Though in my case I want a more pokemon-like, or maybe darkest dungeon, turn-based combat, not tactical, and can't find a tut with multiple characters fighting.
Hey Code Monkey really love turn based combat I am implementing it into my game but my question is how do transfer back to the hub world when the battle ends and the player has won?
Oh sorry Code Monkey followup question how do I implement a level up system that stays the same regardless what scene I am in For example before the battle I was say level 5 in the player world and I am level 6 in another scene after the battle
Using this as a base you can add multiple characters per each side and then create some abilities. How long depends on how experienced you are, should be quick to make a prototype.
Hi Mr Code Monkey. New to Unity here. I'm still trying to spawn characters at run time. Does the sprite you download matter? I downloaded a random one in Asset Store and after instantiating the prefab, I get a "BattleHandler.Player is never assigned to, and will always get its default value, null".
Its pretty difficult to put this into action as this tutorial isn't going off of building this from scratch. It relies on things that this video doesn't go over like the making of the pfcharacterBattle prefab or the background and how you got the character to appear over the background and etc.
That's how game development works, you build systems on top of systems, you don't build everything from scratch every time. There's a million ways to make a character and control it unitycodemonkey.com/video.php?v=Bf_5qIt9Gr8 Many ways to animate it unitycodemonkey.com/video.php?v=11c9rWRotJ8 You can draw the background in any image program, sort it as a sprite unitycodemonkey.com/video.php?v=5_BwFB-1dAo If you're looking for a guided path step by step then look into complete courses isntead of individual tutorials, like my free course th-cam.com/video/oZCbmB6opxY/w-d-xo.html
My biggest hurdle is figuring out how to make things work because even when I tried setting up the finished battle system on the project file that you linked, I just cant get the battle system code to run. Like pressing space or anything wont make the bots do anything nor do they spawn like how they did when you finished the code. So many things I need to learn and figure out hahah
That's perfectly normal, that's the learning process in action, so you're doing great! Just focus on learning a tiny thing every day, if you do that then over time you will learn a massive amount, keep at it!
7 minutes in, and we're using functions in Character_Base but haven't seen that script yet? I'm so confused... Edit: Found a comment talking about another video but that video explains how to draw sprites with meshes, nothing about how Character_Base works. For example your other tutorial never creates a function GetMaterial() yet you use characterBase.GetMaterial()??? wtf is happening I'm so lost here. I can't even simply set up the characters to have two different sprites (models I'm using 3D) because the code isn't shown in the video and the other video doesn't relate to this.
You need to learn to completely separate systems from one another. The Turn Based System should not know and should not care how the animation system is implemented. It should work with any animation system you want.
Hey, sorry to bother, but I feel like I should watch some other video(s) before making sense of this one. Can you please guide me towards the correct one(s)? I didn't really touch Unity at all before, and my aim is a simple turn-based tactics game
Making a turn based battle game is an intermediate/advanced genre, so I would advise you start with something simpler to start with. Check out my free beginner Unity course on making a nice simple game from scratch th-cam.com/video/AmGSEH7QcDg/w-d-xo.html Then after you gain some more skills, maybe look at my TBS game th-cam.com/video/QDr_pjzedv0/w-d-xo.html Best of luck in your learning journey!
Hello CodeMonkey! Very good tutorial. I have a problem though. On my playAttackAnimation method don't have a callback for onHit as you have so I call the TakeDmg() method on playAttackAnimation end callback BUT it cast it 2 times....Any idea why? Can add some code snippets if needed. Thank you very much. EDIT : To notify when attack animation is ending I use animation StateBehaviour script on which I override onStateExit(). I noticed that is called twice hence the double call on TakeDmg(). Anyway no idea why is called twice...or how to fix it.
Do you have a blend between two animations? That might be why its being called twice, when the blend starts and when it ends. I've never interacted with the Animator in that way so not exactly sure what that issue might be.
@@CodeMonkeyUnity No, I don't have any transitions between animations. I play the anims from code using animator Play method. The only transitions are from Entry to default state(idle) and from attack to Exit(that I made to trigger onStateExit(). Anyway thanks for checking. I think I will add events into clips and make onHit() callback from them.
I made a Grid Combat system here th-cam.com/video/mONHucoYASU/w-d-xo.html And Grid Pathfinding here th-cam.com/video/alU04hvz6L4/w-d-xo.html th-cam.com/video/46qZgd-T-hk/w-d-xo.html
@@CodeMonkeyUnity that was a very fast reply. Thanks bro. Youre helping me alot. Its my dream game ever since i started this game development journey 2 years ago. Im a slow learner but im not giving up.
Is there a way you could help, I am having trouble getting a shader to create an outline on my enemy player, when my ui hovers over the enemy as a selected target
I just found this video today and have a bit of a problem. I made a new 2D project, downloaded the unity package and imported it but it's missing bunch of sprites including the background. Is this intentional? Thanks for the work you do!
The background is a sprite I grabbed from the asset store and not something I made myself so I cannot distribute it in the packages. Everything else shown I made myself so it's included.
@@CodeMonkeyUnity appreciate the reply, but I double checked a lot of things, the strange thing is the log shows that the state is State.Dashing in my dashing function but Update() still never sees it. Here is my code paste I would really appreciate a quick look since I've been stuck on this for hours: paste.ofcode.org/xiDYFGNYeSjhtrjUePGcKt
Thanks so much for this tutorial. One issue I ran into was that when my character moves my health bar stays in the same position. Any suggestions would be very helpful.
damn i got stuck on 2 things. 1) my characters are dark (basically everything is dark even if i add light sources. and 2) blood particles dont work. :( I hope i figure it out. Im enjoying your tutorials
Make sure you use the correct shader for the SRP you're using. If you're using Universal then use the Universal shader, try the Unlit one. I covered the mesh particles here th-cam.com/video/SkkxwsXwEhc/w-d-xo.html
Ik this might be verry far out but I love this video, there is only one issue, is when I try to do the LambdaFunction it just says that I require a function, idk what is the problem could someone explain to me how I can fix it?
Also, I am confused on the animation that you are using. I am trying to make a pixle art styled turned based RPG and I am trying to figure out how it works. When it plays the animation to fight it does not wait until it is complete before returning to it's original position. Thanks, LegendaryAlexav
There isn't one, I just built this scene for this tutorial. Although my Turn Based Strategy course covers a lot of similar mechanics unitycodemonkey.com/courses.php?c=turnbasedstrategy
The CharacterBase contains all the functions and behaviour related to the Animations. The Animation System is completely separate from the Turn Battle System so you can use whatever Animation System you want.
No, when I made this video I then had to stop making videos for a while so I could finish Battle Royale Tycoon. But this is a really interesting system so it's definitely something I'd like to get back to in the future
@@CodeMonkeyUnity Ive already added upon to it, added stuff like mana, armor, dodge, accuracy. I am having trouble with the screen shake, it makes the characters move off screen and i do not know how to fix it. Do you have any ideas? Keep making the videos they are awesome :D
Its possible but it's a relatively complex system, VS is better suited for simpler use cases unitycodemonkey.com/video.php?v=qAkeCDWgPVA If you want to make games with this level of complexity then I would recommend you learn C#
I'm prolly idiot, but I could not do anytrhing cause There is no tuto on how to create the character + it's animation + it's base script. And could not connect my own character prefab to the BattleHandler. It gives me a warning something like "pfCharacterBattle" is never assigned.
You need to think about things in various levels of abstraction. The code for the Turn Based Battle System should not be dependent on your animation system or how you set up your sprites. The code shown in the video can work with any animation system, they are separate, so use whatever animation system you want and expose the required functions.
Is Fire Emblem grid based? I covered something here unitycodemonkey.com/video.php?v=mONHucoYASU And a full course here unitycodemonkey.com/video.php?v=QDr_pjzedv0 It's in 3D but it's super simple to convert to 2D unitycodemonkey.com/video.php?v=3zxTigjJr24
Yes, I like turn based game very much and making one using unity at the moment. :) So glad I found this channel. :)
LeeT Game Development haha dindt think i d see you here, gave you Feedback on discord for your game
LeeT! You da bomb!
I spent more time trying to figure out what I actually needed than actually coding. 10/10
This tutorial taught me a lot. I was afraid that it would need CharacterBase, but as you've pointed out in the comments, you can do just fine without it. It definitely isn't a beginner-friendly tutorial, but a turn-based combat system isn't very easy to make to begin with, so it's fine.
If anything, I really felt like I was improving as a dev at the end of this tutorial. Thank you so much!
Im actually working on a turn based combat game, and i just thought id watch some tutorials, see how others implement things,
and you handled things way better than i had planned to do them, thanks! Very nice video
Thanks a lot for those amazing tutorials. Very well explained and i love how you keep things simple and easy to understand and implement.
You are just a saint, Im signing up for Patreon right now.
Thanks! Glad you like the videos!
Really good tutorial. Excellent as always.
Thanks for taking the time to show the concepts of this system.
Thank you so much for your videos, they're very extensive and straight to the point!
Is there a follow-up video to this series ? I'd love to see how to do the special attacks and items
Glad I came across your channel. Very impressive stuff!
Hi Code Monkey, great tutorial, great pace, not too slow, not too fast.
I understand you can not do this for free, but the amount of commercials during this video makes it really painful to watch.
A real pity.
This is a good tutorial, but my biggest criticism is that a significant part of this tutorial heavily depends on the characterBase script, which is something you don't show us on how to make. I literally had to skip the first half of the tutorial and I had to eventually look for another tutorial. Sorry.
The Character base is related to the Animation system which should be completely separate from the Battle System. You shouldn't write your code with dependencies all over the place, you should be able to easily change the animation system if you want to.
@@CodeMonkeyUnity We don't care what is more effective. He just said you didn't show how to create half of contents in this video. Your tutorials are not good and I don't know why you have more subs than a lot of game creater that I know xd.
@@KurooNegai You sure showed him
Been studying all these videos to make an turned based rpg but god damn it will probably take me like 5 years for 1 level
Best of luck! Experience comes with time so just keep working on it!
i can help if you want, i begin too, not in general but in unity,and you seem to have the same goal
808 Reaper my computer recently broke I have been setback big time /:
@@justfriends7581 oh... You're going to rebuy another or repair or change pieces?
@@808reaper7 hey you still working on 2D games?
Great tutorial! Super informative and in depth stuff but taught in a simple easy to understand way in a reasonable amount of time. Btw, is there a follow up video that shows how you do the special attacks and multiple enemies. Really interested in seeing how that all plays out.
Sadly I didn't end up making the follow up video, but I did finish the prototype where this system came from, you can download the project files for that to see how I implemented the special abilities unitycodemonkey.com/video.php?v=rmeSwk6AOO4
@@CodeMonkeyUnity Oh okay, sweet. Thanks man.
This channel is great, good stuff!
This looks awesome!
Nice Tutorials you got, i wish you made the followup video :D im bit new to programming and are stuck at exact that point you would show in the follow up video :D .
I love your Java style braces use. In my opinion, it makes it way easier to parse the code when you can have more on the page.
i do love your tutorials i wish you were on my team at times
You think maybe we could link up some how?
very good tutorial but, but many things handle by character base which is we dont know what it is, how it is set up especially for beginner like me, and make it bad or you have other tutorial to make that character base?
Great tutorial!! I'm working on a game where this turn-based system fits perfectly. I have two questions that have come up. Firstly, I'd like the health bars to be static and styled like Street Fighter, but I can't seem to achieve that using the techniques from this video. Secondly, I'd like to add a probability for extra attacks to occur before the character returns to their initial position. How could I implement this? Can the code from the video be used for this? Thank you so much in advance!!
Man this looks so good already!
Do you know the flash game Sonny? Remind me of that :)
I remember that one! It was great
thank you best teacher..
Great video, audio is a little off this time I think though.
Off how? Unsynced? At what point?
@@CodeMonkeyUnity It's just a little quieter and the audio seems a bit "tinny" compared to your other videos, but I love your content. Keep making great stuff!
Love this video. Just one question: Is there a way to make damage determined by action commands instead of random? Like if a player presses a button at the right time, that would make the enemy take more damage.
great video !
Anyone who got the dark characters as you start that tutorial. Open the character prefab, select the body part, in the inspector, go down to the shader. To get good colors and not mess up later in the video the flash red when you get hit. In my case I've changed the shader to VertexLit CG
Awesome video think I can ad like a timer and make like a grandia2 battle system with time to get to your turn then a acting time then the atack or skill goes off XD I loved that game abit disappointed that the anniversary edition didn't have better graphics though XD but anyway thx for the vid
Is it possible to make a final fantasy like rpg tutorial
Nice!!!You are top!!
That's exactly what i was looking for! Thank you so much! Everything you say make me understood more about Unity!! Do you have the later version available? The one with multi characters and special attacks? Thank you :)
After this video I got caught up in some other projects so never made that one sorry
But you can download the project files for the game where I used this system unitycodemonkey.com/video.php?v=rmeSwk6AOO4
@@CodeMonkeyUnity It's okay no worries. Your work is amazing and you can easily transfer your knowledge to others. Thank you for everything you do!!
@@CodeMonkeyUnity It seems to have an error for the damage popup but i cant find a way to resolve this. is it from a custom library of yours?
Thank you in advance
@@christinampalla9078 What is the error? The only library is my utils which should be included in the project files.
This video was made a long time ago so perhaps there's a difference in the Unity version, perhaps that project still has references to the Lightweight Render Pipeline which is now known as the Universal Render Pipeline
Do you have any recommended resources for learning how to add network capabilities in order to turn something like this into a simple multiplayer battle? I have a little socket and networking knowledge.
That's tricky because Unity have been talking for a long time about how they will upgrade their entire network tools but there hasn't been much news on it for a while.
So if you absolutely must do that right now I think the best option is to use 3rd party tools like Photon.
You Are My Idol
Hey Code Monkey, @ 12:39, you added () => inside the parameter, was confused about this I havent seen it before. What does this do exactly? wrap the state change inside the parameter?
It's a lambda expression, works like a function
I covered Delegates and Lambdas here th-cam.com/video/3ZfwqWl-YI0/w-d-xo.html
Hello CodeMonkey. I guess there is no way that you're going to upload the 2nd part? :( Is it somewhere available? Like Udemy?
When I download the project and make "BattleHandler" and attach the code when I hit play nothing shows on the camera but the 2 clones are present in the scene, but you cannot see theme in the "Game" view. Also, I do not have Gamehandler is that ok?
The actual system part of this is good but man you spend a vast majority of the video working on animation stuff to make it look pretty. I personally would've preferred a little more focus on the actual system
You didn't show us how to make the Character_Base. Where can we learn how to make all of the files you didn't explain in this one?
You can use whatever character system you want, the character system is completely decoupled from the turn based logic, you can use 3D characters or anything else you want.
If you're curious about my specific char animation system it's all about dynamic Meshes th-cam.com/video/11c9rWRotJ8/w-d-xo.html
@@CodeMonkeyUnity Thank you!
This tutorial since pretty good, but i'm totally lost. Which video i need to watch before watch this one ?
(Cuz i don't understand the animation system, how works the character_base, ... I tried to install the project, but i don't understand better. So what i need to watch ?)
Thanks
The Animation system and the Battle system are completely separate, you can use whatever animation system you want.
I made my own system, it's based on dynamically modifying meshes in runtime th-cam.com/video/11c9rWRotJ8/w-d-xo.html but like I said you can use whatever animation system you want.
Good tutorials, Can you do a visual novel tutorial?, theres not that many tutorials when it comes to VN.
help, it's like I have to use character base, what if I don't wanna use characterbase.cs , I want to attach the player sprite and enemy manually, by the way, thanks for the tutorial
The CharacterBase contains my implementation of my animation system, you can easily swap it out with whatever animation system you use.
As long as you expose the same functions the Battle System will work flawlessly.
@@CodeMonkeyUnity how do you call like that the animations? its like a function with a name in character base? Or just the name of the anim, and it finds it through the animator?
@@lablabs3726 It is using my custom animation system and not the Unity Animator so its specific to my case which is why I abstract away the animation implementation
Have been working on some games with a friend and slowly learning more about C# and unity's systems without a background in computer programming so my knowledge isn't the best. I'm curious what the point of using the Action delegate in the your methods is to trigger what will happen when the call completes. Could you not just write the next lines underneath the method call?
Not sure what part of the video are you referring to, the OnActionComplete?
Yes you can just copy paste the same lines of code, but a delegate allows you to be more flexible in your logic, you can make an attack and afterwards do completely different things, maybe one ends the turn after attacking, maybe another does a second special move after attacking, etc.
I covered delegates in more detail here unitycodemonkey.com/video.php?v=3ZfwqWl-YI0
@@CodeMonkeyUnity cool, that was what I was referring to and thanks for the reply!
I have been struggling with this tutorial for days now. How can you mention an animation system at 9:35 and never show what it looks like or how to make our own that could be triggered with botton presses..
I covered how my animation system works here th-cam.com/video/11c9rWRotJ8/w-d-xo.html
@@CodeMonkeyUnity that is a video handling Sprite animation. Not the creation of character_base which has those functions you keep calling such as playidleanim() The tutorial is good until you start using functions you wrote such as taking the attackDir. I looked deep for days at your custom scripts and couldn't grasp it all. I don't know how to move forward without needing scripts like you have.
Do you have the same tutorial like this, but for many character atleast for 3 playable character ? or what should i do?
I have a query
When i start there actually 3 characters 1 hero 1 villain and 1 villain sprite in middle
can u tell me how to fix it?
pls need a reply doing for a school project
Dude, I was a beginner in unity, I was trying to make a turn-based rpg game for a school project. I spend 3 days trying to figure out size and camera problems because your prefabs doesn't match the starting camera and background size I had to deal with giant figures and finally give up this video was a huge let down.
What? If the objects are too big you just change the orthographic size of the camera, its that simple
I'm trying to run the game after importing it but it doesn't seem like it's working at all. Should it run? Or the file import is to follow the tutorial?
What's the reasoning behind using mesh renderer components instead of sprite renderers? I thought sprites and the corresponding renderers were for 2D, and the former was for 3D? Am I mistaken?
Also, what's the reasoning behind using methods like GetMaterial() and modifying the return of the method, rather than just storing the material in a variable and modifying that? Method calls should be much more expensive than variables, no?
This is using my custom animation system which is based on dynamically generating and modifying meshes unitycodemonkey.com/video.php?v=11c9rWRotJ8
Can you make a tactics based battle system? I’m making one now and finding it confusing. Would love an easy straight forward way to do it
Beginner question: I understand the coding behind the scenes but how/where do you get the background and the players avatars and related animations?
I made them myself, drawing in Photoshop and Animated using my own animator.
@@CodeMonkeyUnity Wow! I am getting older (40+) and trying to find a new hobby (and why not a new job) and I am very surprised with what people can accomplish today in this area! Good job!
Is there a grid based tutorial looking to learn more about making something similar to hero clix with pvp ranked systems
If there is a reference guide to different terminology i can read, a glossary of sorts to help me understand the functions of the different inputs I would appreciate a link to read up on if it's not too much trouble
I'm not familiar with that game but I made a Grid Turn-Based Combat System here th-cam.com/video/mONHucoYASU/w-d-xo.html
Hey I just got to this tutorial and would love to get to the "next" one where you expand it to more enemies, characters, skills, etc, but I couldn't find it, am I missing something?
At the time I got caught up with a bunch of other projects so sadly never made it, although you cn download the project files for the Game jam game I made based on this unitycodemonkey.com/video.php?v=rmeSwk6AOO4
Or look into my TBS course th-cam.com/video/QDr_pjzedv0/w-d-xo.html
@@CodeMonkeyUnity Thanks, will take a look into both! Though in my case I want a more pokemon-like, or maybe darkest dungeon, turn-based combat, not tactical, and can't find a tut with multiple characters fighting.
Hey Code Monkey really love turn based combat I am implementing it into my game but my question is how do transfer back to the hub world when the battle ends and the player has won?
The simplest way is to have the Battle in one Scene and the World in another, when the battle ends just load the WorldScene
Thanks 😁
Oh sorry Code Monkey followup question how do I implement a level up system that stays the same regardless what scene I am in
For example before the battle I was say level 5 in the player world and I am level 6 in another scene after the battle
@@VermillionVT The easiest way is to store that data in a static field. Static fields persist through scene reloads until the game quits.
Ok thanks :)
Cool
Hi im looking Turn Base rpg like Star wars galaxie of heroes Or Marvel strike force. 5vs5 with stats. is long make same type game ?
Using this as a base you can add multiple characters per each side and then create some abilities. How long depends on how experienced you are, should be quick to make a prototype.
Code Monkey thx !!
Hi Mr Code Monkey. New to Unity here. I'm still trying to spawn characters at run time. Does the sprite you download matter? I downloaded a random one in Asset Store and after instantiating the prefab, I get a "BattleHandler.Player is never assigned to, and will always get its default value, null".
Can I use same way in 3D game, for example sliding and Running animation? Running animation I have.
Its pretty difficult to put this into action as this tutorial isn't going off of building this from scratch. It relies on things that this video doesn't go over like the making of the pfcharacterBattle prefab or the background and how you got the character to appear over the background and etc.
That's how game development works, you build systems on top of systems, you don't build everything from scratch every time.
There's a million ways to make a character and control it unitycodemonkey.com/video.php?v=Bf_5qIt9Gr8
Many ways to animate it unitycodemonkey.com/video.php?v=11c9rWRotJ8
You can draw the background in any image program, sort it as a sprite unitycodemonkey.com/video.php?v=5_BwFB-1dAo
If you're looking for a guided path step by step then look into complete courses isntead of individual tutorials, like my free course th-cam.com/video/oZCbmB6opxY/w-d-xo.html
@@CodeMonkeyUnityThank You for the info. Im barely starting off with learning Unity
My biggest hurdle is figuring out how to make things work because even when I tried setting up the finished battle system on the project file that you linked, I just cant get the battle system code to run. Like pressing space or anything wont make the bots do anything nor do they spawn like how they did when you finished the code. So many things I need to learn and figure out hahah
That's perfectly normal, that's the learning process in action, so you're doing great! Just focus on learning a tiny thing every day, if you do that then over time you will learn a massive amount, keep at it!
7 minutes in, and we're using functions in Character_Base but haven't seen that script yet? I'm so confused...
Edit: Found a comment talking about another video but that video explains how to draw sprites with meshes, nothing about how Character_Base works. For example your other tutorial never creates a function GetMaterial() yet you use characterBase.GetMaterial()??? wtf is happening I'm so lost here. I can't even simply set up the characters to have two different sprites (models I'm using 3D) because the code isn't shown in the video and the other video doesn't relate to this.
You need to learn to completely separate systems from one another. The Turn Based System should not know and should not care how the animation system is implemented. It should work with any animation system you want.
When you add SpawnCharacter true and false under void Start(), it causes a compile error because you didn't define what SpawnCharacter is
Nice work However, the structure you made with the code are very hard for unit testing and readability.
Hey, sorry to bother, but I feel like I should watch some other video(s) before making sense of this one. Can you please guide me towards the correct one(s)? I didn't really touch Unity at all before, and my aim is a simple turn-based tactics game
Making a turn based battle game is an intermediate/advanced genre, so I would advise you start with something simpler to start with.
Check out my free beginner Unity course on making a nice simple game from scratch th-cam.com/video/AmGSEH7QcDg/w-d-xo.html
Then after you gain some more skills, maybe look at my TBS game th-cam.com/video/QDr_pjzedv0/w-d-xo.html
Best of luck in your learning journey!
@@CodeMonkeyUnitythank you for your care, it means so much to me!
When does the next Video come? :-(
Hello CodeMonkey! Very good tutorial. I have a problem though. On my playAttackAnimation method don't have a callback for onHit as you have so I call the TakeDmg() method on playAttackAnimation end callback BUT it cast it 2 times....Any idea why? Can add some code snippets if needed. Thank you very much.
EDIT : To notify when attack animation is ending I use animation StateBehaviour script on which I override onStateExit(). I noticed that is called twice hence the double call on TakeDmg(). Anyway no idea why is called twice...or how to fix it.
Do you have a blend between two animations? That might be why its being called twice, when the blend starts and when it ends.
I've never interacted with the Animator in that way so not exactly sure what that issue might be.
@@CodeMonkeyUnity No, I don't have any transitions between animations. I play the anims from code using animator Play method. The only transitions are from Entry to default state(idle) and from attack to Exit(that I made to trigger onStateExit(). Anyway thanks for checking. I think I will add events into clips and make onHit() callback from them.
Hey, do you have a video explaining character_base script and the animation system behind it?
Yup I covered how the animation system works here th-cam.com/video/11c9rWRotJ8/w-d-xo.html
Do you have a tutorial on turnbased game with grid based movement?
I made a Grid Combat system here th-cam.com/video/mONHucoYASU/w-d-xo.html
And Grid Pathfinding here
th-cam.com/video/alU04hvz6L4/w-d-xo.html
th-cam.com/video/46qZgd-T-hk/w-d-xo.html
@@CodeMonkeyUnity that was a very fast reply. Thanks bro. Youre helping me alot. Its my dream game ever since i started this game development journey 2 years ago. Im a slow learner but im not giving up.
will this work for a Shining force type of battle system yeah i would have to modify it alittle any thoughts?
Is there a way you could help, I am having trouble getting a shader to create an outline on my enemy player, when my ui hovers over the enemy as a selected target
I made an Outline shader here th-cam.com/video/FvQFhkS90nI/w-d-xo.html
Part 2 please
Just a question. Can you make a game using PURE ECS in unity's current build (Unity 2019.3 alpha) or just a hybrid?
Sure, although ECS is still in Preview so for certain things you will need to build your own systems like for Animations.
@@CodeMonkeyUnity Thanks for the clarification. You are awesome! :)
Was there a part 2?
sooo is there a way to like when you approach someone or just walking the battle can begin?
Check the RPG I made th-cam.com/video/rmeSwk6AOO4/w-d-xo.html
I just found this video today and have a bit of a problem. I made a new 2D project, downloaded the unity package and imported it but it's missing bunch of sprites including the background. Is this intentional? Thanks for the work you do!
The background is a sprite I grabbed from the asset store and not something I made myself so I cannot distribute it in the packages. Everything else shown I made myself so it's included.
@@CodeMonkeyUnity what's the name of the asset? so i can get the sprite
any idea why my State.Slide changes are not picked up by the Update() function? The Update() function always thinks I'm in idle
Add a Debug.Log to see what is going on in your script. Maybe you're never setting or resetting the state?
@@CodeMonkeyUnity appreciate the reply, but I double checked a lot of things, the strange thing is the log shows that the state is State.Dashing in my dashing function but Update() still never sees it. Here is my code paste I would really appreciate a quick look since I've been stuck on this for hours: paste.ofcode.org/xiDYFGNYeSjhtrjUePGcKt
@@CodeMonkeyUnity actually figured it out, it was operating on a prefab instead of a GameObject instance the whole time, thanks tho!
Thanks so much for this tutorial. One issue I ran into was that when my character moves my health bar stays in the same position. Any suggestions would be very helpful.
Sounds like your health bar is not a child of the unit object, either make it a child or update it's position as the unit moves.
Hey! Where is the second video to this one?
I didn't end up making it so it's just this one
@@CodeMonkeyUnity Its good mate I understand, I built off of it lol
When I instantiate the first two characters they come on screen but flicker on and off, whereas yours just stand there and idle? Help?
Are they on the exact same sorting order as the background?
@@CodeMonkeyUnity they were, changed it and it's fixed, thank you!
New subscriber on the channel
Is it alright to make your own sprites while following the tutorial?
Of course! Go ahead and make it your own!
you can do a tutorial about how i can do the animations and the script Character_Base? Is so confuse to follow :(
I covered how my animation system works here th-cam.com/video/11c9rWRotJ8/w-d-xo.html
@@CodeMonkeyUnity Thanks for the help :D, you will do a second part of this video?
damn i got stuck on 2 things. 1) my characters are dark (basically everything is dark even if i add light sources. and 2) blood particles dont work. :( I hope i figure it out. Im enjoying your tutorials
Make sure you use the correct shader for the SRP you're using. If you're using Universal then use the Universal shader, try the Unlit one.
I covered the mesh particles here th-cam.com/video/SkkxwsXwEhc/w-d-xo.html
Ik this might be verry far out but I love this video, there is only one issue, is when I try to do the LambdaFunction it just says that I require a function, idk what is the problem could someone explain to me how I can fix it?
Also, I am confused on the animation that you are using. I am trying to make a pixle art styled turned based RPG and I am trying to figure out how it works. When it plays the animation to fight it does not wait until it is complete before returning to it's original position.
Thanks, LegendaryAlexav
❤❤❤❤❤❤❤❤❤❤ 0:13
where is your full course how to make this video?
There isn't one, I just built this scene for this tutorial.
Although my Turn Based Strategy course covers a lot of similar mechanics unitycodemonkey.com/courses.php?c=turnbasedstrategy
Is the CharacterBase necessary? I'm confused and I don't want to do anything wrong.
The CharacterBase contains all the functions and behaviour related to the Animations.
The Animation System is completely separate from the Turn Battle System so you can use whatever Animation System you want.
I've one question ,this is a turn based ,but how create the same thing with a menu to choose action (like old RPG ex final fantasy series)?
Is the multiple enemies and special skills video out and i just cant find it or?
No, when I made this video I then had to stop making videos for a while so I could finish Battle Royale Tycoon.
But this is a really interesting system so it's definitely something I'd like to get back to in the future
@@CodeMonkeyUnity Ive already added upon to it, added stuff like mana, armor, dodge, accuracy. I am having trouble with the screen shake, it makes the characters move off screen and i do not know how to fix it. Do you have any ideas? Keep making the videos they are awesome :D
How difficult would it be to make this with visual scripting?
Its possible but it's a relatively complex system, VS is better suited for simpler use cases unitycodemonkey.com/video.php?v=qAkeCDWgPVA
If you want to make games with this level of complexity then I would recommend you learn C#
I'm prolly idiot, but I could not do anytrhing cause There is no tuto on how to create the character + it's animation + it's base script. And could not connect my own character prefab to the BattleHandler. It gives me a warning something like "pfCharacterBattle" is never assigned.
You need to think about things in various levels of abstraction. The code for the Turn Based Battle System should not be dependent on your animation system or how you set up your sprites.
The code shown in the video can work with any animation system, they are separate, so use whatever animation system you want and expose the required functions.
@@CodeMonkeyUnity ya. I somehow get it. I just lack much knowledge. Is there 2nd part forthis system? Like with skills and multiple enemys?
encounters = battle??? (pokemon style)???
Yes please.
I'm just saying.... If there was a code monkey udemy course I'd buy it
how can i make that enemies have 4 attacks instead of 1?
my both characters spawn on same place i have no idea why
Use Debug.Log to see what your code is doing
Can u make one toturial on Turn Based rpg game with 3D?
The logic for the Battle System is the same in 2D and 3D. Everything in the video will work if you're using 3D Meshes instead of my animated sprites.
why dont you use rigid body to move the players?
There are no physics in his scene, so there is no need to use RigidBody components.
Do you really type that fast?
and how to make more characters?
Noo. Ecs isn't done yet! XD
Definitely planning on more ECS tutorials but for now I've been working in a RPG for a Game Jam and this Combat System came out quite well.
@@CodeMonkeyUnity isnt ECS changing too much
Anyone know of a good tutorial or something that covers how to make a game in unity similar to Fire emblem? Preferably in 2D
Is Fire Emblem grid based? I covered something here unitycodemonkey.com/video.php?v=mONHucoYASU
And a full course here unitycodemonkey.com/video.php?v=QDr_pjzedv0
It's in 3D but it's super simple to convert to 2D unitycodemonkey.com/video.php?v=3zxTigjJr24
I dont understand this. Please help