Jump to content
Jet Set Willy & Manic Miner Community

IRF

Contributor
  • Posts

    5,105
  • Joined

  • Last visited

Everything posted by IRF

  1. A couple of other comments on the above: - It doesn't really help out if Willy gets stuck somewhere upon room entry (e.g. if he jumps off the top of one room and ends up embedded in a solid wall in the room above) - but scenarios such as those should really be eliminated by careful design of the game layout; - The choice of entry point into the 'routine'* at #90B6 - the JUMP from #8AB8 has a destination of #90B8 - is deliberately different to the usual entry points of #90B7 or #90B8. In this case, we are jumping straight from the Main Loop, not from a routine or subroutine, so there is no need to use any POP commands to clear the stack. (* 'Routine' is in quotation marks here because it isn't technically a routine, since flow of execution never arrives there via a CALL.)
  2. Correct (as in, your answer inside the spoiler box)!
  3. See if you can guess what these two POKES will do: POKE #8AB9,#B8 POKE #8ABA,#90
  4. I was aware of the differences in the guardian sprites in 'The Warehouse' and 'Amoebatron's Revenge', but the alternate pixel patterns for the magenta Fire cells and the collectable items in the Software Project's version of 'Processing Plant' is news to me! :)
  5. https://www.youtube.com/watch?v=Kg-L14U0ppU&feature=share
  6. The missing pixel from Willy's car door has also been restored. :)
  7. I would add that when Willy is moving upwards, he has only usually moved up by one increment when the code kicks in, so the push back downwards is also only by one increment and therefore doesn't seem as stark. Whereas when he is on the way down, the code takes effect as soon as his head is aligned with the block, so the instantaneous downwards adjustment is an entire cell-row - much more noticeable. I think it could be solved by only preventing the wall-head check when Willy is jumping AND the Jump Counter (#85D5) has reached a value of 11 (#17 in hex) i.e. one increment before the end of the jump, which occurs when #85D5 = 18 (#12).
  8. Some interesting analysis, thanks Norman! (I think the code you're referring to, which ejects Willy downwards from a wall tile during a jump, is at #8EBC.) Indeed! I only discovered today that the alternative fix which I came up with to allow Willy to jump into cut-out gaps in walls (namely to increment his horizontal movement one more time at the end of a jump, by replacing the RET at #8EB5 with a JUMP to #8FBC), has an unforeseen and critical impact on the game - because each jump takes Willy one horizontal increment further, the sequence of jumps along the conveyor in 'Under the Drive' no longer allow Willy to complete that room (and hence he can't complete the game, unless the layout of that room is changed!)
  9. I need to check 'Under the Drive' with this patch in place - it may be impossible, not because of the code which stops Willy from jumping into a wall, but because of the additional horizontal increment when jumping (designed to allow the Wine Cellar to be completable). EDIT: Alas, it is impossible to complete 'Under the Drive' (and therefore the game as a whole) with this patch in place! Taking that into account, along with the fact that Willy also can't escape after collecting the item in 'Forgotten Abbey' without losing a life, and there's probably no point in creating a patch tape file to import into the game as Andy suggested. It was only really an experimental file anyway, so no matter. :)
  10. Note that this patch only tests for Willy's legs entering a wall tile/Earth cell, not floor tiles/Water, so it doesn't have the same effect on the general jumping dynamics as my other patch which inverts the jumping logic (i.e. the one that tests for underfoot platforms before adjusting Willy's y-coordinate).
  11. Some jumps might now be possible that previously were not. E.g. jumping over the cyan 'spider web' guardian in the Orangery from right to left at the upper level? On the other hand, some of the jumps in 'Out on a Limb' might now be impossible with the original layout and this patch in place! Look into this I must... Also, check that jumping through the base of a ramp, as in 'The Chapel' or 'Crow's Nest', is still possible. And the tricky sequence of well-timed jumps along the conveyor in 'Under the Drive'. Finally, it might not be possible for Willy to collect one of the items in 'Watch Tower' in particular without jumping right over the parapet and dropping into an infinite-death scenario in 'Quirkafleeg'!! (Definitely need to check that one!)
  12. Another example of a change to the jump dynamics is in the Orangery, where in order to collect the bottom-left item, you have to steep further back before making the jump over Moon-Face, otherwise the water platform/floor tile above the item catches Willy, where beforehand he fell through it. The first jump in East Wall Base may also be trickier - I think Willy will have to use every floor tile in the room to climb it, rather than being able to skip the second one up.
  13. Thanks for the Christmas present, Norman Sword!
  14. I think I've covered all the constituent parts now; I just need to cobble it all together into a test file and see if it works! However, that will have to wait till after Christmas (and probably into the New Year).
  15. Slight rewrite to detect overhead blocking wall cell: ADD HL,BC ld a,(WALL) ;in theory this position could be off the top of the screen bit 1,h jr nz,ignore_head_check ;the next wall test only occurs if Willy is walking up a ramp (i.e. if B is -01) INC B JR NZ, ignore_other_head_check ; the Zero Flag will be set only if Willy is walking up a ramp LD B,A ; save wall attribute in B ;Adjust HL to find overhead wall LD A,L SUB A,(IX+ramp_animation) ;this variable can be reused LD L,A LD A,B CP(HL) RET Z ;Adjust HL back again LD A,L ADD A,(IX+ramp_animation) ;and reused again LD L,A LD A,B ignore_other_head_check: cp (hl) ;head ;this is the original head-height wall check ret z ;return if path is blocked ignore_head_check: ****** UPDATE: Here is an alternative, slightly more efficient rewrite of this part of the routine: ADD HL,BC ld a,(WALL) ;in theory this position could be off the top of the screen bit 1,h jr nz,ignore_head_check ;the next wall test only occurs if Willy is walking up a ramp (i.e. if B is -01) INC B JR NZ, ignore_other_head_check ; the Zero Flag will be set only if Willy is walking UP a ramp LD B,L ;retain old coordinates in HL ;Adjust HL to find overhead wall LD A,L SUB A,(IX+ramp_animation) ;this variable can be reused LD L,A LD A,(WALL) CP(HL) RET Z ;Adjust HL back again LD L,B ignore_other_head_check: cp (hl) ;head ;this is the original head-height wall check ret z ;return if path is blocked ignore_head_check:
  16. Slight rewrite to detect 'On Top of the House'-type Earth/wall block: UPDATE: Edited to update the D register when Willy is moving left and about to step onto a wall tile (so that the ADD HL,DE instruction points HL at the correct room cell): ld a,(RAMP) cp (HL) jr nz,as_is ;if ramp is here keep bc=shift LD A,C CP #20 JR NZ found_ ;Willy is going up the ramp, so no need to check if he's about to step onto a wall LD A, (ix+ramp_condition) ;reuse existing variable... DEC A ;decrement... LD D,A ;and load into D, to give correct values for both left and right movement LD E,(ix+ramp_animation) ;reuse existing variable, which happens to hold the correct values for both left and right movement ADD HL,DE LD A, (wall) CP (HL) JR NZ, found_ ;no wall under Willy's front foot, so he proceeds down the ramp as normal ;ramp not found, or it was but an adjacent wall block 'over-ruled' it, so no offset needed as_is: LD BC, #0000 ;bc=0 no ramp so no offset/shift found_:
  17. Another couple of thoughts: the check for an overhead Earth block should also test whether Willy is in the top two rows before carrying out a test for a blocking Earth cell above him. Also, the test for an underfoot Earth block ahead of Willy should be done after the edge-of-room test (otherwise Earth blocks that are horizontally at the opposite end of the current room could have an inappropriate influence on his progression). EDIT: Actually, thinking about it, that latter point isn't important - when Willy walks off the edge of a room, the vertical displacement isn't applied anyway, even if he is on a ramp (hence the ramps in adjacent rooms don't line up when you view a master plan of the whole house e.g. see Orangery/West Wing Roof). The two additional checks for Earth/wall cells have different outcomes anyway (in the former case, Willy's diagonal movement is blocked; in the latter case, his diagonal movement is converted into sideways movement). **** Anyway, I'll try and put all of this into practice when I get a chance; ideally I will be able to build upon Norman Sword's work in making a generic 'sideways movement' routine, covering both left and right movements simultaneously. :)
  18. Sorry, the latter example should have read 'West Wing Roof'!
  19. Ramp up to the left: Offset #DA = 0 .... Test for Earth at Underfoot Ramp coordinate +1 Ramp up to the right: Offset #DA = 1 .... Test for Earth at Underfoot Ramp coordinate -1 So we need to map 0 to 1, and 1 to -1. LD A,(#80DA) RLCA 00 -> 00 01 -> 02 CPL 00 -> FF=-01 02 -> FD=-03 ADD A, #02 -01 -> 01 -03 -> -01 LD E,A There may be a more efficient, clever trick that utilises the Carry Flag? EDIT: Maybe need to adjust D as well? 0->0, 1->-1 LD A,(#80DA) NEG LD D,A Then ADD HL,DE FURTHER EDIT: It's actually more efficient just to do: LD A, (#80DA) AND #01 LD C,A - insert into original code after #95D0 .... OR A SBC HL,DE LD A,C XOR #01 ADD A, #40 LD E,A [D already holds 00] ADD HL,DE LD A,(Earth) CP(HL) JR Z, #95F8 [original JSW address, probably now changed]
  20. Sorry, that will probably only work if Willy's attribute coordinates (WATTR) hold an even value. If they hold an odd value, then the check for Earth blocks may be misplaced to a cell beyond where Willy is standing. I'll have to rethink the logic. EDIT: In specific terms, if the ramp slopes up to the left, then it will be detected at WATTR+#40 ; in that circumstance, the test for an Earth block needs to be at WATTR+#41. But if the ramp slopes up to the right, then it will be detected at WATTR=#41 ; the test for an Earth block then needs to be at WATTR+#40. Ideally, we would have a generic set of operations that will work for both ramp directions.
  21. http://skoolkid.github.io/jetsetwilly/reference/facts.html#rampsVsWalls Some preliminary thoughts: When Willy is walking up a ramp, add an additional check for an Earth block (and RET if one is encountered): - When Willy is walking left, the check should be made at (x,y-1); - When Willy is walking right, the check should be made at (x+1,y-1); where (x,y) are the coordinates of the top-left cell occupied by Willy's sprite prior to him crossing the cell boundary. **** When Willy is walking down a ramp, the simple solution would be to block his progress is there is an Earth block ahead of his sprite and two cell-rows below. But that doesn't seem logical. In the example seen in 'On Top of the House', I feel the most realistic solution would be for Willy to simply step onto the block at the base of the ramp. But that would require amendments to two different routines: (1) Edit the routine at #95C8 - after the check for a ramp cell under Willy's back foot, add an additional check for an Earth block under Willy's front foot (perform an XOR 01 on the L register, load the Earth attribute to A, and then do a CP (HL) / JP Z,#95F8 - all to be inserted in between the commands at #95DC and #95DE). So if Willy is standing on a ramp cell and an Earth block simultaneously, then the 'solidity' of the Earth block will take precedence over the 'downward pull' of the ramp cell* when deciding where to draw Willy; (2) Adjust the 'Move Willy (3)' routine so that, when Willy is about to step off a ramp cell at (x+1,y+2) / (x,y+2) [when walking left / right respectively i.e. a ramp cell in the cell underneath Willy's back foot], then make a check for an Earth block at (x,y+2) / (x+1,y+2) [i.e. in the cell underneath Willy's front foot], and if there is an Earth block there, then undo the commands which adjust Willy's coordinates downwards by a row as he moves past the cell boundary. Edit: i.e. at #900A and #9078, insert the extra check, and if there is an Earth block under Willy's front foot, then set BC=00 (although C=0 should be sufficient). **** * N.B. This shouldn't affect the ability for Willy to walk down a ramp cell through Water cells, such as occurs in 'Swimming Pool' or 'West Wing'.
  22. Actually, it's worth resetting Willy's starting position in the 'Jump Code rewrite' test file to The Banyan Tree (somewhere near the entrance from The Nightmare Room), and then try climbing to the top of the Banyan Tree, and also crossing through the Tree in both directions. The subtle difference in Willy's jumping mechanics end up causing quite a significant difference to the outcomes in that room in particular. For example, crossing from left to right used to be extremely tricky (requiring a well-timed jump to avoid the two 'central' vertical guardians); now it's actually impossible I believe - not because Willy hits the guardians, but because he gets caught by the water cells at the top right which he previously fell straight through. (In a sense, climbing the Banyan Tree [up the right hand side] is now easier, if you approach it from The Swimming Pool!)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.