RPG Help - Battle Engine

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply

Best battle engine technique?

Pokemon Style: Random Enemy Generation
1
25%
Zelda Style: Visible enemies with predetermined movement
3
75%
 
Total votes: 4

Anonymous

RPG Help - Battle Engine

Post by Anonymous » Wed Mar 30, 2005 9:19 pm

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

MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows » Wed Mar 30, 2005 9:49 pm

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
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com

User avatar
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 » Thu Mar 31, 2005 12:14 pm

:) 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:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Thu Mar 31, 2005 3:39 pm

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:
"But...It was so beutifully done"

User avatar
lurah-
Veteran
Posts: 206
Joined: Mon Nov 01, 2004 10:47 am
Location: Finland
Contact:

Post by lurah- » Thu Mar 31, 2005 6:18 pm

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:

User avatar
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 » Thu Mar 31, 2005 7:01 pm

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)
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Fri Apr 01, 2005 11:44 am

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
"But...It was so beutifully done"

barok
Coder
Posts: 38
Joined: Sat Jul 24, 2004 4:32 pm
Location: Frozen bushlands of Saskatchewan
Contact:

Post by barok » Mon Apr 04, 2005 1:25 am

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.
I have no sig.

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Mon Apr 04, 2005 2:40 pm

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!
"But...It was so beutifully done"

User avatar
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 » Mon Apr 04, 2005 5:20 pm

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:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)

barok
Coder
Posts: 38
Joined: Sat Jul 24, 2004 4:32 pm
Location: Frozen bushlands of Saskatchewan
Contact:

Post by barok » Mon Apr 04, 2005 10:06 pm

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!!!
I have no sig.

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Tue Apr 05, 2005 2:24 pm

Gameboy through Gamecube dude, through Gamecube... :D
Logic wrote: Game for GameBoy --> GameBoy --> Linky --> GameCube --> TV
:P
"But...It was so beutifully done"

User avatar
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 » Tue Apr 05, 2005 9:26 pm

:?: In what way did the game trash you TV,. you hooked it thru the G^3.. :?: :roll: :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)

Post Reply