Author Topic: "Fixing" DKjr  (Read 38482 times)

0 Members and 4 Guests are viewing this topic.

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: "Fixing" DKjr
« Reply #30 on: October 05, 2016, 07:35:10 pm »
Was it known that there is a bug in DKjr that allows you to climb into the space inside the platforms in Mario's Hideout?   (and also allow you to squeeze down through the gap between the vines on the left and the 2nd platform?)

Weird.  I guess that's something else that ought to be fixed.

To pass into a platform, all you have to do is get off the left side vine and onto a platform, get back on the vine (but keep Jr on the right side of that vine), descend a bit, then go back onto the platform.. he'll go onto the platform lower than he's supposed to be able to.
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline xelnia

  • Administrator
  • Spring Jumper
  • *
  • Posts: 2869
  • Stop using 0.106
    • Twitch
    • Awards
Re: "Fixing" DKjr
« Reply #31 on: October 05, 2016, 08:11:29 pm »
Was it known that there is a bug in DKjr that allows you to climb into the space inside the platforms in Mario's Hideout?   (and also allow you to squeeze down through the gap between the vines on the left and the 2nd platform?)

Weird.  I guess that's something else that ought to be fixed.

To pass into a platform, all you have to do is get off the left side vine and onto a platform, get back on the vine (but keep Jr on the right side of that vine), descend a bit, then go back onto the platform.. he'll go onto the platform lower than he's supposed to be able to.

JR pls....  FailFish

Here's something else to look out for...walking through a spark. Not sure if it's a problem with MAME emulation or an actual bug in the code that would happen on arcade as well. Money shot is at about 0:25.

! No longer available
"Do not criticize, question, suggest or opine anything about an upcoming CAG event, no matter how constructive or positive your intent may be. You will find nothing but pain and frustration, trust me. Just go, or don't go, and :-X either way!" -ChrisP, 3/29/15
Member for 11 Years snek CK Killscreener IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: "Fixing" DKjr
« Reply #32 on: October 05, 2016, 10:56:44 pm »
JR pls....  FailFish

Here's something else to look out for...walking through a spark. Not sure if it's a problem with MAME emulation or an actual bug in the code that would happen on arcade as well. Money shot is at about 0:25..

Oh, wow.   I'm not even sure how to reproduce that.   I'll also try looking into the warp glitch eventually.

I've already found two sections of code that are potential game crashes, and the platform bug above can also cause a lockup if you merge into the little platform on the left - you get stuck inside forever, even past the timer hitting zero.
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline Jonesy

  • Elite Member
  • *
  • Posts: 354
    • Awards
Re: "Fixing" DKjr
« Reply #33 on: October 06, 2016, 12:22:25 am »
Wowzer!?

Interesting stuff, although Jr's code is coming across as a bit of a mess, pretty funny that a typo determined the final bird flight pattern.  FailFish  FailFish

Keep it going John, top job!

Jr remix FTW  Kreygasm
Member for 11 Years DK Killscreener Twitch Streamer

Offline Barra

  • Global Moderator
  • Spring Jumper
  • *
  • Posts: 1472
  • Pie Kicker
    • Awards
Re: "Fixing" DKjr
« Reply #34 on: October 06, 2016, 12:38:42 am »
Interesting stuff, although Jr's code is coming across as a bit of a mess...

You sound surprised Kappa
Member for 11 Years Former DK3 World Record Holder DK Masters - Rank A DK 1.1M Point Scorer 1M on DK, DKJR, and DK3 Difficulty 3 DK3 Repetitive Blue Screener Submit a score for every DK3 track Winner of a community event IGBY 2016 DKF Team Member DKJR Killscreener DK 1M Point Scorer CK Killscreener DK Killscreener Blogger Twitch Streamer

Offline Jonesy

  • Elite Member
  • *
  • Posts: 354
    • Awards
Re: "Fixing" DKjr
« Reply #35 on: October 06, 2016, 08:22:30 am »
Interesting stuff, although Jr's code is coming across as a bit of a mess...

You sound surprised Kappa

I'm surprised it's that bad TBH

Anyhow, John mentioned he tweaked the 'anti-camping' logic....I reckon you need yours tweaking also  Kappa
« Last Edit: October 06, 2016, 08:54:49 am by Jonesy Kong »
Member for 11 Years DK Killscreener Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: "Fixing" DKjr
« Reply #36 on: October 06, 2016, 01:26:08 pm »
Here's update #3 to the ROM, just unzip and copy the files into the dkongjre folder.

This update cleans up some glitches with getting suck on vines, getting stuck inside or walking inside platforms.  Also fixes the last of the disassembly errors, so it seems to be assembling reliably now.   I think that about does it for obvious glitches.   This was good for getting a feel for the code.   I think that means I'll start some Remix related modifications soon.

Interesting stuff, although Jr's code is coming across as a bit of a mess...

You sound surprised Kappa

I'm surprised it's that bad TBH

Anyhow, John mentioned he tweaked the 'anti-camping' logic....I reckon you need yours tweaking also  Kappa

If anyone has an opinion on the anti-camping, let me know.  Randomizing the timing of the splitting blue sparks makes them more likely to form deadly barrel, I mean spark, combos.   (sparks are modified barrels.  snapjaws are modified fireballs/firefoxes.)

The get the impression that Donkey Kong was programmed by veteran programmers.   Donkey Kong Jr was most likely junior programmers.   I suspect they had a printout of the source code and the binaries, but not source code itself.  They must have approached the project as a ROM hack - adding patches over the DK ROM rather than assembling the game fresh.  There are a few address calculation mistakes (where code jumps to a bad location), abandoned code & data fragments, lots of jumps that go to other jumps, lots of bypass jumps to insert a bit of code before jumping back...   It's a bit of a nightmare to make sense of because little bits of code are spread out all over the place instead of in rational order.

Ah well, onwards...
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: "Fixing" DKjr
« Reply #37 on: October 15, 2016, 02:24:52 pm »
Donkey Kong:  1,206,800  Kill Screen
Donkey Kong:  898,600     16-5
D2K:                 380,200     L=9
Donkey Kong Junior:  In Progress
Member for 11 Years DK 1.2M Point Scorer Winner of a community event Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer Individual Board Record Holder DK 1M Point Scorer DK Killscreener Former DK World Record Holder - MAME Twitch Streamer

Offline serphintizer

  • Senior Member
  • *
  • Posts: 187
    • Awards
Re: "Fixing" DKjr
« Reply #38 on: October 15, 2016, 02:41:11 pm »
Wrong again!  LOL  Thanks for playing!!

You mad bro? ROFL
"Kill screen? Ha! It's for tourists."  - Mr. X
Member for 9 Years CK World Record Holder - MAME CK Killscreener DK World Record Holder - Arcade DK 1.2M Point Scorer DK Killscreener Individual Board Record Holder IGBY 2016 DKF Team Member Former D2K World Record Holder DK 1.1M Point Scorer Winner of a community event DK 1M Point Scorer Twitch Streamer

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: "Fixing" DKjr
« Reply #39 on: October 15, 2016, 05:13:58 pm »
Wrong again!  LOL  Thanks for playing!!

You mad bro? ROFL

Yup, that must be it.  People often laugh out loud when they are mad.  Good read.  Oh, wait . . .
Donkey Kong:  1,206,800  Kill Screen
Donkey Kong:  898,600     16-5
D2K:                 380,200     L=9
Donkey Kong Junior:  In Progress
Member for 11 Years DK 1.2M Point Scorer Winner of a community event Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer Individual Board Record Holder DK 1M Point Scorer DK Killscreener Former DK World Record Holder - MAME Twitch Streamer

Offline marinomitch13

  • Spring Jumper
  • *
  • Posts: 1806
    • How to Play DK
    • Awards
Re: "Fixing" DKjr
« Reply #40 on: October 15, 2016, 07:55:00 pm »
Honestly, I find the fact that Jumpman in DK will sometimes slide in the direction you are holding rather than turning around to be much more annoying than the DKJr super jump requiring mashing to get it consistently. At least in the case of the Super Jump you can always expect it and just get better at mashing.
"Thou hast made us for Thyself, and our heart is restless until it finds its rest in Thee." -Augustine, Confessions.
Member for 11 Years IGBY 2015 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: "Fixing" DKjr
« Reply #41 on: October 15, 2016, 08:51:23 pm »
Honestly, I find the fact that Jumpman in DK will sometimes slide in the direction you are holding rather than turning around to be much more annoying than the DKJr super jump requiring mashing to get it consistently. At least in the case of the Super Jump you can always expect it and just get better at mashing.

Jr. does exactly that too.  Twitch the joystick around a bit and you can make him moonwalk for a few frames.  It's not anything specifically wrong internally - push left and both games go left, push right and they go right.. it's only the sprite frame animation that doesn't update until X frames of walking, so you can walk a couple of pixels before the next frame of animation is triggered.  That's also why you can sometimes jump to the left while facing the right.

Jr. has a related issue if you descend off a vine, it can still show a climbing sprite even though the game has technically switched to walking mode.  This one bothers me.   Maybe if I fix one, I'll fix both visual issues.
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: "Fixing" DKjr
« Reply #42 on: October 21, 2016, 04:52:07 pm »
Here's update #4 to fixing DKjr, just unzip and copy these files into the dkongjre folder in the roms directory.

This update is a lot more extensive than before.  The more I went through the code, the more apparent the broken things became.   So I decided that it's OK to make wider changes... whatever it's going to take to fix.

Sometimes there was code where I can see the intended functionality, even if it doesn't actually *work*.  Stuff like the level 1 vines screen supposed to have 3 red snapjaws, level 2 is supposed to have 4 red snapjaws, level 3+ have 5...  Well, 4 never happens because the routine that does the check happens to trash the value of the registers it's testing...  Anyway, so in cases like that, I tried to implement their intention.

There's some evidence that they intended blue snapjaws and blue sparks to have more function in their AI - the blue snapjaws check for the bottoms of vines, for instance.. so I think they were intended to do more than just fly straight down into the water.   But whatever, that's too much a change for now - but Jr Remix will expand the AI functions.

There's a lot of little details fixed, like how platform & vine detection and handling is done..  Generally, things most people won't even notice.. unless maybe you go back to the normal DKjr and then you'll notice something isn't going quite right.

I also tried to balance the difficulty.   I fixed some of the internal difficulty functionality that was hacked up and made it advance more gracefully and affect things in the game in a reasonable way.   Hopefully that makes the difficulty increase smoothly between levels 1 and 5.

I *think* I got things pretty good now.   A casual player probably has a chance at surviving past level 3.

Anyway, give it a go and let me know if the game is more fair and less frustrating.   This will be the code that is the base for DKjr Remix.

« Last Edit: October 21, 2016, 04:55:55 pm by Sock Master »
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline SuperNinbendo

  • New Member
  • *
  • Posts: 6
  • Benjamin Andrew
    • Awards
Re: "Fixing" DKjr
« Reply #43 on: April 09, 2024, 11:06:54 pm »
This is absolutely fascinating!

I'm having so much fun revisiting these old topics!
Member for 1 Year Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: "Fixing" DKjr
« Reply #44 on: April 11, 2024, 08:57:25 am »
Here's something else to look out for...walking through a spark. Not sure if it's a problem with MAME emulation or an actual bug in the code that would happen on arcade as well. Money shot is at about 0:25.

Youtube link - Walking Through a Blue Spark

Wow that was a while ago.

Well, I actually did later find the code responsible for this bug later when I was in development of DK Junior Remix so here's the explanation of what's going on!

There's a bug in DK Junior's code where there are 10 slots made available for the blue and yellow sparks in Mario's Hideout...
but the initialization code only sets the hitbox size for the first 8 slots.   Everything runs fine as long as there are never more than 8 sparks on the screen but as soon as a 9th or 10th spark gets assigned, any sparks in those two slots don't have any defined hitboxes.
You can still jump over them for points or smash them with fruit (if I recall) but you can walk right through them because they have a 0x0 hitbox.
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer