Jump to content

Mord's Blog

  • entries
    170
  • comments
    93
  • views
    98,660

(Action RPG) Version 0.017 Hold/Drop Objects

Sign in to follow this  
Mord

283 views

Ok, so adding the fire button to drop the objects wasn't as difficult as I feared. Just make sure the latches on the fire buttons are turned off, and add a counter on the frames. Incrementing it (up to FF but no wrapping) when it detects the button is pressed, and taking an action when the button is released based on the counter. If >= SomeValue, then drop the object, otherwise assume the player wanted to use the currently equipped item.

 

Equipped items don't work yet obviously. So pressing the button quickly just results in no action.

 

The current value is set to 60, for roughly 1 second in NTSC types. Later on when I actually consider PAL systems, I'll be setting up the constants file to compile with different settings based on what type of system it's being compiled for. So for a pal system the value would be roughly 50 instead.

 

Sadly, there are no sound effects yet. :ponder: So you won't know if you successfully dropped the item until you try to move away from it after releasing the button.

 

Additionally I noticed that sometimes the gate won't open when touched. I'm not sure exactly what causes this, other than it only happens when it's flickering. Based on the flickering colors of the player, there's some wastage going on - you can see the default blue color flashing in between the black and heart colors. This means no object at all was selected for that frame. Still, there are frames when the key IS on the screen. And the gate is never blinking... so it -should- respond anyway.

 

I'll worry about that in the next version. If you notice that happening, just pick up the hearts in the room first and try again. :)

Sign in to follow this  


2 Comments


Recommended Comments

Are you using the hardware collision detection registers for the key+gate? The collision registers are very literal, so if you're flickering both the gate and the key, then you need to make sure your flicker code knows that both must appear on the same frame.

Share this comment


Link to comment

That I am, which is why I find it surprising. The thing is that it only sometimes happens during flicker. (Sometimes when it's got 4 objects to flicker, sometimes when it has 3, sometimes when it has 2...) The problem can potentially be in the Object Manager which selects the objects to display, or in the collision manager that determines what objects have collided and how to react. I'll end up checking the entire thing and getting it to work properly before I start adding more objects however. The whole point of making sure the gate wouldn't flicker was so that I didn't have to worry about the two objects that are overlapping never being displayed on the same frame. (And thus never reacting to one another)

 

I'm also in the process of restructuring the rom for a larger size (to hold more rooms, objects, etc) so I'll probably just try to get the new rom format working first before looking at it under a microscope. :)

Share this comment


Link to comment
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...