Turn based discussion

M

markchapman

Guest
I'm working on a turn based battle system, mostly as a learning project. My main question is how do i differentiate the enemies so they all don't have the same behavior? I don't want the system to be one you can spam through with the space button, but making independent ai for each monster seems like the only way. I thought about giving them specific moves to there type, like goblins have poisonous bites, slimes have a sticky goo that kinda freezes the player.

Another thing I'm running into my system dont rely solely on turns, there isn't any to be honest, its based on stamina build up, its a set timer that can be buffed by either parties, Is this a better option?

I know ill have to later on implement more then 1v1 battles, the question is, is it better to let the ai take control of them or let the player choose there actions? I think it would make the battle take less time to let the ai handle there options because most older games like ff it took forever to get through a battle choosing everyone's actions, well imo.

I would have posted pictures of the system but there isn't much to see, its all number crunching atm.
 

woods

Member
Another thing I'm running into my system dont rely solely on turns, there isn't any to be honest, its based on stamina build up, its a set timer that can be buffed by either parties, Is this a better option?
i prefer the initative based on timer system.. mainly because of the high dex thing.

ex: if i pump my speed thru the roof i get to attack first...but only once per round?!? i should be able to attack 3 or 4 times before the enemy, if i can get fast enough...
ofc in this situation, i am sacrificing damage for speed.


is it better to let the ai take control of them or let the player choose there actions? .. ff it took forever to get through a battle choosing everyone's actions,
isnt that the beauty of the turn based system? to take your time and use your tactics.. otherwise it would be an action/reflex game. having the AI handle everything except the player in a party system... is kinda like watching a movie.. yeah it is quicker to have AI do it.. but it is also less interactive ;o) ...maybe an option to toggle that on/off could be available?


My main question is how do i differentiate the enemies..
each having thier own attack patterns.. when to heal/when to run/who to focus on etc..
special attacks and status effects are a good thing to create variety.. like you said poison/slow etc.. also special defenses/immunities magic is half/double effective, susceptible to fire etc..
(these things will make the player pay attention to the combat if they want to be effective vs mindlessly using strong attack repeatedly)



number crunching and placeholders.. those are the most important features
;o) pics or it didnt happen
 
M

markchapman

Guest
It's no where near done and it looks a bit rough because HUD is not something I have been concerned with at this time, its a bit rushed but this is the gist of the flow (quite a bit slower and later with more entities involved i hope.)
Gif to the battle system in action

I'm currently getting the motions worked out, animations and basic flow of the system, its faster paced then I wanted but maybe that will keep the players interested. I myself through this process, im learning to respect the turn based battle system, alot goes into it other then making hit markers and button pressing. This far the funnest thing for me was coming up with the enemy move list.
look over the not so advanced arrays.
GML:
move[0,0] = 0
move[0,1] = "tackle"
move[0,2] = 0
move[0,3] = 5
move[0,4] = sPhyAttack
move[ 0, 5] = 2//weakness same as move type

move[ 1, 0] = 1//id
move[ 1, 1] = "Bite"//name
move[ 1, 2] = 0//type
move[ 1, 3] = 5//base damage
move[ 1, 4] = sPhyAttack//animation
move[ 1, 5] = 2//weakness same as move type

move[ 2, 0] = 2//id
move[ 2, 1] = "Kick"//name
move[ 2, 2] = 0//type
move[ 2, 3] = 5//base damage
move[ 2, 4] = sPhyAttack//animation
move[ 2, 5] =2 //weakness same as move type

move[ 3, 0] = 3//id
move[ 3, 1] = "Swipe"//name
move[ 3, 2] = 1//type
move[ 3, 3] = 10//base damage
move[ 3, 4] = sCutAttack//animation
move[ 3, 5] = 2//weakness same as move type

move[ 4, 0] = 4//id
move[ 4, 1] = "Stab"//name
move[ 4, 2] = 1//type
move[ 4, 3] = 10//base damage
move[ 4, 4] = sCutAttack//animation
move[ 4, 5] = 2//weakness same as move type


//moveType  0-physical, 1-cut, 2-magic, 3-psn, 4-none

move[ 5, 0] = 5//id
move[ 5, 1] = "jump"//name
move[ 5, 2] = 0//type
move[ 5, 3] = 0//base damage - this is a dosge type move that uses alot of stamina but builds it for one turn evade attacks
move[ 5, 4] = sPhyAttack//animation
move[ 5, 5] = 4//weakness same as move type

move[ 6, 0] = 6//id
move[ 6, 1] = "Magic blast"//name
move[ 6, 2] = 2//type
move[ 6, 3] = 10//base damage
move[ 6, 4] = sMagAttack//animation
move[ 6, 5] = 0//weakness same as move type

move[ 7, 0] = 7//id
move[ 7, 1] = "Charge"//name
move[ 7, 2] = 0//type
move[ 7, 3] = 10//base damage
move[ 7, 4] = sPhyAttack//animation
move[ 7, 5] = 2//weakness same as move type

move[ 8, 0] = 8//id
move[ 8, 1] = "Poison Bite"//name
move[ 8, 2] = 3//type
move[ 8, 3] = 5//base damage over a period of turns
move[ 8, 4] = sMagAttack//animation
move[ 8, 5] = 2//weakness same as move type
I have run into another speed bump so to say, how do i make the enemy AI not do the best it can? I know that I have access to all the info i need but how do I limit the enemy AI on what it should know? The original plan was check the players HP and then the stamina, and depending on what it was the enemy would use the best it can to kill the player but I feel it may be a bit hard? is this something I should worry about or maybe adjust the enemies AI later.

Translating this from paper to code has been a headache though, some things won't work out the way I thought they would, I wanted a simple easy top down rpg but i didn't want it to be a hack and slash zelda type so i started on this combat system about a day ago. I'm pleased with what i have though, it's a dynamic beast to say the least.

edit: This looks even worse then I thought remember its all just testing (>_<)
 

Attachments

Yal

šŸ§ *penguin noises*
GMC Elder
Just trying to come up with different strategies for each enemy sounds like the best way to differentiate them. So stamina is basically like the Final Fantasy ATB system, I guess? I'm making the assumption that you have stamina for multiple attacks when it's fully charged (that adds an interesting tradeoff between saving up stamina for more attacks later vs using it now but go back to zero)

  • Some enemies instantly does an attack as soon as they have enough stamina, others wait for their stamina to fully fill up and then does a series of attacks in a row.
  • Some enemies will block attacks (hitting their shield will reduce their stamina, and stamina regeneration rate is reduced while blocking), basic attacks will fail against this strategy but charged attacks or magic might break their guard in one hit, stunning them and allowing you to finish them off easily.
  • Other enemies will try to dodge attacks, which costs less stamina than attacking. They could base their dodge timing on what attack you previously used, so alternating between fast and slow attacks messes up their timing.
  • Some enemies constantly move around and jumps / dodges completely randomly, then does an attack at some point in their scramble. You need to wait for them to actually do something you NEED to react to in order to preserve stamina, and also wait for them to be vulnerable before attacking.
 

woods

Member
move list looks like a good start.. im sure it will grow over time as things get fleshed out..

make the enemy NOT do the best they can?
you could have say orcs attack player teammate that have high HP or high atk power first. and have say goblins go after the player teammate that have high initiative.
(this may not be the better course of action for example.. focus fire on heavy hitter first for all enemies)

there are billions of ways to make those "tactic logic" choices.

before you get to coding the more advanced tactics, you should have a healthy plan on paper on the flow of battle. (i would make the basic fight system work and then flesh it out/expand it)
...how to actually code that.... im not the guy to ask ;o) im still struggling with how arrays work.



edit: This looks even worse then I thought remember its all just testing (>_<)

ive worked so long with circles and squares and freeware sprites... getting the gameplay down first is the priority.. this is all placeholder stuff ;o)


it sounds like you are well on your way to making it happen.. looking forward to seeing more
 
M

markchapman

Guest
Just trying to come up with different strategies for each enemy sounds like the best way to differentiate them. So stamina is basically like the Final Fantasy ATB system, I guess? I'm making the assumption that you have stamina for multiple attacks when it's fully charged (that adds an interesting tradeoff between saving up stamina for more attacks later vs using it now but go back to zero)

  • Some enemies instantly does an attack as soon as they have enough stamina, others wait for their stamina to fully fill up and then does a series of attacks in a row.
  • Some enemies will block attacks (hitting their shield will reduce their stamina, and stamina regeneration rate is reduced while blocking), basic attacks will fail against this strategy but charged attacks or magic might break their guard in one hit, stunning them and allowing you to finish them off easily.
  • Other enemies will try to dodge attacks, which costs less stamina than attacking. They could base their dodge timing on what attack you previously used, so alternating between fast and slow attacks messes up their timing.
  • Some enemies constantly move around and jumps / dodges completely randomly, then does an attack at some point in their scramble. You need to wait for them to actually do something you NEED to react to in order to preserve stamina, and also wait for them to be vulnerable before attacking.
This is great material to reflect on I hadn't thought about dodging moves take less stamina, I was going to make those moves to buff defence but use more stamina but this sounds much better in the long run. Alot there i hadn't thought about thank you. Yal you have a pokemon battle system I just found it in your signature, I'll be looking at that when i get the spare time.

move list looks like a good start.. im sure it will grow over time as things get fleshed out..

make the enemy NOT do the best they can?
you could have say orcs attack player teammate that have high HP or high atk power first. and have say goblins go after the player teammate that have high initiative.
(this may not be the better course of action for example.. focus fire on heavy hitter first for all enemies)

there are billions of ways to make those "tactic logic" choices.

before you get to coding the more advanced tactics, you should have a healthy plan on paper on the flow of battle. (i would make the basic fight system work and then flesh it out/expand it)
...how to actually code that.... im not the guy to ask ;o) im still struggling with how arrays work.



edit: This looks even worse then I thought remember its all just testing (>_<)

ive worked so long with circles and squares and freeware sprites... getting the gameplay down first is the priority.. this is all placeholder stuff ;o)


it sounds like you are well on your way to making it happen.. looking forward to seeing more
I have about a page of mechanics that I Wanted for this that I'm going by but coding this system hasn't been bad as of yet just a few user errors on my half, the time i have in this engine I should be much better but I'm not much on data structures still yet but its coming along. I have been fleshing out the 1v1 but its nearly done, I'm creeping up on needing some bud for testing so im not drawing it all in the debug console.

I love all the info though the turn based system appears like a simple thing but then you get into the back end and there's more number crunching then on wall street. As soon as I work out some bugs I'll put the 1v1 up and let you play with it and you can tell me what ya'll think. I would love to see some other systems to see how they work!
 
M

markchapman

Guest
So I'm working on how I want the targeting to work, you press left and right to target the prev or next enemy. I think this may be slow but its the best way without a mouse i think. Any suggestions?
 

woods

Member
depends on the layout on the screen.. up/down, left/right, maybe a combination of the two.. both work well.

I for inventory or B for packpack just doesnt seem like it goes with the genre/style of your game

for something like the nostalgia of FF1 or 2 .... keep it super simple ;o)
 
M

markchapman

Guest
It's front view at the moment but more for testing, it seemed to be the quickest to get testing and number crunching. The view never crossed my mind initially, however the tests this far has been with buttons and text drawn hud so there isn't anything set in stone. Thanks woods I'll give some thoughts to the view and then revisit the targeting method, I've refined the system to work with one to three people or one to three enemies. The targeting system that I had in mind you press left and right and it changed the state of a targeting object to change position and when up is pressed the attack selected will attack, I was about to start on it when I stopped to think if that would be the quickest way of going about it, given that it's pretty fast paced. I'll play with it.

To make a small or simple hud I'm thinking zelda hearts with the stamina bar behind them like in the screenshot below but I'm not sure yet, I guess two separate bars would take up the same amount of space, the game in general was going to be a small one or two level basic rpg to learn about all the systems so the HUD wont be that big of deal and the bar alone with the move buttons should show all the info you need for a quick battle system. That's why I created this thread though to get other opinions on my thoughts.

The inventory is something at the moment that I haven't even thought about I have some ideas wrote down but nothing set in stone, when I get the targeting system down which is next when I'm done with the HUD and sprites, ill do a few drafts and see what I have.

multi-enemy-and-party.pnghealthBarIDea.pnghealthBarIDea_depleted.png
 
Last edited by a moderator:

woods

Member
just brainstorming here ;o)

always shown on screen above the pawn's head(raw important quick info)
hp
stam


on hover or click (as important but less necessary info)-point is easy access to less pertinent combat info ;o)
cls (assuming cls means class-mage?)
str
def
spd(maybe add a bar for initative to show who is attacking next? this could go with above info)
int

you could have a small menu working with up/down and space/enter for select and back.(thinking along the lines of basic attack/item/magic/run)
and left/right changing selected targets.
 
Top