Jump to content

Mord's Blog

  • entries
    170
  • comments
    93
  • views
    100,661

(Action RPG) Version 0.005 Complete


Mord

379 views

There were three errors that evaded me all day while trying to find out why the collision detection was weirded out. All three ended up being found in BackUpPlayer. The first error was having a bcc where it wasn't needed - and in fact short-circuited the code for the Up/Down position restoring.

 

When this was removed, sliding against the horizontal walls worked fine, but approaching them head-on continued to act like crazy glue. Once you touched it, game over. No more moving. However, as an extra effect, pressing against the vertical walls was now consistant with each other. Rather than just being sticky on one side and being sucked in part way with the other, now both sides were sticky. So there was still problems.

 

Looking over everything again, it took a while to spot by looking at the code itself, but the next error was caused by the TempVariable not holding the value I thought it should have when I needed it again. Forgot I used it in the subroutine in between loading/storing. This of course was suppose to have a half-rol'ed instance of the JoystickReading. As a result it shortcircuited some more code which was causing the sticky walls.

 

I fixed this for now by pha and pla'ing the value. Works for now at least rather than using another scratch variable.

 

So when this was fixed, sliding against walls was now fully fixed! Yay me! Then I remembered the crazy glue case. :|

 

To see what would happen, I ran into the nearest horizontal wall hoping for a proper collision.

 

And the wall sucked me right through it and out the other side.

 

I turned around and tried walking back the other way, and sure enough it again pulled me through until I exited the other side. So there was still a problem.

 

And for the life of me I can't remember what the heck that little insignificant problem was. It was likely having a bcc where I needed a bcs. For some reason I keep confusing the flag settings on cmp and whatnot.

 

So anyway. Code fixed. :cool:

 

Attached is screenshot of version 0.005. I added the castle back, mostly but got rid of most of the surrounding walls. I wanted to make sure the playfield could test corners and the screen-limiting boundaries for the player. Just having a block of playfield in the center doesn't help with all those possible cases. :) Also, the player's movement gradually changes over time to demonstrate the fixed-point movement.

 

I think for version 6 I'm just going to review the code I currently have written and do various optimizations, etc. I've seen several places in the code during this version that was either not really necessary (old Labels no longer used but kept via copy/pasting) and places where some code was just redundant more for the sake of clarity than anything else.

 

This'll give me enough time to consider what the next milestone should be. ;)

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...