RPG with Turn-Based Combat

Working on a new game that will be an RPG with turn-based combat, something along the lines of DragonQuest or Persona 5.
The player’s movement in the world is handled through keyboard and/or gamepad not point-and-click. Not using cinemachine at this point so mouse/gamepad handle all the camera movement. I adopted all of this from YouTuber Sebastian Graves’ Third Person Controller series.
The enemy AI in the world is using scripts/concepts from RPG Core Combat Creator. Also using course’s saving system as well as progression. Since I’m using turn-based combat I had to go else and combined several different techniques from different sources (Zenva’s Turn-Based Battle System, xOctoManx’s Turn-Based Battle/Combat).
Like Dragon Quest and Persona, the main character will pick up members along the way so they can be part of any battle but also can be used within the main world. There will be some areas or quests that only one particular member will be able to accomplish so I had to be able to switch characters in the main world. I also had to be able to save each of these different character stats/progressions when they go back and forth from world scene to battle scene as well as going from one world scene to the next.
I still have a lot more work to do as like inventories, quests, and dialogues but at least I got a working combat system at this point. Need to work an audio manager as well. The characters and environment right now are just placeholders so this is the final look I’m going for.
I found the hardest thing to work on is the UI using the new input system. Not alot of resources out there to explain how to work with menu controls and stuff.
Hope you enjoy this preview.

10 Likes

JRPG style! Well done!

this is excellent

This is really cool.

Might I suggest looking into the Command Pattern instead of using Unity’s new input system, you’ll have to do a lot of work but you’ll end up with an input system of your own, which I found to be really, really helpful for JRPGs.

Hi, I like your thinking and style. I’ve just finalized the RPG Core Combat Creator course and also want to design a game with turn-based combat, would you care to share some courses or materials you’ve seen with which I can learn this kind of skills. Thank you in advance.

Sure. No problem. So here is a list of tutorials I went through that helped me out greatly.

  1. YouTube Series by xOctoManx: Unity 5 Tutorial: Turn Based Battle System (https://www.youtube.com/playlist?list=PLj0TSSTwoqAypUgag6HJoVZD-RmbpDtjF)
    This is a 3D version of an active time battle (ATB) which randomly generated combat encounters as well as setting up the combat system. He also has a bunch of other tutorials on things like shop systems and questing if you are interested in those.
  2. Zenva Academy course: Unity RPG Development - Turn-Based Battle System
    (RPG Academy – Zenva Academy)
    This is a 2D version of turn-based combat. This also has a whole bunch of other tutorials on subjects like inventories, quests, dialogs. I used this to implement my turn-based combat and blended it with some of xOctoManx’s code.
  3. YouTube Series by Game Dev Experiment: Make A Game Like Pokemon in Unity
    (https://www.youtube.com/playlist?list=PLLf84Zj7U26kfPQ00JVI2nIoozuPkykDX)
    This is a 2D version of turn-based combat with a whole lot more - inventories, game saving (which matches exactly with what GameDev does), npc, dialogues, quests, shop systems and more. I’ve used this series plenty because I’m using a gamepad/keyboard for control. The concepts in this series helped me figure out how to move through lists and stuff with just those controls instead of using a mouse. I also like the way the inventory system works.
  4. YouTube Series by Dev!Bird: Unity3d Advanced Dialogue System
    (https://www.youtube.com/playlist?list=PL32dY9P_7YSpifhyXmDgi_Zn1fuuNKZ8V)
    I used his techniques for my dialogue system since it doesn’t need to be as complicated as what the RPG course from GameDev implements. Just like the style of this man’s work better.
  5. YouTube Series by Sebastian Graves: Create A 3rd Person Controller in Unity
    (CREATE A 3RD PERSON CONTROLLER IN UNITY - YouTube)
    I’m using the new input system in Unity and all my movement will be via gamepad/keyboard so I’m not using point and click. This tutorial series helps setting up your controls to handle this. I am checking out the new course that GameDev has just released for a third person controller but right now Sebastian’s work pretty good for me.
    I use Synty Studios assets for all my work … at least at this sandbox level. In the future I will switch to my own assets but I’m just trying to get all the programmatics working first.

That’s about it. If you got any other questions, feel free to ask. I’ll try to help if I can.

2 Likes

Thank you a lot, mate. This list is so thorough and comprehensive. I greatly appreciate your help. In addition, I’ve just found this tutorial as well in case it may be beneficial to you. Unity 5 Tutorial Tactical Turn Based Game Part 4 Combat! - YouTube. All the best with your game development. Please do share your progress in case if you need any feedbacks.

Thanks. I plan on doing an update soon. It will probably be quite long though. :slightly_smiling_face:

Hello @EpicDogGames , how did you do that ?Were the enemy comes toward at you and then,triggers a transition and turns into a turn-based combat. I’m trouble looking for a tutorial for that. Any ideas and suggestions?

The turn based combat is out of the scope of the course, but I can tell you that transitioning to the turn based combat scene is exactly the same as transitioning to another scene in the game like we do in Portal… At the end of the combat, then just transition back to the previous scene leaving the player in the saved position.

2 Likes

Hi Brian,

I happened to follow this and read your answer here.

I might try my hands on a turn based combat game in the future,
and i was just wondering;

Would it be bad practice to make the battle field in the same scene?
then just teleport the character there and work with camera’s rather than a separate scene?
Or would this just depend on how large the rest of the scene already is?
Or would this kind of game just have multiple battle scenes, different one for each battle field?

I would have specific scenes for the different terrain types (many JRPGs use this idea). So in a forest, load a forest battleground scene, in the village load a town square battle scene.

1 Like

Sorry for the delayed response @kirth13. There is a Zenva Academy course called RPG Academy. The link is in an early post. It really helped me set up transitioning from the world scene to the battle scene and back. Basically in a scene I have two areas - world area and battle area. All objects in the hierarchy pertaining to those two areas are grouped into those two sections. In the world when the player comes in contact with an enemy, there is a script (I call it BattlePortal) attached to the enemy that handles transitioning from the world area to the battle area. This BattlePortaI script has links to the world area gameobject and the battle area gameobject. I also created a battle launcher script that I placed in the PersistentObject prefab (in the course I think we keep the fader & saving system objects there). When a battle is started, the BattlePortal script is triggered, turns off all the objects under the world area gameobject, turns on all the objects under the battle area gameobject, and the battle characters are instantiated in the battle area. When the battle is finished, the battle launcher script handle the return to the world area by turning it back on and turning off the battle area. Hope this helps.

1 Like

@EpicDogGames @Brian_Trotter Wow! I see , Thank you very much! So basically, I found a link that maybe the same as you said, I don’t know if this is correct, but here it is: Turn based battle and transition from a game world Unity - Pav Creations

I’m making right now , my own spelling game just like bookworm adventures , but it’s a 3D,actually. Just for my Capstone project. :sweat_smile: Your game is so cool! I really like it!.

I’ve done some RPG TB games. Just to add my two cents.

It depends. Look at how Pokémon does it, I use that franchise as an example because it is a nightmare to develop and the tricks they use to keep performance stable are pretty clever.

A quick rundown;

  • Your Pokémon and trainers’ Pokémon are loaded in every scene to avoid loading screens and just have the animation transitions without possible interruptions.
  • In Pokémon Colosseum, and XD, they use a very neat approach of instead of loading a new scene for the battleground, they use a part of the map you are in, they just “remove” NPCs out of the way and use shaders and scales to make things look bigger or tinier, this allowed them to keep the size of the files as small as possible.
  • They often have the battleground as part of the scene, this is to avoid loading screens, and that’s were the loaded Pokémon are resting. Use occlusion culling to maximize performance.
  • In Pokémon Arceus they literally use the ground you are standing in. Don’t ask me how they managed to keep that game stable doing that, just with the amount of different rigs a single place can have, a Switch should explode, but the console is stable, I have no idea how, my only guess is black magic.
  • During the 3DS era, they used multiple models for the player. In the world there are models with less tris but more bones, and in the battlefield more tris but less bones. Is an outstandingly weird trick to let Pokémon have as many possibles bones as the console can handle. Really, really, clever.

I suppose it all comes down to the specs and file size.

1 Like

Thanks for some more insight Yee,

I was just wondering how they usually do it, for future reference.
I was thinking as a part of the level scene at first,
mostly because you can avoid loading screens then indeed.

When Brian said its all different scenes, i thought;
“Oh ok, well since its just a background and some models,
even if there is a loading screen, it will probably be nearly instant on new computers.
And if thats the case, would then a loading screen even matter?”

When i get to that point, ill probably just test a bit of both after all,
then build and see what feels right.

If there aren’t many models I suppose is ok, but when you have a game with 1000+ creatures it matters a lot. It all comes down to scope, I suppose.

Yea, i guess , i never played pokemon myself (only stadium) so i dont now how it works there.
In similar games i played, each level only had certain enemies,
for example; nature enemies in forest level.
But if you would have to load in ALL enemies in a single scene,
then it would be a different story indeed.

My comparison is the Final Fantasy series, games like FFVII to FFIX where I’m reasonably certain (by the complete change of graphic style) that a new scene is loaded for the battle.

I think Pokemon is a unique situation, because each side assembles a team from any Pokemon they might have… so you need them all… In most games, you’ll find a subset of all possible enemies within each scene.

If the scenes are kept relatively small, then the loading isn’t a huge issue time wise. In the course, we use a 100x100 tile for each zone, but that’s probably too conservative… I find around 250x250 is a manageable map…

2 Likes

Privacy & Terms