Author Topic: Barrel freezers, internal difficulty, 6th girder stuck fireballs  (Read 4094 times)

0 Members and 2 Guests are viewing this topic.

Offline SpiderWaffle

  • New Member
  • *
  • Posts: 6
Barrel freezers, internal difficulty, 6th girder stuck fireballs
« on: December 31, 2015, 01:15:07 PM »
So I have a few questions about the internal difficulty and getting freezers on barrel stages.

This is what I've gathered, please correct if anything is inaccurate:
Only fireball slots 2 and 4 can freeze, meaning the first fireball that spawns to create two fireballs on screen at same time, and the first fireball that spawns to create four fireballs on the screen at the same time. (not sure if you can remake a slot 2 or 4 by being the second fireball to spawn to create 2 and 4 on screen)
AND, internal difficulty 3 (the highest of 3 possible settings) must also be active.
and the internal difficulty switches over based on internal timer for level (that never stops) after 34, 67, and 100s, based on this chart(25% = 1 50% = 2 75% = 3):

Level        0 - 33s   34 - 66s   67 - 99s    100s and up
1               25%       50%        50%         75%
2               50%       50%        75%         75%
3               50%       75%        75%         75%
4 and up   75%       75%        75%         75%

So I'm wondering can slot 2 or 4, non-freezers, (because of difficulty 3 not active) SWITCH over to be a freezer once difficulty changes from 2 to 3, or does the difficulty need to be 3 at the time the fireball spawns out of the oil can?

And finally, how/why exactly do freezers get stuck/trapped on the right side the of the 6th girder? I know it needs to be below you to refreeze in some way, but the not moving to the left part? And can this happen on any girder so long as the fireball is below you?

thanks a bunch!
« Last Edit: December 31, 2015, 01:17:24 PM by SpiderWaffle »

Offline f_symbols

  • Spring Jumper
  • *
  • Posts: 771
  • wht u mean
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #1 on: December 31, 2015, 02:25:29 PM »
It starts at level 3 internal diff; This is why you will never see a freezer before 4000 bonus timer on 2-2. 

Another clarification, to the 3rd part about why freezers get stuck...

From observation (0% code confirmation), there's actually a few types of freeze "cycles" that occur and I don't believe there's a comprehensive post about this yet or if it's been discussed much at all (I'll make one right after the tournament..).  Briefly, a freeze "cycle" can consist of anywhere from 1 to 3 distinct parts, that will always occur in order (ie. A>B>C or B>C or C only).  When a fire gets  "stuck", they are trapped in the limbo state between parts B and C.  After satisfying a primary/secondary freeze in part "B", they now attempt to head right, climb the nearest ladder and refreeze (in part "C") for a set number of frames (discussed above), assuming jumpman is at or below them in height as they reach the top of the ladder. 

So it's a bit of a technicality, but in theory they are still in the freeze cycle while they are "stuck" and given the chance, they will climb and enter the final part of the freeze cycle.
« Last Edit: December 31, 2015, 02:47:20 PM by f_symbols »
DK Remix Killscreener Twitch TV  Streamer DK Killscreener DKF Blogger DK 1 Million Point Scorer

Online Adam_Mon

  • Elite Member
  • *
  • Posts: 331
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #2 on: December 31, 2015, 02:35:54 PM »
I should probably already know this but I don't ...Do freezers show up at all on 1-1?

Offline f_symbols

  • Spring Jumper
  • *
  • Posts: 771
  • wht u mean
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #3 on: December 31, 2015, 02:41:29 PM »
I should probably already know this but I don't ...Do freezers show up at all on 1-1?

It should be possible after 2 ticks of the internal difficulty timer; I believe that would be 66 seconds in.
DK Remix Killscreener Twitch TV  Streamer DK Killscreener DKF Blogger DK 1 Million Point Scorer

Offline SpiderWaffle

  • New Member
  • *
  • Posts: 6
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #4 on: December 31, 2015, 02:52:09 PM »
I'm wondering about this freezer on 3-1: https://www.youtube.com/watch?v=5gnUANF3GU0#t=9m45s
it occurs once the 2nd fireballs climbs the first ladder just after ~20s in, (well before 34s even) how is this freezing? There's many sources confirming diff 3 doesn't occur until 67s in on 3-1 (for barrel steering and wilds at least)

So fireballs can switch freezers on the fly on springs once diff changes to highest of 3 for sure, but are barrel stages no different?

For 1-1 there are freezers for sure (just check about any high 1-1 score video), I've only see it after 100s in though, with ~600 bonus timer left.

Online Adam_Mon

  • Elite Member
  • *
  • Posts: 331
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #5 on: December 31, 2015, 03:05:26 PM »
It starts at level 3 internal diff; This is why you will never see a freezer before 4000 bonus timer on 2-2. 

Another clarification, to the 3rd part about why freezers get stuck...

From observation (0% code confirmation), there's actually a few types of freeze "cycles" that occur and I don't believe there's a comprehensive post about this yet or if it's been discussed much at all (I'll make one right after the tournament..).  Briefly, a freeze "cycle" can consist of anywhere from 1 to 3 distinct parts, that will always occur in order (ie. A>B>C or B>C or C only).  When a fire gets  "stuck", they are trapped in the limbo state between parts B and C.  After satisfying a primary/secondary freeze in part "B", they now attempt to head right, climb the nearest ladder and refreeze (in part "C") for a set number of frames (discussed above), assuming jumpman is at or below them in height as they reach the top of the ladder. 

So it's a bit of a technicality, but in theory they are still in the freeze cycle while they are "stuck" and given the chance, they will climb and enter the final part of the freeze cycle.

An in depth post about the freezing behavior would be great.   
It might be worth tossing in info about how the freezers pop out of the oil can relative to what fireballs are on the board already..if my memory serves me correctly during a discussion in Ethan's channel with Ethan, Myself and Sock_Master they explained how killing an active fireball would cause the next blue barrel that rolled into the oil can to replace the previously smashed fireball ...(correct me if I'm going astray here...)

so for example:

if there are 3 fireballs spawned and active on the board and you smash one leaving 2 fireballs and now a blue barrel rolls into the oil can that new fireball will not be a "slot 4 " freezer and instead will replace the smashed fireball "fireball slot 3" witch is non-freezing right?

Offline f_symbols

  • Spring Jumper
  • *
  • Posts: 771
  • wht u mean
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #6 on: December 31, 2015, 03:07:10 PM »
I'm wondering about this freezer on 3-1: https://www.youtube.com/watch?v=5gnUANF3GU0#t=9m45s
it occurs once the 2nd fireballs climbs the first ladder just after ~20s in, (well before 34s even) how is this freezing? There's many sources confirming diff 3 doesn't occur until 67s in on 3-1 (for barrel steering and wilds at least)


Perhaps all the different nomenclature is making things confusing.  Level 3-1, is starting at "level 3" difficulty, so the fireballs can freeze right away, on any of the level 3 screens.  Level 2 is starting on level 2 difficulty, so anytime 33 seconds has passed on a level 2 screen you could see a "Freeze cycle".  Level 1 is on level 1 difficulty, and thus requires 66 seconds (or 2 internal timer clicks) to allow a freeze to occur. 
DK Remix Killscreener Twitch TV  Streamer DK Killscreener DKF Blogger DK 1 Million Point Scorer

Offline f_symbols

  • Spring Jumper
  • *
  • Posts: 771
  • wht u mean
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #7 on: December 31, 2015, 03:11:53 PM »
... to replace the previously smashed fireball ...(correct me if I'm going astray here...)

so for example:

if there are 3 fireballs spawned and active on the board and you smash one leaving 2 fireballs and now a blue barrel rolls into the oil can that new fireball will not be a "slot 4 " freezer and instead will replace the smashed fireball "fireball slot 3" witch is non-freezing right?

ok, so you are correct on the first part, and to support that idea, on the 2nd part, the replacement will only fill slot 3 if that is the one you smashed; let's say you smashed #2, now the next fire to spawn, will fill the lowest number, in this case slot 2 (this situation could lead to freezers spawning back to back, in this example it would be slot 2 and then slot 4) slots, lo  <Allen>
« Last Edit: December 31, 2015, 03:14:35 PM by f_symbols »
DK Remix Killscreener Twitch TV  Streamer DK Killscreener DKF Blogger DK 1 Million Point Scorer

Offline SpiderWaffle

  • New Member
  • *
  • Posts: 6
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #8 on: December 31, 2015, 06:52:16 PM »
As I understand the code works something like this when checking internal difficulty:

2186 3A8063   LD A,(#6380)    ; else load A with difficulty from 1 to 5.
2189 1F      RRA       ; divide by 2, result can be 0, 1, or 2
218A 3C      INC A       ; increment. result is now 1, 2, or 3

at least for the steering portion of the code, so 0-2 or 1-3, "internal difficulty" or "difficulty" is largely subjective semantics. The important thing to be clear is that there's 3 discreet possible difficulty settings. Personally I think labels: 1, 2 and 3 are the most intuitive and least ambiguous, as the middle difficulty isn't referenced as much but the highest setting is, so labeling the highest 3 is unambiguously 3 of 3 and labeling it 2 isn't so clear.

Quote
Level 3-1, is starting at "level 3" difficulty, so the fireballs can freeze right away, on any of the level 3 screens.  Level 2 is starting on level 2 difficulty, so anytime 33 seconds has passed on a level 2 screen you could see a "Freeze cycle".  Level 1 is on level 1 difficulty, and thus requires 66 seconds (or 2 internal timer clicks) to allow a freeze to occur.

That would make sense for freezers, but I'm a bit confused, because all the steering charts I've seen would be ~33s (1/3rd level time) behind that, and when fireballs speed up is right on with that chart too, but then I've read posts from Dean and others saying wild types would be ~67s (2/3rds level time) behind that. So is it that the difficulty for steering and fireball speed follows that chart I copied over, and freezers are 1/3rd level time ahead of that, and wild types is 1/3rd level time behind that?

Offline xelnia

  • Global Moderator
  • Spring Jumper
  • *
  • Posts: 1291
  • Stop using 0.106
    • Twitch
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #9 on: January 01, 2016, 02:49:43 AM »
Hopefully Willms or Sock Master or Dean chime in here, but let me throw in my 2 cents worth (as best as I understand the commented code):

There are 2 kinds of "difficulty" in DK: the base internal difficulty (BD) of which there are 5 flavors, and the modified difficulty (MD) which comes in 3 flavors. These two different scales are used in different ways for different things.

Freezer Mode:
Whether or not fireballs enter freezer mode is determined by the base difficulty, NOT the modified difficulty. Each increase in BD takes 2,048 frames. Freezers cannot happen until BD = 3. Therefore, freezers are possible on both Level 1 boards after 4,096 frames. Depending on whether you use 60 Hz or 60.6060... Hz to calculate the refresh rate, that's somewhere between 67.584 and 68.267 seconds. The Don Hodges timer chart kind of rounds off the numbers.

That means freezers are possible on Level 2 after 2,048 frames (33.792 - 34.133 seconds) and are immediately possible upon spawning on Levels 3+.

Code: [Select]
; This subroutine checks if fires 2 and 4 should enter freezer mode. They always both enter at the same time and they enter with a 25% probability
; every 256 frames (note that this is 256 actual frames, not 256 fireball code execution frames).
; called from #31B1 above   

31DD  3A8063    LD      A,(#6380)       ; \  Return if internal difficulty is < 3, no freezers are allowed until difficulty 3.
31E0  FE03      CP      #03             ;  |
31E2  F8        RET     M               ; /

31E3  CDF631    CALL    #31F6           ; Check if we should enter freezer mode (25% probability every 256 frames of entering freezer mode)
31E6  FE01      CP      #01             ; \ Return if should not enter freezer mode
31E8  C0        RET     NZ              ; /

31E9  213964    LD      HL,#6439        ; \  Set freezer indicator of 2nd fire to #02 to enable freezer mode
31EC  3E02      LD      A,#02           ;  |
31EE  77        LD      (HL),A          ; /

31EF  217964    LD      HL,#6479        ; \  Set freezer indicator of 4th fire to #02 to enable freezer mode
31F2  3E02      LD      A,#02           ;  |
31F4  77        LD      (HL),A          ; /
31F5  C9        RET                     ; return

Fireball Speed:

Also determined by base difficulty. I'm not sure why a "Difficulty 0" is included when this is checked, but it is. The result of the following code is that fireballs can have 4 different speeds.

Code: [Select]
; This routine is used to adjust the fireball speed based on the internal difficulty. It works by forcing the entire fireball movement routine to
; be skipped on certain frames, returning directly back to the main routine in such cases. The higher the internal difficlty, the less often it
; short-circuits back to the main routine, the faster they will move.
; called from #30ED ABOVE

30FA  3A8063    LD      A,(#6380)       ; \  Jump if internal difficulty is less than 6 (Is it possible to not jump here?)
30FD  FE06      CP      #06             ;  |
30FF  3802      JR      C,#3103         ; /

3101  3E05      LD      A,#05           ; load A with 5 = max internal difficulty
3103  EF        RST     #28             ; jump to address based on internal difficulty

3104  10 31                     0       ; #3110
3106  10 31                     1       ; #3110
3108  1B 31                     2       ; #311B
310A  26 31                     3       ; #3126
310C  26 31                     4       ; #3126
310E  31 31                     5       ; #3131

; internal difficulty == 0 or 1. In this case, the fireball movement routine is only executed every other frame, so that fireballs move slowly.

3110  3A 1A 60  LD      A,(#601A)       ; load A with this clock counts down from #FF to 00 over and over...
3112  60        LD      H,B             ; load H with B == ??? from previous subroutine ???? [what is this doing here ?]
3113  E601      AND     #01             ; \  If lowest bit of timer is 0 Return and continue as normal
3115  FE01      CP      #01             ;  |
3117  C8        RET     Z               ; /

3118  33        INC     SP              ; \  Else return to #198F instead of #30F0, skipping fireball movement routine
3119  33        INC     SP              ;  |
311A  C9        RET                     ; /

; internal difficulty == 2. Here the fireball movement routine is executed for 5 consecutive frames out of every 8 frames.

311B  3A1A60    LD      A,(#601A)       ; \  If the lowest 3 bits of timer are less than 5 (equal to 0, 1, 2, 3, or 4) then return and continue as
311E  E607      AND     #07             ;  | normal
3120  FE05      CP      #05             ;  |
3122  F8        RET     M               ; /

3123  33        INC     SP              ; \  Else return to #198F instead of #30F0, skipping fireball movement routine
3124  33        INC     SP              ;  |
3125  C9        RET                     ; /

; difficulty == 3 or 4. Here the fireball movement routine is executed for 3 out of every 4 frames.

3126  3A1A60    LD      A,(#601A)       ; \  If the lowest 2 bits of the timer are not 11 then return and continue as normal
3129  E603      AND     #03             ;  |
312B  FE03      CP      #03             ;  |
312D  F8        RET     M               ; /

312E  33        INC     SP              ; \  Else return to #198F instead of #30F0, skipping fireball movement routine
312F  33        INC     SP              ;  |
3130  C9        RET                     ; /

; difficulty == 5. Here the fireball movement routine is executed for 7 out of every 8 frames.

3131  3A1A60    LD      A,(#601A)       ; \  If the lowest 3 bits of the timer are not 111 then return and continue as normal
3134  E607      AND     #07             ;  |
3136  FE07      CP      #07             ;  |
3138  F8        RET     M               ; /

3139  33        INC     SP              ; \  Else return to #198F instead of #30F0, skipping fireball movement routine
313A  33        INC     SP              ;  |
313B  C9        RET                     ; /

Wild Barrels:

Again, determined by the base difficulty. Like fireball speeds, a fixed table is used to determine what kind of wild barrel code to execute. However, unlike fireball speeds, the code only points to 3 different types of wild barrels.

Code: [Select]
; arrive here when crazy barrel is onscreen
; called when barrel deployed or hits a girder on the way down
; called from #2149

22CB  3A4863    LD      A,(#6348)       ; load A with oil can status
22CE  A7        AND     A               ; is the oil can lit ?
22CF  CAE122    JP      Z,#22E1         ; no , jump ahead

22D2  3A8063    LD      A,(#6380)       ; else load A with difficulty
22D5  3D        DEC     A               ; decrement.  will be between 0 and 4
22D6  EF        RST     #28             ; jump based on A

22D7  F6 22                             ; #22F6
22D9  F6 22                             ; #22F6
22DB  03 23                             ; #2303
22DD  03 23                             ; #2303
22DF  1A 23                             ; #231A

; arrive here when oil can is not yet lit
; used for initial crazy barrel

22E1  3A2962    LD      A,(#6229)       ; load A with level #
22E4  47        LD      B,A             ; store into B
22E5  05        DEC     B               ; decrement B
22E6  3E01      LD      A,#01           ; load A with 1
22E8  CAF922    JP      Z,#22F9         ; if level was 1, then jump ahead

22EB  05        DEC     B               ; decrement B again
22EC  3EB1      LD      A,#B1           ; load A with #B1 - for use with level 2 inital crazy barrel
22EE  CAF922    JP      Z,#22F9         ; if level 2, then jump ahead

22F1  3EE9      LD      A,#E9           ; else load A with #E9 - for level 3 and up inital crazy barrel
22F3  C3F922    JP      #22F9           ; jump ahead and store

; check for use with crazy barrels when difficulty is 1 or 2

22F6  3A1860    LD      A,(#6018)       ; load A with random timer value

22F9  DD7711    LD      (IX+#11),A      ; store into +11
22FC  E601      AND     #01             ; mask bits, makes into #00 or #01
22FE  3D        DEC     A               ; decrement, now either #00 or #FF
22FF  DD7710    LD      (IX+#10),A      ; store into +10
2302  C9        RET                     ; return

; check for use with crazy barrels when difficulty is 3 or 4

2303  3A1860    LD      A,(#6018)       ; load A with random timer value
2306  DD7711    LD      (IX+#11),A      ; store into +11
2309  3A0362    LD      A,(#6203)       ; load A with mario's X position
230C  DDBE03    CP      (IX+#03)        ; compare barrel's X position
230F  3E01      LD      A,#01           ; load A with 1
2311  D21623    JP      NC,#2316        ; if greater then skip ahead

2314  3D        DEC     A               ; else decrement twice
2315  3D        DEC     A               ; makes A := #FF

2316  DD7710    LD      (IX+#10),A      ; store into +10
2319  C9        RET                     ; return

; check for use with crazy barrels when difficulty is 5

231A  3A0362    LD      A,(#6203)       ; load A with mario's X position       
231D  DD9603    SUB     (IX+#03)        ; subtract the barrel's X position
2320  0EFF      LD      C,#FF           ; load C with #FF
2322  DA2623    JP      C,#2326         ; if barrel is to left of mario, then jump ahead

2325  0C        INC     C               ; else increase C to 0

2326  07        RLCA                    ; rotate left A (doubles A)
2327  CB11      RL      C               ; rotate left C
2329  07        RLCA                    ; rotate left A (doubles A)
232A  CB11      RL      C               ; rotate left C
232C  DD7110    LD      (IX+#10),C      ; store C into +10
232F  DD7711    LD      (IX+#11),A      ; store A into +11
2332  C9        RET     

Steering:

This is where the modified difficulty comes in, and I think is the source of the idea that there are "3 internal difficulty levels." The base difficulty (1 - 5) is divided by 2 then incremented by 1 to give the modified difficulty.

BD 1 = MD 1
BD 2 = MD 2
BD 3 = MD 2
BD 4 = MD 3
BD 5 = MD 3


Code: [Select]
; called from #2167

216D  CD6E23    CALL    #236E           ; check for ladder.  if no ladders, RET to higher sub.  if at top of ladder, A := 1
2170  3D        DEC     A               ; is there a ladder to go down?
2171  C0        RET     NZ              ; no, return

2172  78        LD      A,B             ; yes, load A with B which has the value of the ladder from the check ??
2173  D605      SUB     #05             ; subtract 5
2175  DD7717    LD      (IX+#17),A      ; store into +17 to indicate which ladder we might be going down ???
2178  3A4863    LD      A,(#6348)       ; get status of the oil can fire
217B  A7        AND     A               ; is the fire lit ?
217C  CAB221    JP      Z,#21B2         ; no, always take ladders before oil is lit

217F  3A0562    LD      A,(#6205)       ; else load A with mario's Y position + 5
2182  D604      SUB     #04             ; subtract 4
2184  BA        CP      D               ; is the barrel already below mario  ?
2185  D8        RET     C               ; yes, return without taking ladder

2186  3A8063    LD      A,(#6380)       ; else load A with difficutly from 1 to 5.  usually the level but increases during play
2189  1F        RRA                     ; roll right (div 2) .  now can be 0, 1, or 2
218A  3C        INC     A               ; increment.  result is now 1, 2, or 3 based on skill level
218B  47        LD      B,A             ; store into B
218C  3A1860    LD      A,(#6018)       ; load A with random timer ?
218F  4F        LD      C,A             ; store into C for later use ?
2190  E603      AND     #03             ; mask bits.   result now random number between 0 and 3
2192  B8        CP      B               ; compare with value compted above based on skill
2193  D0        RET     NC              ; return if greater.  on highest skill this works 75% of time, only returns on 3

2194  211060    LD      HL,#6010        ; load HL with player input. 

; #6010 - copy of input (see #6011). except when jump pressed, bit 7 is set momentarily.
; #6011 - input.  right sets bit 0, left sets bit 1, up sets bit 2, down sets bit 3, jump sets bit 4

2197  3A0362    LD      A,(#6203)       ; load A with mario's X position
219A  BB        CP      E               ; compare with barrels x position
219B  CAB221    JP      Z,#21B2         ; if equal, then go down ladder

219E  D2A921    JP      NC,#21A9        ; if barrel is to right of mario, then check for moving to left

21A1  CB46      BIT     0,(HL)          ; else is mario trying to move right ?
21A3  CAAE21    JP      Z,#21AE         ; no, skip ahead and return without going down ladder

21A6  C3B221    JP      #21B2           ; yes, make barrel go down ladder

21A9  CB4E      BIT     1,(HL)          ; is mario trying to move left ?
21AB  C2B221    JP      NZ,#21B2        ; yes, make barrel go down ladder

21AE  79        LD      A,C             ; else load A with random timer computed above
21AF  E618      AND     #18             ; mask with #18.    25% chance of being zero?
21B1  C0        RET     NZ              ; else return without going down ladder.  If zero then go down the ladder anyway

21B2  DD3407    INC     (IX+#07)        ; increase Barrel's deployment/animation status
21B5  DDCB02C6  SET     0,(IX+#02)      ; set barrel to go down the ladder
21B9  C9        RET                     ; return

So, it all shakes out like this. Different things happening at different times in different levels. Each level progresses to the next level's difficulty after ~34 seconds, with all reaching max difficulty at some point except for Level 1.



Note: Fireball spawn intervals on rivets are fixed on each board, regardless of changing internal difficulty during the board. Fireball spawn intervals on conveyors are a little more complicated, but also don't rely on the shifting internal difficulty during the actual board.

« Last Edit: January 01, 2016, 03:05:30 AM by xelnia »
"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
Twitch TV  Streamer DKF Blogger DK Killscreener Crazy Kong Killscreener

Offline up2ng

  • Senior Member
  • *
  • Posts: 234
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #10 on: January 01, 2016, 11:54:43 AM »
I did not have a chance to reply to this thread last night as I was away from my computer although I could read the discussion on my phone.  There was a lot of misinformation happening and it was frustrating to not be able to respond sooner.

Pretty much the latest post by xelnia does a nice job of summarizing what is going on with the internal difficulty.  In addition, I will try to correct and add a few points.

There are 2 kinds of "difficulty" in DK: the base internal difficulty (BD) of which there are 5 flavors, and the modified difficulty (MD) which comes in 3 flavors. These two different scales are used in different ways for different things.

I STRONGLY recommend moving away from this terminology which was pretty much just invented during this thread and serves no purpose other than to add confusion.

The way that the software works is that there are FIVE different internal difficulties (reference to something additional such as difficulty 0 might refer to the attract mode or it might just be sloppy code that was not cleaned up but is never executed, etc).  These align with the Level number (maxed out at 5) to begin each screen and then increment after some time has passed if the player has not yet completed the screen as described by xelnia.  His chart at the bottom of his latest post does a nice job of showing what happens within each internal difficulty.

Do NOT refer to "modified internal difficulty".  There is no such thing.  You guys are seeing a couple of lines of code within the barrel steering routine and drawing incorrect conclusions.  This is simply the algorithm chosen by the programmers to implement the portion of xelnia's chart which shows barrel steering frequencies at various internal difficulties.  They could have written it out like "if internal difficulty == 1, then frequency = 25%.  Else if internal difficulty == 2, then frequency = 50% . . . " and so on.  But they did it in sort of a complex way presumably to save some code space and perhaps to improve efficiency or whatever.  This calculation is created, used, and then erased from memory in a small fraction of a second.  "Modified internal difficulty" really does not exist as a game state in the same manner as "internal difficulty".  "Internal difficulty" was a term coined by Don Hodges a long time ago before anyone else knew that any of this stuff was happening in the game and I believe the term is a good one and I am happy to see it used widely today.

Use "Level" for the current level (example, "L = 3" would be "Level 3").

Use "Screen" for individual boards within the Level.  (The first Pie Factory Screen is on Level 3, on Screen 3-2.  The "Kill Screen" occurs on the 117th Screen of the game, which is on Level 22.)

Use "Difficulty" or "internal difficulty" to refer to one of the five game states as described in xelnia's post above.

Internal difficulty 3 is required for freezers to exist.


Quote from: xelnia

Wild Barrels:

However, unlike fireball speeds, the code only points to 3 different types of wild barrels.


This is true, and imo, for clarity, the keyword here is "types".  The type of wild barrel is tied to the current internal difficulty, with new types of wild barrels appearing at internal difficulties 1, 3, and 5.  Because of this, very early on folks such as Don Hodges described these barrels as:

Type 1 wild barrel:  During internal difficulties 1 and 2.
Type 2 wild barrel:  During internal difficulties 3 and 4.
Type 3 wild barrel:  During internal difficulty 5.

I think this naming convention works well, but it only works if everyone is aware and is not confused by the differences in the numbers between the Type number and the internal difficulty number where it first appears.

Because of this potential confusion, during my streams I will often verbally refer to the three types of wild barrels as:

"Level 1 wild barrel":  During internal difficulties 1 and 2.
"Level 3 wild barrel":  During internal difficulties 3 and 4.
"Level 5 wild barrel":  During internal difficulty 5.

You can see that strictly speaking this mixture of terminology creates inconsistency although when speaking verbally and informally about this subject I have found that viewers are most likely to know what I am talking about when I use these phrases.

Note that "bombs" are also wild barrels and are beyond the scope of this post except to mention that there is nothing about internal difficulties which directly impact bombs.

Quote from: xelnia

Note: Fireball spawn intervals on rivets are fixed on each board, regardless of changing internal difficulty during the board. Fireball spawn intervals on conveyors are a little more complicated, but also don't rely on the shifting internal difficulty during the actual board.

The exception to this, as far as I know, is that the 4th and 5th fireballs on the Level 3 Pie Factory and the 5th fireball on the Level 4 Pie Factory ARE spawned due to the change in the internal difficulty during those screens.

A few more details:

The frequency and timing of how Kong releases barrels onto the screen IS affected by internal difficulty.

I believe (not 100% confirmed) that the average smash value of a fireball or firefox IS affected "indirectly" by internal difficulty.  This is WAY beyond the scope of this post, but if this is true it would be because of the changes to their animation patterns and frequencies which has been proven to be one of the factors which determine their smash values.


I hope that helps!
Donkey Kong:  1,206,800  Kill Screen
Donkey Kong:  898,600     16-5
D2K:                 380,200     L=9
Donkey Kong Junior:  In Progress
Twitch TV  Streamer DK Killscreener MAME DK WR Holder DK 1 Million Point Scorer DK 1.1 Million Point Scorer Wildcard Rematch Champion DKF Blogger DK 1.2 Million Point Scorer

Offline Sock Master

  • Senior Member
  • *
  • Posts: 221
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #11 on: January 01, 2016, 12:35:08 PM »
xelnia and up2ng pretty much covered everything spot-on.

The internal difficulty value is used in a lot of pieces of game code, where the value is usually mathematically processed to convert it into a different value before being used to make decisions.  The source value feeding those equations is the normal 1-5 internal difficulty value, so it makes sense to simply refer to all of those as using the normal internal difficulty value, except sometimes the same result happens for multiple values of the internal difficulty number.

In the routines where it looks like internal difficulty ZERO would have had some effect, it's simply coded up that way because of the way the Z80 jumps to lists of branches.   The Z80 starts counting at zero, so the list has to have a zero entry...even if it will never actually be used in the game.

(The programmers could have chosen to DECrement the register before calling the branch list to make counts start at zero to avoid this, but either way, the functional end result is the same.)


The bit of information about the internal difficulty affecting the fireball/firefox smash bonus is interesting.  I'm not sure what the actual impact on bonus scores would be, but there is a possibility that it might.
The fireball AI runs at 'uneven' timing steps.   Some fireballs AI frames may run for one frame, some for two..etc.  If the cyclic pattern of these uneven AI delays happens to synchronize with the number of frames in fireball animation, it is possible that certain frames have a higher display probability... therefore the bonus scores linked to certain animation frames have a different probability of happening as well.

If the above conjecture is correct, there is one more conjecture that may also apply...  This synchronization may or may not start out at the same sync point on any given board either.  It is theoretically possible that you may randomly start a board on a 'bad' bonus probability, or a 'good' bonus probability.   There'd be no way to detect or control this during gameplay.

Seems like this would be an interesting thing to study in the code.
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Twitch TV  Streamer

Offline diskborste

  • Jr. Member
  • *
  • Posts: 35
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #12 on: January 01, 2016, 01:10:55 PM »
I agree with basically everything Dean says and was also mildly frustrated when read the earlier replies!  <Mruczek>
DK Killscreener Twitch TV  Streamer

Offline WCopeland

  • Spring Jumper
  • *
  • Posts: 528
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #13 on: January 01, 2016, 01:12:21 PM »
earlier replies are now gone :)
Twitch TV  Streamer DK Killscreener DK 1 Million Point Scorer DK Online Open #4 Winner DK 1.1 Million Point Scorer Crazy Kong Killscreener DKF Blogger Pauline WR Holder DK 1st Man Million DK 1st man 1.1 Million DK Jr. Killscreener 1 Million Point Trifecta DK Arcade WR Holder DK 1.2 Million Point Scorer

Offline SpiderWaffle

  • New Member
  • *
  • Posts: 6
Re: Barrel freezers, internal difficulty, 6th girder stuck fireballs
« Reply #14 on: January 01, 2016, 05:27:49 PM »
This synchronization may or may not start out at the same sync point on any given board either.  It is theoretically possible that you may randomly start a board on a 'bad' bonus probability, or a 'good' bonus probability.   There'd be no way to detect or control this during gameplay.

Should be worth a better look, and not so fast about no way to control this, at least for 1-1. For instance, from a hard boot, the frames should play out exactly the same each time, and the only inputs being credit and P1 start, credit might not matter (can you activate free play dip switch too?), that leaves just one input, can P1 start be held down while hard booting to start first possible frame each time, if so maybe that's a good frame, for 1-1 at least, otherwise humans still time things well, might be a large enough window of good frames in a row.

Makes things much more understanding that there's 5 distinct difficulties referenced for everything and that they are directly related to (level integer) + 1 for each (~1/3 of screen time), and for steering+wild types they are grouped up to yield 3 possible outcomes with steering (1, 2==3, 4==5) and wilds (1==2, 3==4, 5), for freezing 2 outcomes (1==2, 3==4==5), and fireball/fox speed 4 outcomes (1,2,3==4,5)
« Last Edit: January 02, 2016, 12:36:06 PM by SpiderWaffle »