QBASIC RPG - Battle Engine Help

View Poll Results: The Best Anti-Spyware Program

Voters
52. You may not vote on this poll
  • HijackThis

    17 32.69%
  • Spybot Search & Destroy

    23 44.23%
  • AdAware

    24 46.15%
  • CounterSpy

    1 1.92%
  • SpySweeper

    4 7.69%
  • Pest Patrol

    0 0%
  • Windows Antispyware/Defender

    8 15.38%
  • eAcceleration/Veloz Stop-Sign

    0 0%
  • SpywareBlaster

    3 5.77%
  • Other

    13 25.00%
Multiple Choice Poll.
Results 1 to 3 of 3

Thread: QBASIC RPG - Battle Engine Help

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Location
    Hawaii
    Posts
    351

    Question QBASIC RPG - Battle Engine Help

    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.
    Geek isn't just a four-letter word; it's a six-figure income.

  2. #2
    Senior Member
    Join Date
    Feb 2004
    Posts
    270
    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.
    Since the beginning of time, Man has searched for the answers to the big questions: \'How did we get here?\' \'Is there life after death?\' \'Are we alone?\' But today, in this very theatre, you will be asked to answer the biggest question of them all...WHO LIVES IN A PINEAPPLE UNDER THE SEA?

  3. #3
    Senior Member
    Join Date
    Jan 2004
    Location
    Hawaii
    Posts
    351
    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.

    A_T
    Geek isn't just a four-letter word; it's a six-figure income.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides