Disappearing Swords and weird bounce backs

Here is the link to the wedNESday tutorial for making an Adventure game. Done something cool with it? Modified it in some way? Want to ask the community about creating additional features for it? Post things Adventure Module here!
Post Reply
User avatar
slainester
Posts: 3
Joined: Fri Sep 14, 2018 8:56 am
Location: Ireland
Contact:

Disappearing Swords and weird bounce backs

Post by slainester » Fri Sep 14, 2018 7:51 pm

I followed the tutorial and have a fully functional version.
It's great! Can't wait to do my own thing.
I'm bothered by a few things though.
Why does the sword disappear when I hit enemies? It looks like the enemy is hit by an invisible force.(Could be cool in another game)
I tried a few things but I coudn't figure it out.

Also when the enemies are hit by the sword they sometimes bounce back in random directions.
I assume it's because they are randomly moving around and when you hit them it can happen that they bounce like this.
However shouldn't they rather bounce back in the opposite direction they where hit from?
It works correctly with the projectile weapon.

Other than that, I love the tutorial, as long as it is. I could follow everything and it made me try out stuff and understand a lot more how this works.
Thanks a lot.
Great Job!
4 PRINT "♥";
5 PRINT " BALLS..."
10 POKE1024,81:POKE1025,81
User avatar
chronosv2
Posts: 204
Joined: Wed Aug 08, 2018 9:30 pm
Location: KY, USA
Contact:

Re: Disappearing Swords and weird bounce backs

Post by chronosv2 » Fri Sep 14, 2018 8:26 pm

The sword disappears because it uses the same code as the projectile for collisions. As for why enemies are bouncing in random directions, could be because of the side the bounding box is hitting it on.
It was explained that the sword disappears because having separate hit code for the sword and projectile makes things unnecessarily complicated for what's intended to be a bare-bones introductory module.
User avatar
slainester
Posts: 3
Joined: Fri Sep 14, 2018 8:56 am
Location: Ireland
Contact:

Re: Disappearing Swords and weird bounce backs

Post by slainester » Sat Sep 15, 2018 7:39 am

I see.
Thanks for the quick answer!
I know where to look now.
4 PRINT "♥";
5 PRINT " BALLS..."
10 POKE1024,81:POKE1025,81
zeldafreakneo
Posts: 3
Joined: Mon Sep 10, 2018 7:37 am

Re: Disappearing Swords and weird bounce backs

Post by zeldafreakneo » Sat Sep 15, 2018 7:59 am

Did you happen to fix it? Could you share? =)
Post Reply