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:

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.

March 31st, 2005, 09:32 AM

MoonWolf

Personal preference and what seems easier is the pokemon style. This also makes fighting the same monster for wathever reason easyer.

Simply define certain zones with a percentage chance to create an encounter. You could for instance create a zone that has a 12% chanche to start random encounter with monster x
but a 10% to start a random encounter with monster y. (for every step in said zone or ever second in said zone)

This also makes map editing easyer in the end i think. this patch of gras should have monster x's in it. create a zone the size and location of grass attach a monster and a percentage never look back. Instead of having to place maybe up to 10 to 20 monsters yourself depending on the size of the zone.

March 31st, 2005, 02:19 PM

AxessTerminated

Well for every area, it seems I'd have to specify for each tile a percentage for EACH monster type I want in there. This seems like alot of overhead...but once compiled it may not be that big of a deal...though I'm unsure.