Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Adding Grid-Based Movement to a Sideview Battle System.

Hi there. The name's Broken Shadow, and I'm new to these forums. I've been coding games in Game Maker for the past couple years, so I have a pretty good basis in scripting theory [i.e. Variables, Arrays, Hashes... the basics]. After doing that, I decided to come back to RMXP [I'm newly legal, btw] with my knew knowledge. Now, I've read all the RGSS tuts I could find, but all they tell me is stuff I already know. ':| And seeing how I can't find any better ones, I thought I might as well drop in for some questions.

After making a few crappy menu systems like every n00b, I thought I'd go on to tackle something a wee bit more challenging. Like, say, editing a battle system. Not too difficult, one would assume -- but I'm completely unused to the RGSS enviroment. So, here's what I'm trying to do [mock-ups at bottom of post]:

I'm going to be working with a sideview for this project, so I'm starting off with what is by far my favorite: Minkoff's Animated Battlers.

What I want to do is add grid-based movement, and targeting range. Let's say Gloria's fighting a couple ghosts [fig 1]. Her turn's come, but there's no way in hell she's gonna hit 'em from ALL the way over there [fig 2]. So she selects the 'Move' command, and teleports/walks/dances a few spaces to the left [fig 3]. Now that she's close enough to one of 'em, she can target him with the attack [fig 4].

Here's what I'd usually do [mind the sloppy technique, I'm goin' off the top of my head]:

First, I'd set up x and y arrays in an aptly named controller object, let's call it Positions. These would serve as exact guidelines, to be used for not only drawing the battlers and effects, but setting up range of attacks and whatnot.

Then, after doing the obvious little tweaks [drawing the battlers using the Positions.x/y, setting 2 little variables for the size of the grid's squares], I'd move onto the targeting. It would really be a simple little switch -- [example, not in actual rgss] if (target.y = attacker.y) AND (target.x < SQ*2 away from attacker.x), said skill/attack becomes usable, and enemies within said range become target-able. [side note: Wow, that was sloppy XD]

Working out the movement wouldn't be too hard, as I'm not really picky about movement range -- 1 square at a time would probably do it for now. So that one's kindof a no-brainer.

That's what I would do if I was working with GML [Game Maker's base Language]. Problem is, outside of syntax and menu edits, I know JACK SQUAT about RGSS. So what I need to do is translate all of the above [and maybe improve on the techniques just a scoosh ;) ] into RGSS. Plus, I don't really know how to work the movement into the command menu.

I guess the hardest part after this would be setting up enemy AI to do the same. Right now, all I need to set up is a basic, 3-card AI system. The enemy should either be 1 - Agressive [charges and attacks the nearest player], 2 - A Chicken [avoids the nearest player and uses long-range attacks], or 3 - Solitary [stands pretty still, only moves when neccessary for attacks].

Phew. That was a mouthful.

I'm not really asking for a script here -- that would really just hinder my learning experience. What I'm looking for is more a few shoves in the right direction... this is, more than anything, a learning experience. I'm hoping to learn some practical RGSS, beef up my chops, and give something back to the place I've been peeking in on since I don't know when.

Plus, I think it would make a pretty cool battle system.

[FIGURES]

[fig 1]
http://img181.imageshack.us/img181/2272/gridbasejd4.png[/IMG]

[fig 2]
http://img246.imageshack.us/img246/1271 ... ailvp6.png[/IMG]

[fig 3]
http://img340.imageshack.us/img340/6213/gridmovetf2.png[/IMG]

[fig 4]
http://img102.imageshack.us/img102/7115 ... eedgp6.png[/IMG]

On one more side note, I'd like to apologize for the total and complete lame-ness of these mock-ups. I'm a TERRIBLE artist. XD
 
Heh... thanks for the good word on the Minkoff system, but what you're looking doesn't really seem like a sideview system, but a tactical system. This way, you can place your heroes on a map and spell & weapon range does matter.

Zenith Tactical Battle System - Version 1.2
http://img162.imageshack.us/img162/6165/sexyhudnm0.png[/img]

Mind you, I figure you wanna use the spritesheet battlers than the charactersets that every (or nearly every) RMXP tactical system I've seen use. I understand whole heartedly. I've been asked about this myself, but I'm sticking (right now) to just this... and each tactical system is scripted differently from one another. So if I make one for Selwyn's, it won't work with Mac's/Zenith's. You'll have to find a tactical system that you like and make a post in the 'Script Request' forum for a Graphic Add-On to use ... better graphics than charactersets in battle???
 
Well, not neccesarily. The idea is for it to function full-force as a classic sideview RPG system. Same menu style, same character stats, with just a couple tactics elements thrown in. Not so many features that it becomes a tactics game [the main focus here isn't tactics, it's fast-paced rpg battles] Let's see... well, the only example that I can think of that comes close is Square's "Live a Live", and that's not the easiest game to get your hands on. :p

At this point, going with a full-on tactics system brings up WAY more features than I need. As I said, I pretty much know how to script this system out, I just need to figure out how to implement said code into RGSS.

Besides, I've made alot of RMXP games in the past, and this time around, I'm looking to use as few popular systems as possible. I'm only using Minkoff because 1) I don't know RGSS well enough to code one myself 2) It's a wonderful system and 3) It can be config'd until barely recognizable. I don't want other RPG Designers to be playing and go 'Hey! This is based off of Selwyn's battle system! OMGz0rZ!!!1!:)lol!'. Kinda detracts from the gameplay. :D

I hope I could clear that up.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top