Page 1 of 1

RPG Help - Battle Engine

Posted: Wed Mar 30, 2005 9:19 pm
by Anonymous
Okay, I'm writing an RPG. I have a simple tile engine I wrote myself. The tiles are 15x13, and the tiles are based upon an 20x20 screen map. There is no scrolling other than screen-by-screen. All graphics are in data statements because I can't seem to get BSAVE to work correctly with all this. So currently, the game appears to have a high memory usage...but I'll figure it all out soon enough.

Anyways, my question: how would I go about implementing a battle engine? Currently, after all the tiles/bitmaps are drawn to the screen and the world is loaded, a loop begins checking for keystrokes for movement. So far, what comes to mind is a SUB/GOSUB at the start of the loop.
Pseudocode:

LOOP
gosub checkstatus

[movement stuff]

END LOOP

checkstatus:
check health
if 0 then reset to starting screen
else check for enemy encounter

CONFUSION STARTS HERE
return

So, does that seem correct so far? I'm not sure how to check for enemy encounters. I have two ideas....something like Pokemon Red where enemies randomly appear, or something like Zelda: Link's Awakening where the enemies are apparent on the screen. Doing something like Zelda seems more difficult because I'd have to draw each monster, determine preset paths, and check coordinates for encounters....correct?

Okay, so yea...suggestions/comments are appreciated. Also, will someone point me to what they think is one of the best graphics tutorials? I want to have tiles that look a little better, have them animated, and have those half-tiles that can be half-grass and half-dirt and such...i believe it had something to do with the pages.

A_T

Posted: Wed Mar 30, 2005 9:49 pm
by MystikShadows
Hi Axessterminated,

So far I would say you're on the right track (maybe turn the gosub into independant subs would be better) However that structure would be acceptable.

For a battle engine, take a look here http://www.petesqbsite.com/sections/tut ... GameDesign

There's alot of material there that might help you.

hope this helps

Posted: Thu Mar 31, 2005 12:14 pm
by Rattrapmax6
:) Mystic seems to have help with the prob, but you question,.. hmm, I like both styles, Pokemon style is fun if your catching random monsters, but if you have a zelda style RPG, then zelda style... really depends on what you want to come up with.. :wink:

Posted: Thu Mar 31, 2005 3:39 pm
by Mitth'raw'nuruodo
I like random enemies you can see with set paths! :D

It keeps the game fresh...but...also makes it so you don't get stabbed in the back either. :wink:

Posted: Thu Mar 31, 2005 6:18 pm
by lurah-
Well, about those two choises i dont wana take either :lol:
Anyway, as Mystik told, youre in right way.

But ill give my vote for zelda... :wink:

Posted: Thu Mar 31, 2005 7:01 pm
by Rattrapmax6
axessterminared's sig wrote:Geek isn't just a four letter word, it's a six-figure income.
:lol: So true, altho I heard that 1 b4, its still a good saying, heh heh heh!!! :lol:

I'm still mixxed on the idea, Mitth's got it, do both!! 8)

Posted: Fri Apr 01, 2005 11:44 am
by Mitth'raw'nuruodo
Rattrapmax6 wrote:
axessterminared's sig wrote:Geek isn't just a four letter word, it's a six-figure income.
:lol: So true, altho I heard that 1 b4, its still a good saying, heh heh heh!!! :lol:

I'm still mixxed on the idea, Mitth's got it, do both!! 8)
Ya, on both points! :D

Posted: Mon Apr 04, 2005 1:25 am
by barok
there are much more styles than that... for example, chrono trigger uses a very good technique where there are enemies in certain places with predetermined movement. However, you don't get in a battle with any of the enemies unless you touch them. Then you get in a battle... on the main screen.

Sword of Mana has random enemies. When you step into an area, enemies would pop up randomly. When you finished off all the monsters, a few seconds later more random monsters would pop up. Of course, they were predetermined places so they wouldn't get stuck in walls or such, but it's RANDOMLY predetermined. ;)

Also, random battles aren't "pokemon style." 10 - 1 it wasn't pioneered by these games, but they are most common and well known in final fantasy and dragon warrior. What game pioneered this accursed and overused style though, I don't know.

Posted: Mon Apr 04, 2005 2:40 pm
by Mitth'raw'nuruodo
barok wrote:Sword of Mana has random enemies. When you step into an area, enemies would pop up randomly. When you finished off all the monsters, a few seconds later more random monsters would pop up. Of course, they were predetermined places so they wouldn't get stuck in walls or such, but it's RANDOMLY predetermined.
:shock: That game made me trash my TV!

Posted: Mon Apr 04, 2005 5:20 pm
by Rattrapmax6
barok wrote:Also, random battles aren't "pokemon style." 10 - 1 it wasn't pioneered by these games, but they are most common and well known in final fantasy and dragon warrior. What game pioneered this accursed and overused style though, I don't know.
I think he was making a point, or it was the best way he could describe it.. :wink:

Posted: Mon Apr 04, 2005 10:06 pm
by barok
Mitth'raw'nuruodo wrote:
barok wrote:Sword of Mana has random enemies. When you step into an area, enemies would pop up randomly. When you finished off all the monsters, a few seconds later more random monsters would pop up. Of course, they were predetermined places so they wouldn't get stuck in walls or such, but it's RANDOMLY predetermined.
:shock: That game made me trash my TV!
dear god, i hope you didn't play sword of mana on your tv... it's a gameboy game!!!

Posted: Tue Apr 05, 2005 2:24 pm
by Mitth'raw'nuruodo
Gameboy through Gamecube dude, through Gamecube... :D
Logic wrote: Game for GameBoy --> GameBoy --> Linky --> GameCube --> TV
:P

Posted: Tue Apr 05, 2005 9:26 pm
by Rattrapmax6
:?: In what way did the game trash you TV,. you hooked it thru the G^3.. :?: :roll: :wink: