Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Tactical Battle system
« previous next »
  • Print
Pages: [1]

Author Topic: Tactical Battle system  (Read 5909 times)

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Tactical Battle system
« on: November 15, 2008, 11:42:45 PM »
Dun dun dun!

Yeah, you read it folks. The mage of purple is going to attempt the impossible. A tactical battle system.

For you fellows who doesn't know, it's basicly the same as Final fantasy tactics. tactics advance and Ogre battle(I think that's the name at least.) I suppose you could also count in Heroes of might and magic as well, but only barely.

Here's the thing:

I love these kinds of battles. They actually make you feel like a unit of people and not just 4 people fighting a line of goblins.

So, I've figured I need pictures, charsets and of course. Another set of some thousand pictures.

But here comes the two hard parts that I have yet to figured out.

1.
Character and enemy movement.

I guess I'll need some kind of calculation that checks all the nearby obstacles and makes it impossible to venture to that tile.
Something that prevents the character to walk to the tile(within the walking range) that is behind, let's say: a wall.

Something that also does the same for the enemy. Because the enemy will not have a person choosing where to go.

2.
Enemy AI.

Yeah sure, having the enemy simply walk up to you and attack will be great... Not quite.

Just some suggestions how to make the AI a bit easier to narrow down or something.
I figured these kind of things would affect who they'll attack:

Character's health.
Character's defense.
Character's position.
Character's status problem(blind, sleep ect).
Character's attack range(range attacks and spells).
Character's threat(meaning that they won't just attack the weak mage if the warrior with higher health and defense is leaving a pile of bones after him).

Enemy's status(Will retreat if defense is lowered and such).
Enemy's health(will try to retrat if healing is possible).
Enemy's  attack (what target that will take most damage).
Enemy's current position( a ranger will move away if threatened unless the other conditions are greater like te character's health).
Enemy's advantage (will not retreat if the character will die on next blow).
Enemy's spells(making him choose a long range spell rather than going melee in some cases).



So yeah, if anyone would like to give it a try to help me. Feel free to.

And I suppose good ol' DragonBlaze might see this. I do think that chances are great that there are few people beside him that could help anyway.
No offense guys, but I'm mostly the one helping others.


Oh yeah, if you got something that would work better on RPGMXP or gamemaker, c++, whatever. Then please tell me so I don't limit myself to sux.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline Roland_Deschain

  • Batman.
  • Agent
  • *
  • Posts: 892
  • I'm... BATMAN.
Re: Tactical Battle system
« Reply #1 on: November 16, 2008, 04:07:17 PM »
For the first, I recommend making it so you move your characters with the arrow keys like a normal RPG and just having a variable set up so that once you move a certain amount of spaces, you can't move any more.
Logged

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
Re: Tactical Battle system
« Reply #2 on: November 18, 2008, 08:20:01 AM »
Lol.

Well the actual movement is easy. You just make a check to see if the position you are moving to is greater than or less than or equal to the the current x and y position of the character. So for example, if you are moving to point (2,3) and you're charecter is at point (3,5), you would want to move to move 1 position to the left until you are equal in the x position (2), then you would want to move 2 spaces up to be equal in the y position (5).

This basically looks like this
if [movePositionX] < [characterPositionX]
 move character left
if [movePositionX] > [characterPositionX]
 move character right
if [ movePositionY] < [characterPositionY]
 move character up
if [movePosistionY] > [characterPositionY]
 move character down

do this until the character is in the right position.


The complicated part would be to determain WHERE the character can move.

In real programming, this is done by a nifty technique called recursion. Recursion means that there is a part of the program that calls itself over and over again to find a complicated result. Basically, it breaks down a complicated problem (such as finding all the positions you can move to) into smaller problems that are easily solved. Saddly, something like this is not possible with rpg maker, so we're gonna have to try a 'brute force' method.

The idea is this. Test above the hero, if pasible, test in all dirrections of  that tile if passible, then test all those tiles if all the tiles around those are passible. Do this until you reach your maximum move distance. Once you finish all posibilities in the up dirrection, repeat in the left, right, and down position. Every time you find a pasible tile, store it's x and y positions in variables. This kind of code is just a huge amount of if statements (probably hundreds). Saddly, this is the only way I can think of to do a system like this in rpg maker.

I don't mean to bust your dreams here, but a system like this wasn't designed for rpg maker. In "real" programming, something like this could be done in around 10 lines of code, and honestly, if you're already decent with rpg maker, in the amount of time it would take to code a complete TBS in rpg maker, you could probably learn and code the same thing in C++ or Java. If you would like, I could teach you Java game design or help you with C++. Otherwise I can't give you code for this in rpg maker because there would literally be hundreds and hundreds of lines to do simple operations. But if you do wish to continue this on rpg maker, I can help you along with feed back and ideas as much as I can.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Tactical Battle system
« Reply #3 on: November 18, 2008, 12:52:59 PM »
As I thought and suspected.

The main reason why I wanted to see if it could be done fairly not-so-complicated is because we have yet to learn how to include sound and picture in our c++ class. Our classes are more or less completely boring and basic since my class can barely understand the difference between cout and cin.

But I've heard that flash is a bit easier on those parts. I might be wrong of course.

Any ideas would be helpful of course. I'm willing ot do what it takes to make this work.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline Dominicy

  • All men play on ten!
  • Leader
  • *
  • Posts: 2,852
Re: Tactical Battle system
« Reply #4 on: November 18, 2008, 03:01:02 PM »
Or there's SIM RPGmaker.  It's only partially translated but there's enough that you can understand what you need to do.

Just a thought. :p
Logged

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
Re: Tactical Battle system
« Reply #5 on: November 18, 2008, 05:21:41 PM »
Quote from: Prpl_Mage on November 18, 2008, 12:52:59 PM
As I thought and suspected.

The main reason why I wanted to see if it could be done fairly not-so-complicated is because we have yet to learn how to include sound and picture in our c++ class. Our classes are more or less completely boring and basic since my class can barely understand the difference between cout and cin.

But I've heard that flash is a bit easier on those parts. I might be wrong of course.

Any ideas would be helpful of course. I'm willing ot do what it takes to make this work.

Don't go with flash.

You don't really need to know about pictures and sound, here is what you need to know.
-variables
-arrays
-conditional branches
-loops
-procedures (methods)
-objects and classes.

These are all the basic things in every language, the rest is just "add ons" that is pretty easy to do/learn to do.

I'm not exactly sure how it is done in C++, the the basic idea is this:

Set up a window
Create a Buffer Stratagy (smooth animation is achieved by displaying one frame while another frame is drawn in the background, when it comes time to display the second frame, that frame is moved up and displayed, the first frame is discarded and used again to draw the next frame.) All of this should be taken care of in the background by some built in C++ function, but you still need to call that function.
Set up a main game loop
record the time it took to loop.
set up the graphics
process key input
call game logic
move entities
draw graphics
show the screen
discard the graphics
sleep the thread for a little bit
loop back to top

granted, you probaby won't know how to do any of that (except maybe loop, and key input process). But if you know all of the basic functions listed above, then this should be as simple as reading up on a few tutorials and applying what you already know to these new concepts.

Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Tactical Battle system
« Reply #6 on: November 18, 2008, 05:56:37 PM »
Yeah, we've learned awfully little during these months.
Just learning how to show graphic is far too complicated for our teacher apparently.
But as you predicted, I more or less just know how to make loops(barely though) and the key input.

And do you think I would have greater success with Java then? I'd get it. Perhaps it would be easier for you to explain anyway.
« Last Edit: November 18, 2008, 06:14:26 PM by Prpl_Mage »
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
Re: Tactical Battle system
« Reply #7 on: November 18, 2008, 06:20:32 PM »
Well the only advantage you'd have with java is that I know it very well lol. Honestly C++ is a better language to make games with. The syntax with the two languages are very simuluar, the main difference is the methods you can use. No matter what you use, I can help you out with it, whether it be c++, java, or if you stick with rpg maker.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Tactical Battle system
« Reply #8 on: November 18, 2008, 09:21:49 PM »
Allright, I'm willing to learn how to use c++ to make a program that isn't just text.
But really, I suppose I'm not even close to learn how to make a game with c++ at the moment.
Me and a friend created this text-based rpg thingy but it was just text and questions all the way.

But if you want a challenge then it's probably to help me out how to learn the stuff up to the point where I actually can make this work.

On the other hand, java would probably be the same thing except that I'd need to get a program to code in and learn the basic.  But really, I'm not that much past basic in C++ either.

Any of the two work really. All(laughing at this dumb statement) I'm trying to do is a tactical battle system with sprites. I really don't need anything fancy as long as I can have the characters move, attack and use magic/skills.
And a menu where you choose what mission to take of course.

I'm willing to learn either one, but I suppose you'll be the one teaching me. Or some tutorials, as long as I get some guidelines. But if you don't think that C++ will be too hard to teach, then let's go with c++.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline Ben

  • Some dude
  • Staff
  • Royal
  • *
  • Posts: 4,844
  • butts
    • my portfolio
Re: Tactical Battle system
« Reply #9 on: November 18, 2008, 11:06:25 PM »
I just use this.
http://www.creationasylum.net/index.php?showtopic=20353&st=520&gopid=267620&#entry267620
its quite a bit simpler then trying to haxxorz up a new system. its quite customizable
Logged

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Tactical Battle system
« Reply #10 on: November 18, 2008, 11:23:04 PM »
Sweet.
I read the first pages and a couple of the last, and that seem to include pretty much exactly what I was looking for.

I suppose I should wait for that update though? Would feel kinda dumb to download it and mess around with it when there will be a new one "pretty soon".

Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline Ben

  • Some dude
  • Staff
  • Royal
  • *
  • Posts: 4,844
  • butts
    • my portfolio
Re: Tactical Battle system
« Reply #11 on: November 19, 2008, 01:12:08 AM »
The new update will probably take a while...I talk to the guy on MSN now and then. Ive seen the FFT Jobclass and ability system. Its in the works. If youre looking for the Adv.Wars addon, i think it will be a while.

Im pretty familiar with the system, Ive been using it for a while. I also Have a couple of custom Addons to the system that GubiD made for me to use with the Isometric Height System. Id suggest Using it, and getting familiar. You can ask me things about it if you dont feel like Making A CA  account. I know some stuff. By the time the next Updates Come out, You'll be able to just insert the updated Scripts into your project.

I Have some custom Sprite templates You can use. Im not on Msn lots, but if you gots questions PM me, and Ill log in or answer whatever I can.

Seriously, Ive tried 3 Different TBS engines for XP, and this is the best and most compatible one Ive found. You can do quite a bit, and there is compatibility for most scripts now that its all SDK compliant.

TL;DR   Use this now. Ill help you learn the ins and outs
Logged

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Tactical Battle system
« Reply #12 on: November 19, 2008, 08:20:15 PM »
It's a big thing but.
I guess I ll stick with C++ or Java, as learning a new language and doing something completely custom is better than using something someone else did, in my opinion. I have no real gaming-related knowledges on either C++ or Java though, so I am only going to be able to do it if you help me. Else I am sticking with the script.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Tactical Battle system
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum