Jump to content


Idea for a new cell type in Manic Miner

13 replies to this topic

#11 Norman Sword

Norman Sword

    Advanced Member

  • Member
  • PipPipPip
  • 120 posts

Posted 13 February 2018 - 03:58 PM

Code at $8ebc


          change to             original

8EBC  call Butt               LD A,($85CF)
8EBF  ld a,($85CF)       ADD A,$10
8EC1                             AND $F0
8EC2   ADD A $10
8EC3                             LD ($85CF),A
8EC4  AND $F0
8EC6  call $8E99          CALL $8E9C  see the routine below
8EC9 LD A,$02
8ECB LD ($85D1),A
8ECE LD HL,$85D0
8ED1 RES 1,(HL)


; the call to this routine is moved to the point that "a" is saved

8E94 LD A,($85CF) 
8E97 ADD A,$08 
8E99 LD ($85CF),A          ; moved to call here
8E9C AND $F0                 ;<<<<<<<< original call point
8EA2 ADC A,$5C
8EA5 LD A,($85D3)
8EA8 AND $1F
8EAC LD ($85D3),HL


; a very vague Butt routine


        test if code is wanted, e.g. jump direction, headbutt flag

        return if not wanted
        else call Butt2
        inc hl


;all calls here return with hl intatct


       code to check where  hl is pointing

       return is not wall tile

      act on the headbutt 

      If tile graphics not cleared then return

      clear TILE from Master Attrib





Teaser:   The border bits are very wasteful. The bits 0-1-2 are the border colour and the rest of the byte is wasted. So I use 1 bit for setting the Butt to on or off. That still leaves 4 bits

With the room  fixed to 256 bytes in size,. Conveyors and ramps use

Ramp_dir                 1 byte

Ramp_position         2 bytes

Ramp_length           1 byte

Conveyor_dir           1 byte

Conveyor_position   2 bytes

Conveyor_length     1 byte

That is eight bytes to define these two actions


It is possible on variable room size (as I now have) to delete a lot of the fixed room data. The bytes that store the conveyor and ramp direction are now also stored in the border colour byte. In fact I have deleted all the ramp data and all the conveyor data from the room data. e.g. these eight bytes are reduced to the top two bits in the border flag...   


It uses a big chunk of code to restore these bytes but the code is part of a bigger piece of code. And the ramp/conveyor specific code (the bit dealing with replacing the data, deleted from the room) is no where near 100 bytes


Simple maths will show you why it is worth the effort of removing unwanted data.  Those 8 bytes are repeated 128 times, if using the old room storage method.( in a 128 room game) So the data contained would use 128*8 bytes of memory ( 1024 )  verses the 100 bytes of code


The above is an over simplification. 

Edited by Norman Sword, 14 February 2018 - 11:21 AM.

#12 Norman Sword

Norman Sword

    Advanced Member

  • Member
  • PipPipPip
  • 120 posts

Posted 13 February 2018 - 09:16 PM

You are probably coming into the routine at 8ebc from one of the two jumps below, which presents a problem


8DF7  LD A,($80B2) 
8DFA  CP (HL) 
8DFB  JP Z,$8EBC  >>>> 
8DFF  CP (HL) 
8E00  JP Z,$8EBC >>>


I have a very small subroutine to handle the above type of tile check. It occurs elsewhere. The sole purpose of the routine is to leave HL alone.


But a quick method of doing the same as my sub routine is


          original                         change to


8DF7  LD A,($80B2)              Ld a,($80b2)
8DFA  CP (HL)                       cp (hl)
8DFB  JP Z,$8EBC  >>>>       jr z,$8e00


8DFD                                     inc hl 
8DFE  INC HL                        cp (hl)

8DFF  CP (HL)                      dec hl 
8E00  JP Z,$8EBC >>>          jp z,   Butt or $8ebc

Edited by Norman Sword, 13 February 2018 - 09:18 PM.

#13 Norman Sword

Norman Sword

    Advanced Member

  • Member
  • PipPipPip
  • 120 posts

Posted 16 February 2018 - 08:20 PM

This should be under JSW not MM. But I am reluctant to start a new heading.


I extended the headbutt to include the MM collapsing floors. 


The playability of this is restricted to 3 rooms. Hence the white blocking walls/floors added to stop wandering.


Additions:- collapsing floor, in addition to headbutt, gun, 4 logo title screens, and 128 rooms. 


The gun is now disabled in specific rooms.... Note the ammo display disappears for the room when the gun is switched off.


Added some SFX's





Attached Files

#14 IRF


    Advanced Member

  • Contributor
  • 3,419 posts

Posted 17 February 2018 - 04:06 PM

It would be handy in Forgotten Abbey, I hadn't thought of that. The player would have to do it before venturing up to collect the item, if they were to avoid the need to sacrifice a life to escape.


Having thought about it, the headbutt ability wouldn't allow a fix for the Forgotten Abbey problem without further layout changes.  Because once the problematic wall tile has been bashed away, then when Willy jumps off the left-hand end of the conveyor - which he has to do in order to reach the item - he will fall a fatal distance onto the green platform (just above the entrance to the room).


EDIT: Although that could be resolved by enabling 'fall any height' ability for Willy in this room only - which wouldn't allow any undesirable shortcuts to be taken in this particular room.  Perhaps if you have another unused border bit*, it could be used to specify 'infinite fall' on an individual room basis?


(* Border=3 bits, conveyor/ramp directions=2 bits, headbutt=1 bit, gun=1 bit ..... so 1 bit remaining?)



I forgot to mention for my screenshot (two posts above this) that obviously there is an easy way past the obstacle presented by the tunnel with the oncoming Swiss Army Knife - simply by exiting The Bathroom at the top-left! But as I said, I just created the mockup to illustrate an idea.


It's also occurred to me that the kind of puzzle I described above could also simply be bypassed by Willy shooting said guardian!  So your latest file, where the '007' ability can be disabled on a room-by-room basis, would be useful for preventing such a shortcut.

Edited by IRF, 17 February 2018 - 04:30 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users