Jump to content

Mord's Blog

  • entries
    170
  • comments
    93
  • views
    100,662

Action RPG v013. Finally.


Mord

283 views

Spent about 4 hours today hunting the code for what was causing problems with the glitches. As per the replies I got in the Atari 2600 programming forum, the glitches were being caused by the routine I was using to clear main ram. It simply wasn't doing what I thought it was doing, and since it was copied code I didn't suspect it as a problem. Since I'm positive I copied that code with copy/paste, I guess I copied it from one of the chapters that had an error in it. The proper routine (8 bytes long) works as expected to init the system.

 

With that out of the way I had a few other errors that had to be fixed, and I believe I have them squashed for now. Although the system I have in the rom right now isn't the exact system I ultimately want. It has to be rewritten to deal with with more situations, flicker, etc. I already know how I'll expand the object system to handle the necessary situations. It's just going to take a while for me to get around to it. There are a few errors that are still present as well that need to be dealt with, but they're not critical for this release.

 

*edit*

The main error you'll notice is that the heart object will occationally have corrupted graphics. This is due to the double line kernal and how I've been handling the data. It needs a minor correction based on what hardware sprite is being used and if it's on an even or odd scanline. I've had ideas on how to fix that in the past but I'll have to take some time to review the code to make sure I know what I'm going to do about it. It's the very next thing to get worked on.

 

I've fixed the corrupted graphics on my working copy. Just needed the SpriteEnd to be incremented by 1 in cases where vertical delay was turned on for the associated graphic.

 

*end edit*

 

At any rate, here's Version 0.013. It's the first version that has tangible objects in that the object is actually only found in a single room at any given time, and when touched it triggers it's associated collision routine. In this case, it's just a heart icon (or is suppose to be!) and when you touch it, it vanishes and gives you 8hp.

 

A demo program keeps recreating the heart in pseudo-random locations in the region once it's picked up. If your hp goes

over maximum, it gets roughly halved. At some point after it fills the object is going to randomly appear inside the wall somewhere and seem to disappear. (in the purple castle room) The pseudo-randomness is predictable right now since this is the only place the random number routine is used. Works well enough for demonstration purposes at least.

 

The way the HP is added to the player when the heart is picked up is by the heart dropping the hp into a "health bank". The health bank then gradually moves the hp over to the player 1hp per frame. If I add a regeneration spell effect/power, I'll just add a check in this routine to add X hp to the health bank per game tick. Since the health bank's routine is called every frame, it'll do the rest of the work normally. This routine will also do the checking to make sure the player doesn't go over their max hp.

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...